---
title: "POST /knowledgeBases/{knowledgeBaseId}/contents"
method: POST
path: "/knowledgeBases/{knowledgeBaseId}/contents"
---

# POST /knowledgeBases/{knowledgeBaseId}/contents

`POST /knowledgeBases/{knowledgeBaseId}/contents`

Creates Amazon Q in Connect content. Before to calling this API, use <a href="https://docs.aws.amazon.com/amazon-q-connect/latest/APIReference/API_StartContentUpload.html">StartContentUpload</a> to upload an asset.

## Path parameters

- `knowledgeBaseId` string, required

## Request body

- object
  - `name` string, required — The name of the content. Each piece of content in a knowledge base must have a unique name. You can retrieve a piece of content using only its knowledge base and its name with the <a href="https://docs.aws.amazon.com/amazon-q-connect/latest/APIReference/API_SearchContent.html">SearchContent</a> API.
  - `title` string — The title of the content. If not set, the title is equal to the name.
  - `overrideLinkOutUri` string — The URI you want to use for the article. If the knowledge base has a templateUri, setting this argument overrides it for this piece of content.
  - `metadata` object — A key/value map to store attributes without affecting tagging or recommendations. For example, when synchronizing data between an external system and Amazon Q in Connect, you can store an external version identifier as metadata to utilize for determining drift.
  - `uploadId` string, required — A pointer to the uploaded asset. This value is returned by <a href="https://docs.aws.amazon.com/amazon-q-connect/latest/APIReference/API_StartContentUpload.html">StartContentUpload</a>.
  - `clientToken` string — A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="http://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.
  - `tags` object — The tags used to organize, track, or control access for this resource.

## Response `200`

Success

- CreateContentResponse
  - `content` object — The content.
    - `contentArn` string, required — The Amazon Resource Name (ARN) of the content.
    - `contentId` string, required — The identifier of the content.
    - `knowledgeBaseArn` string, required — The Amazon Resource Name (ARN) of the knowledge base.
    - `knowledgeBaseId` string, required — The identifier of the knowledge base.
    - `name` string, required — The name of the content.
    - `revisionId` string, required — The identifier of the content revision.
    - `title` string, required — The title of the content.
    - `contentType` string, required — The media type of the content.
    - `status` 'CREATE_IN_PROGRESS' | 'CREATE_FAILED' | 'ACTIVE' | 'DELETE_IN_PROGRESS' | 'DELETE_FAILED' | 'DELETED' | 'UPDATE_FAILED', required — The status of the content.
    - `metadata` object, required — A key/value map to store attributes without affecting tagging or recommendations. For example, when synchronizing data between an external system and Amazon Q in Connect, you can store an external version identifier as metadata to utilize for determining drift.
    - `tags` object — The tags used to organize, track, or control access for this resource.
    - `linkOutUri` string — The URI of the content.
    - `url` string, password, required — The URL of the content.
    - `urlExpiry` string, date-time, required — The expiration time of the URL as an epoch timestamp.

## Other responses

- `480` — ConflictException
- `481` — ValidationException
- `482` — ServiceQuotaExceededException
- `483` — UnauthorizedException
- `484` — AccessDeniedException
- `485` — ResourceNotFoundException

---

[API](https://skmtc.net/aws/apis/qconnect.md) · [All operations](https://skmtc.net/aws/apis/qconnect/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/qconnect/versions/833f5de92023/schema)
