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

# Confirming an Upload

Confirms the upload. See [Starting an Upload](/api-reference/document-resource-upload) for more details on the full upload workflow.


## OpenAPI

````yaml POST /api/v1/documents/confirm_upload
openapi: 3.1.0
info:
  description: >-
    The One Codex API (v1) -- programmatic access to One Codex's suite of
    microbial genomics data storage, analysis, and query tools.
  title: One Codex API (v1)
  version: v1
servers:
  - url: https://app.onecodex.com
security:
  - apiKeyAuth: []
paths:
  /api/v1/documents/confirm_upload:
    post:
      summary: POST documents instances_confirm_upload
      operationId: post_documents_instances_confirm_upload
      requestBody:
        content:
          application/json:
            schema:
              properties:
                document_id:
                  description: >-
                    The `document_id` returned by `/documents/init_upload`. Note
                    that the document will not be accessible via
                    `/documents/<id>` until the upload is confirmed.
                  title: Document Id
                  type: string
              required:
                - document_id
              title: DocumentConfirmUploadSchema
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  document:
                    description: A reference to the uploaded document.
                    properties:
                      __DOLLAR_REF__:
                        example: /api/v1/documents/a1b2c3d4e5f67890
                        format: uri
                        pattern: ^/api/v1/documents/[a-f0-9]{16}$
                        type: string
                    type: object
                  message:
                    description: A success or error message.
                    title: Message
                    type: string
                  success:
                    description: Whether the upload was successful.
                    title: Success
                    type: boolean
                required:
                  - document
                  - message
                  - success
                title: DocumentConfirmUploadResponse
                type: object
          description: OK
components:
  securitySchemes:
    apiKeyAuth:
      in: header
      name: X-API-Key
      type: apiKey

````