> ## Documentation Index
> Fetch the complete documentation index at: https://wrtntechnologies.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Upsert documents

> Upsert documents into an index. Note that the maximum supported payload size is 6MB.



## OpenAPI

````yaml post /projects/{projectId}/indexes/{indexName}/docs/upsert
openapi: 3.1.1
info:
  title: Wrtn AIMP API
  summary: Wrtn AIMP Open API Spec
  version: 1.0.0
servers:
  - url: https://{baseUrl}/{version}
    description: AIMP API endpoints
    variables:
      baseUrl:
        enum:
          - qqcyn6e2xc.execute-api.ap-northeast-2.amazonaws.com
        default: qqcyn6e2xc.execute-api.ap-northeast-2.amazonaws.com
      version:
        enum:
          - v1beta1
        default: v1beta1
security: []
paths:
  /projects/{projectId}/indexes/{indexName}/docs/upsert:
    post:
      description: >-
        Upsert documents into an index. Note that the maximum supported payload
        size is 6MB.
      parameters:
        - $ref: '#/components/parameters/ContentType'
        - $ref: '#/components/parameters/ProjectApiKey'
        - $ref: '#/components/parameters/ProjectId'
        - $ref: '#/components/parameters/IndexName'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                documents:
                  type: array
                  items:
                    type: object
                  description: A list of documents to upsert.
              required:
                - documents
      responses:
        '202':
          description: Upsert request accepted.
components:
  parameters:
    ContentType:
      in: header
      name: content-type
      required: true
      schema:
        type: string
        default: application/json
    ProjectApiKey:
      in: header
      name: x-api-key
      description: Project API Key.
      required: true
      schema:
        type: string
        description: Project API Key.
    ProjectId:
      in: path
      name: projectId
      description: Project ID.
      required: true
      schema:
        type: string
    IndexName:
      in: path
      name: indexName
      description: Index name.
      required: true
      schema:
        type: string

````