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

# Complete an ingest upload

> Mark a Black Hole upload complete after GCS put.

Agent signals the bytes are in GCS. The server verifies sha256 and claims RECEIVED. Do not retry a successful complete as a new register.


## OpenAPI

````yaml POST /api/v2/ingest/uploads/{item_id}/complete/
openapi: 3.1.0
info:
  title: Abacus Docs API
  version: 1.0.0
  description: |
    REST + SSE surface for Abacus Docs on the same host as the web app
    (`https://abacusdocs.com`). Paths are `/api/v2/…`.

    Authenticate with an organisation API key (`sk-abacus-*`) as a Bearer
    token, or an Auth0 access token. Cross-tenant reads return **404**, not
    403. Page-based lists use `?page=` and `?page_size=`.

    Extraction, reprocess, schema tests, and chat turns spend credits.
    See the help centre Credits pages for rates.
  contact:
    name: Abacus Docs
    url: https://abacusdocs.com/contact
servers:
  - url: https://abacusdocs.com
    description: Production (Extract)
security: []
paths:
  /api/v2/ingest/uploads/{item_id}/complete/:
    post:
      tags:
        - v2/ingest
      summary: Complete an upload (verify + land UNMATCHED)
      description: >-
        Verifies the landed object (CONTRACT §2.3 — size only; the sha256
        integrity check runs end-to-end in the processor) and claims
        ``PENDING_UPLOAD → UNMATCHED``. Does NOT enqueue classification (v1.2,
        clarification #14 — no classify-on-upload); the agent pins a schema via
        ``POST /items/{item_id}/match/`` or requests classification via ``POST
        /items/auto-match/``. Idempotent: replays answer 200 with the item's
        current state; a 409 ``object_mismatch`` means the agent must restart
        the upload. Requires the ``ingest:write`` scope on an Auth0 bearer JWT.
      operationId: v2_ingest_uploads_complete_create
      parameters:
        - in: path
          name: item_id
          schema:
            type: string
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadCompleteResponse'
          description: ''
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: ''
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: ''
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: ''
        '409':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: ''
        '426':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: ''
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: ''
      security:
        - bearerAuth: []
components:
  schemas:
    UploadCompleteResponse:
      type: object
      description: 200 body for the (idempotent) upload-complete call.
      properties:
        item_id:
          type: string
        state:
          type: string
      required:
        - item_id
        - state
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        Auth0 access token for a signed-in user. Send `Authorization: Bearer
        <token>`.

        The SPA and desktop agent use this. Prefer an organisation API key for

        server-to-server integrations.

````