Amazon Q Q Contents API

The Q Contents API from Amazon Q — 2 operation(s) for q contents.

GitHub OpenAPI

Operations 6

GET /applications/{applicationId}/index/{indexId}/documents/{documentId}/content Get Document Content #
POST /knowledgeBases/{knowledgeBaseId}/contents Create Content #
GET /knowledgeBases/{knowledgeBaseId}/contents List Contents #
GET /knowledgeBases/{knowledgeBaseId}/contents/{contentId} Get Content #
POST /knowledgeBases/{knowledgeBaseId}/contents/{contentId} Update Content #
DELETE /knowledgeBases/{knowledgeBaseId}/contents/{contentId} Delete Content #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/amazon-q:amazon-q-contents-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

amazon-q-contents-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: QBusiness Contents API
  version: '2023-11-27'
  description: Generated from AWS's published Smithy model for QBusiness. 6 operation(s).
  contact:
    name: Amazon Web Services
    url: https://aws.amazon.com/contact-us/
  license:
    name: Apache 2.0
    identifier: Apache-2.0
    url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://wisdom.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /applications/{applicationId}/index/{indexId}/documents/{documentId}/content:
    get:
      operationId: GetDocumentContent
      summary: Get Document Content
      description: Retrieves the content of a document that was ingested into Amazon Q Business. This API validates user authorization
        against document ACLs before returning a pre-signed URL for secure document access. You can download or view source
        documents referenced in chat responses through the URL.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDocumentContentResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '500':
          description: InternalServerException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
        '400':
          description: ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationException'
      parameters:
      - name: applicationId
        in: path
        required: true
        schema:
          type: string
        description: The unique identifier of the Amazon Q Business application containing the document. This ensures the
          request is scoped to the correct application environment and its associated security policies.
      - name: indexId
        in: path
        required: true
        schema:
          type: string
        description: The identifier of the index where documents are indexed.
      - name: dataSourceId
        in: query
        schema:
          type: string
        description: The identifier of the data source from which the document was ingested. This field is not present if
          the document is ingested by directly calling the BatchPutDocument API. If the document is from a file-upload data
          source, the datasource will be "uploaded-docs-file-stat-datasourceid".
      - name: documentId
        in: path
        required: true
        schema:
          type: string
        description: The unique identifier of the document that is indexed via BatchPutDocument API or file-upload or connector
          sync. It is also found in chat or chatSync response.
      - name: outputFormat
        in: query
        schema:
          type: string
          enum:
          - RAW
          - EXTRACTED
        description: Document outputFormat. Defaults to RAW if not selected.
      tags:
      - Contents
      servers:
      - url: https://qbusiness.{region}.amazonaws.com
        variables:
          region:
            default: us-east-1
      security:
      - sigv4_qbusiness: []
  /knowledgeBases/{knowledgeBaseId}/contents:
    post:
      operationId: CreateContent
      summary: Create Content
      description: Creates Amazon Q in Connect content. Before to calling this API, use StartContentUpload to upload an asset.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateContentResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WisdomAccessDeniedException'
        '409':
          description: ConflictException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WisdomConflictException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WisdomResourceNotFoundException'
        '402':
          description: ServiceQuotaExceededException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WisdomServiceQuotaExceededException'
        '401':
          description: UnauthorizedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WisdomUnauthorizedException'
        '400':
          description: ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WisdomValidationException'
      parameters:
      - name: knowledgeBaseId
        in: path
        required: true
        schema:
          type: string
        description: The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base. Can be
          either the ID or the ARN. URLs cannot contain the ARN.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 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 SearchContent
                    API.
                title:
                  type: string
                  description: The title of the content. If not set, the title is equal to the name.
                overrideLinkOutUri:
                  type: string
                  description: 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:
                  type: object
                  additionalProperties:
                    type: string
                  description: 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:
                  type: string
                  description: A pointer to the uploaded asset. This value is returned by StartContentUpload.
                clientToken:
                  type: string
                  description: 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 Making retries safe with idempotent APIs.
                tags:
                  type: object
                  additionalProperties:
                    type: string
                  description: The tags used to organize, track, or control access for this resource.
              required:
              - name
              - uploadId
      tags:
      - Contents
    get:
      operationId: ListContents
      summary: List Contents
      description: Lists the content.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListContentsResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WisdomAccessDeniedException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WisdomResourceNotFoundException'
        '400':
          description: ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WisdomValidationException'
      parameters:
      - name: nextToken
        in: query
        schema:
          type: string
        description: The token for the next set of results. Use the value returned in the previous response in the next request
          to retrieve the next set of results.
      - name: maxResults
        in: query
        schema:
          type: integer
        description: The maximum number of results to return per page.
      - name: knowledgeBaseId
        in: path
        required: true
        schema:
          type: string
        description: The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base. Can be
          either the ID or the ARN. URLs cannot contain the ARN.
      tags:
      - Contents
  /knowledgeBases/{knowledgeBaseId}/contents/{contentId}:
    get:
      operationId: GetContent
      summary: Get Content
      description: Retrieves content, including a pre-signed URL to download the content.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetContentResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WisdomAccessDeniedException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WisdomResourceNotFoundException'
        '401':
          description: UnauthorizedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WisdomUnauthorizedException'
        '400':
          description: ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WisdomValidationException'
      parameters:
      - name: contentId
        in: path
        required: true
        schema:
          type: string
        description: The identifier of the content. Can be either the ID or the ARN. URLs cannot contain the ARN.
      - name: knowledgeBaseId
        in: path
        required: true
        schema:
          type: string
        description: The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base. Can be
          either the ID or the ARN. URLs cannot contain the ARN.
      tags:
      - Contents
    post:
      operationId: UpdateContent
      summary: Update Content
      description: Updates information about the content.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateContentResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WisdomAccessDeniedException'
        '412':
          description: PreconditionFailedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreconditionFailedException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WisdomResourceNotFoundException'
        '401':
          description: UnauthorizedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WisdomUnauthorizedException'
        '400':
          description: ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WisdomValidationException'
      parameters:
      - name: knowledgeBaseId
        in: path
        required: true
        schema:
          type: string
        description: The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base. Can be
          either the ID or the ARN
      - name: contentId
        in: path
        required: true
        schema:
          type: string
        description: The identifier of the content. Can be either the ID or the ARN. URLs cannot contain the ARN.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                revisionId:
                  type: string
                  description: The revisionId of the content resource to update, taken from an earlier call to GetContent,
                    GetContentSummary, SearchContent, or ListContents. If included, this argument acts as an optimistic lock
                    to ensure content was not modified since it was last read. If it has been modified, this API throws a
                    PreconditionFailedException.
                title:
                  type: string
                  description: The title of the content.
                overrideLinkOutUri:
                  type: string
                  description: The URI for the article. If the knowledge base has a templateUri, setting this argument overrides
                    it for this piece of content. To remove an existing overrideLinkOurUri, exclude this argument and set
                    removeOverrideLinkOutUri to true.
                removeOverrideLinkOutUri:
                  type: boolean
                  description: Unset the existing overrideLinkOutUri if it exists.
                metadata:
                  type: object
                  additionalProperties:
                    type: string
                  description: 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:
                  type: string
                  description: A pointer to the uploaded asset. This value is returned by StartContentUpload.
      tags:
      - Contents
    delete:
      operationId: DeleteContent
      summary: Delete Content
      description: Deletes the content.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteContentResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WisdomAccessDeniedException'
        '409':
          description: ConflictException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WisdomConflictException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WisdomResourceNotFoundException'
        '401':
          description: UnauthorizedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WisdomUnauthorizedException'
        '400':
          description: ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WisdomValidationException'
      parameters:
      - name: knowledgeBaseId
        in: path
        required: true
        schema:
          type: string
        description: The identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.
      - name: contentId
        in: path
        required: true
        schema:
          type: string
        description: The identifier of the content. Can be either the ID or the ARN. URLs cannot contain the ARN.
      tags:
      - Contents
components:
  securitySchemes:
    sigv4:
      type: apiKey
      in: header
      name: Authorization
      description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical
        request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
      x-aws-sigv4:
        signingName: wisdom
    sigv4_qbusiness:
      type: apiKey
      in: header
      name: Authorization
      description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical
        request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
      x-aws-sigv4:
        signingName: qbusiness
  schemas:
    AccessDeniedException:
      type: object
      properties:
        message:
          type: string
      required:
      - message
    ContentData:
      type: object
      properties:
        contentArn:
          type: string
          description: The Amazon Resource Name (ARN) of the content.
        contentId:
          type: string
          description: The identifier of the content.
        knowledgeBaseArn:
          type: string
          description: The Amazon Resource Name (ARN) of the knowledge base.
        knowledgeBaseId:
          type: string
          description: The identifier of the knowledge base.
        name:
          type: string
          description: The name of the content.
        revisionId:
          type: string
          description: The identifier of the content revision.
        title:
          type: string
          description: The title of the content.
        contentType:
          type: string
          description: The media type of the content.
        status:
          type: string
          description: The status of the content.
        metadata:
          type: object
          additionalProperties:
            type: string
          description: 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:
          type: object
          additionalProperties:
            type: string
          description: The tags used to organize, track, or control access for this resource.
        linkOutUri:
          type: string
          description: The URI of the content.
        url:
          type: string
          description: The URL of the content.
        urlExpiry:
          type: string
          description: The expiration time of the URL as an epoch timestamp.
        lastModifiedTime:
          type: string
          description: The timestamp when the content was last modified.
        lastModifiedRegion:
          type: string
          description: The Amazon Web Services Region where the content was last modified.
        fileHash:
          type: string
          description: The Base64-encoded SHA-256 hash of the content file. Amazon Connect Global Resiliency returns this
            field only for replicated content.
      required:
      - contentArn
      - contentId
      - knowledgeBaseArn
      - knowledgeBaseId
      - name
      - revisionId
      - title
      - contentType
      - status
      - metadata
      - url
      - urlExpiry
    ContentSummary:
      type: object
      properties:
        contentArn:
          type: string
          description: The Amazon Resource Name (ARN) of the content.
        contentId:
          type: string
          description: The identifier of the content.
        knowledgeBaseArn:
          type: string
          description: The Amazon Resource Name (ARN) of the knowledge base.
        knowledgeBaseId:
          type: string
          description: The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base.
        name:
          type: string
          description: The name of the content.
        revisionId:
          type: string
          description: The identifier of the revision of the content.
        title:
          type: string
          description: The title of the content.
        contentType:
          type: string
          description: The media type of the content.
        status:
          type: string
          description: The status of the content.
        metadata:
          type: object
          additionalProperties:
            type: string
          description: 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:
          type: object
          additionalProperties:
            type: string
          description: The tags used to organize, track, or control access for this resource.
        lastModifiedTime:
          type: string
          description: The timestamp when the content was last modified.
        lastModifiedRegion:
          type: string
          description: The Amazon Web Services Region where the content was last modified.
        fileHash:
          type: string
          description: The Base64-encoded SHA-256 hash of the content file. Amazon Connect Global Resiliency returns this
            field only for replicated content.
      required:
      - contentArn
      - contentId
      - knowledgeBaseArn
      - knowledgeBaseId
      - name
      - revisionId
      - title
      - contentType
      - status
      - metadata
    CreateContentResponse:
      type: object
      properties:
        content:
          $ref: '#/components/schemas/ContentData'
    DeleteContentResponse:
      type: object
      properties: {}
    GetContentResponse:
      type: object
      properties:
        content:
          $ref: '#/components/schemas/ContentData'
    GetDocumentContentResponse:
      type: object
      properties:
        presignedUrl:
          type: string
          description: A pre-signed URL that provides temporary access to download the document content directly from Amazon
            Q Business. The URL expires after 5 minutes for security purposes. This URL is generated only after successful
            ACL validation.
        mimeType:
          type: string
          description: The MIME type of the document content. When outputFormat is RAW, this corresponds to the original document's
            MIME type (e.g., application/pdf, text/plain, application/vnd.openxmlformats-officedocument.wordprocessingml.document).
            When outputFormat is EXTRACTED, the MIME type is always application/json.
      required:
      - presignedUrl
      - mimeType
    InternalServerException:
      type: object
      properties:
        message:
          type: string
      required:
      - message
    ListContentsResponse:
      type: object
      properties:
        contentSummaries:
          type: array
          items:
            $ref: '#/components/schemas/ContentSummary'
          description: Information about the content.
        nextToken:
          type: string
          description: If there are additional results, this is the token for the next set of results.
      required:
      - contentSummaries
    PreconditionFailedException:
      type: object
      properties:
        message:
          type: string
    ResourceNotFoundException:
      type: object
      properties:
        message:
          type: string
          description: The message describing a ResourceNotFoundException.
        resourceId:
          type: string
          description: The identifier of the resource affected.
        resourceType:
          type: string
          description: The type of the resource affected.
      required:
      - message
      - resourceId
      - resourceType
    ThrottlingException:
      type: object
      properties:
        message:
          type: string
      required:
      - message
    UpdateContentResponse:
      type: object
      properties:
        content:
          $ref: '#/components/schemas/ContentData'
    ValidationException:
      type: object
      properties:
        message:
          type: string
          description: The message describing the ValidationException.
        reason:
          type: string
          enum:
          - CANNOT_PARSE
          - FIELD_VALIDATION_FAILED
          - UNKNOWN_OPERATION
          description: The reason for the ValidationException.
        fields:
          type: array
          items:
            $ref: '#/components/schemas/ValidationExceptionField'
          description: The input field(s) that failed validation.
      required:
      - message
      - reason
    ValidationExceptionField:
      type: object
      properties:
        name:
          type: string
          description: The field name where the invalid entry was detected.
        message:
          type: string
          description: A message about the validation exception.
      required:
      - name
      - message
    WisdomAccessDeniedException:
      type: object
      properties:
        message:
          type: string
    WisdomConflictException:
      type: object
      properties:
        message:
          type: string
    WisdomResourceNotFoundException:
      type: object
      properties:
        message:
          type: string
        resourceName:
          type: string
          description: The specified resource name.
    WisdomServiceQuotaExceededException:
      type: object
      properties:
        message:
          type: string
    WisdomUnauthorizedException:
      type: object
      properties:
        message:
          type: string
    WisdomValidationException:
      type: object
      properties:
        message:
          type: string
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/qconnect/service/2020-10-19/qconnect-2020-10-19.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)
  sources:
  - https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/qconnect/service/2020-10-19/qconnect-2020-10-19.json
  - https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/qbusiness/service/2023-11-27/qbusiness-2023-11-27.json