> ## 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.

# Get bulk upsert URL

> Request required info to upload documents. Native embedding collections are supported with caller-supplied vectors. Bulk never generates embeddings: a present source without its vector fails before any documents are committed (empty image arrays are skipped). Upload with the returned method, type as Content-Type, and signed headers. PUT is create-only: reusing an uploaded object can return object-storage 412. Get a new URL for a new upload attempt and resolve uncertain prior outcomes before resubmitting. The object key is bound to the original branch identity and cannot be reused after branch recreation.



## OpenAPI

````yaml get /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
    description: Create, describe, configure, list, and delete collections.
  - name: versioning
    description: Manage branches, tags, and aliases within a collection.
  - name: collections.docs
    description: Write, fetch, list, and bulk upload documents.
paths:
  /collections/{collectionName}/docs/bulk-upsert:
    get:
      tags:
        - collections.docs
      summary: Get a Bulk Upsert URL
      description: >-
        Request required info to upload documents. Native embedding collections
        are supported with caller-supplied vectors. Bulk never generates
        embeddings: a present source without its vector fails before any
        documents are committed (empty image arrays are skipped). Upload with
        the returned method, type as Content-Type, and signed headers. PUT is
        create-only: reusing an uploaded object can return object-storage 412.
        Get a new URL for a new upload attempt and resolve uncertain prior
        outcomes before resubmitting. The object key is bound to the original
        branch identity and cannot be reused after branch recreation.
      operationId: getBulkUpsertDocs
      parameters:
        - $ref: '#/components/parameters/CollectionName'
        - $ref: '#/components/parameters/BranchQuery'
      responses:
        '200':
          description: Required info to upload documents.
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                    description: Presigned URL.
                  type:
                    type: string
                    description: >-
                      Content type that must be specified when uploading
                      documents.
                    default: application/json
                    enum:
                      - application/json
                  httpMethod:
                    type: string
                    description: >-
                      HTTP method that must be specified when uploading
                      documents.
                    default: PUT
                    enum:
                      - PUT
                  objectKey:
                    type: string
                    description: >-
                      Object key that must be specified when uploading
                      documents.
                  sizeLimitBytes:
                    type: integer
                    description: Object size limit in bytes.
                    default: 209715200
                  headers:
                    type: object
                    description: >-
                      Signed headers to forward unchanged on the presigned PUT,
                      in addition to Content-Type from type.
                    additionalProperties:
                      type: string
                required:
                  - url
                  - type
                  - httpMethod
                  - objectKey
                  - sizeLimitBytes
                  - headers
              examples:
                example:
                  summary: Example response for bulk upsert info
                  value:
                    url: <S3 presigned URL>
                    type: application/json
                    httpMethod: PUT
                    objectKey: example-object-key
                    sizeLimitBytes: 209715200
                    headers:
                      If-None-Match: '*'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              examples:
                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
          headers:
            Retry-After:
              description: >-
                Optional retry delay in seconds. Not present on every 429
                response.
              schema:
                type: string
        '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
        '502':
          $ref: '#/components/responses/BadGateway'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      security:
        - ProjectApiKey: []
components:
  parameters:
    CollectionName:
      in: path
      name: collectionName
      description: Collection name.
      required: true
      schema:
        type: string
    BranchQuery:
      in: query
      name: branch
      description: Write target branch. Defaults to main.
      schema:
        type: string
        minLength: 3
        maxLength: 52
        pattern: ^[a-zA-Z0-9_-]{3,52}$
  schemas:
    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
    MessageResponse:
      type: object
      properties:
        message:
          type: string
      required:
        - message
  responses:
    BadGateway:
      description: >-
        Unexpected downstream failure. A failed write response may leave its
        outcome uncertain.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
    ServiceUnavailable:
      description: >-
        Transient catalog or storage dependency failure. Use bounded retries
        where the operation permits.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
    GatewayTimeout:
      description: >-
        Gateway request deadline exceeded. A write may have been applied; verify
        its outcome before retrying.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
  securitySchemes:
    ProjectApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Project API Key.
      x-speakeasy-example: <YOUR_PROJECT_API_KEY>

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.