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

# Bulk upsert documents

> Bulk upsert documents into a collection. Note that the maximum supported object size is 200MB. Bulk upsert is not supported for collections with managed embedding vector fields.



## OpenAPI

````yaml post /collections/{collectionName}/docs/bulk-upsert
openapi: 3.1.1
info:
  title: LambdaDB API
  summary: LambdaDB Open API Spec
  version: 1.1.1
servers:
  - url: https://{projectHost}
    description: LambdaDB API endpoints
    variables:
      projectHost:
        description: The project-scoped URL of the API
        default: api.lambdadb.ai/projects/example-project
security: []
tags:
  - name: collections
  - name: collections.docs
paths:
  /collections/{collectionName}/docs/bulk-upsert:
    post:
      tags:
        - collections.docs
      description: >-
        Bulk upsert documents into a collection. Note that the maximum supported
        object size is 200MB. Bulk upsert is not supported for collections with
        managed embedding vector fields.
      operationId: bulkUpsertDocs
      parameters:
        - $ref: '#/components/parameters/CollectionName'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                objectKey:
                  type: string
                  description: Object key uploaded based on bulk upsert info.
              required:
                - objectKey
            examples:
              example:
                summary: Example request body for bulk upsert
                value:
                  objectKey: example-object-key
      responses:
        '202':
          description: Bulk upsert request accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                example:
                  summary: Example response for bulk upsert`
                  value:
                    message: Bulk upsert request is accepted
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              examples:
                managedEmbeddingUnsupported:
                  summary: >-
                    Example response for unsupported managed embedding bulk
                    upsert
                  value:
                    message: >-
                      Bulk upsert is not supported for collections with managed
                      embedding fields
                example:
                  summary: Example response for bad request
                  value:
                    message: Invalid request
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthenticated'
              examples:
                example:
                  summary: Example response for authentication failure
                  value:
                    message: Authentication failed
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
              examples:
                example:
                  summary: Example response for resource not found
                  value:
                    message: Resource not found
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequests'
              examples:
                example:
                  summary: Example response for too many requests
                  value:
                    message: Too many requests
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
              examples:
                example:
                  summary: Example response for internal server error
                  value:
                    message: Internal server error
      security:
        - ProjectApiKey: []
components:
  parameters:
    CollectionName:
      in: path
      name: collectionName
      description: Collection name.
      required: true
      schema:
        type: string
  schemas:
    MessageResponse:
      type: object
      properties:
        message:
          type: string
      required:
        - message
    BadRequest:
      title: BadRequest
      type: object
      properties:
        message:
          type: string
    Unauthenticated:
      title: Unauthenticated
      type: object
      properties:
        message:
          type: string
    ResourceNotFound:
      title: ResourceNotFound
      type: object
      properties:
        message:
          type: string
    TooManyRequests:
      title: TooManyRequests
      type: object
      properties:
        message:
          type: string
    InternalServerError:
      title: InternalServerError
      type: object
      properties:
        message:
          type: string
  securitySchemes:
    ProjectApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Project API Key.
      x-speakeasy-example: <YOUR_PROJECT_API_KEY>

````