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

# Latest ingest batch

> Get the latest default batch for an ingest schema.

The default black-hole batch for one participating schema. Auth0 + allowlist.


## OpenAPI

````yaml GET /api/v2/ingest/schemas/{slug}/batches/latest/
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/schemas/{slug}/batches/latest/:
    get:
      tags:
        - v2/ingest
      summary: Latest batch filed for a schema
      description: >-
        Most recent non-cancelled batch whose default struct matches ``slug``
        (CONTRACT §2.8) — powers the agent's 'Add to latest' label. Unknown slug
        → 404. Requires ``ingest:read``.
      operationId: v2_ingest_schemas_batches_latest_retrieve
      parameters:
        - in: path
          name: slug
          schema:
            type: string
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LatestBatchResponse'
          description: ''
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: ''
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: ''
        '426':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: ''
      security:
        - bearerAuth: []
components:
  schemas:
    LatestBatchResponse:
      type: object
      description: >-
        200 body of GET /api/v2/ingest/schemas/<slug>/batches/latest/ (CONTRACT
        §2.8).
      properties:
        batch:
          oneOf:
            - $ref: '#/components/schemas/BatchInfo'
            - type: 'null'
      required:
        - batch
    BatchInfo:
      type: object
      description: '``{id, name, web_url}`` — the batch shape shared by §2.8/§2.9.'
      properties:
        id:
          type: integer
          description: 'The integer Batch PK (contract clarification #2).'
        name:
          type: string
        web_url:
          type: string
      required:
        - id
        - name
        - web_url
  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.

````