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

# Submit tickets for analysis

> Submit a batch of ticket images for **tampering** detection. Each ticket can have an external ID that will be returned in the response for easier tracking.



## OpenAPI

````yaml post /api/v2/tampering/tickets
openapi: 3.0.0
info:
  title: IdentifAI API v2
  version: 2.0.0
  description: >-
    API v2 for batch tampering detection on ticket images. This API allows you
    to submit multiple tickets for analysis and retrieve results for tampering
    detection.
servers:
  - url: https://api.identifai.net
security: []
tags:
  - name: Tampering Detection
    description: Batch tampering detection endpoints
paths:
  /api/v2/tampering/tickets:
    post:
      tags:
        - Tampering Detection
      summary: Submit tickets for analysis
      description: >-
        Submit a batch of ticket images for **tampering** detection. Each ticket
        can have an external ID that will be returned in the response for easier
        tracking.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                tickets:
                  type: array
                  items:
                    type: string
                    format: binary
                  description: Array of ticket files (images or PDF) to analyze
                ref_ids:
                  type: string
                  description: >-
                    String containing a list of comma-separated ref_ids. The
                    number of items must match the length of tickets array if
                    provided.
                  example: Ticket-1, Ticket-2, Ticket-3
                models:
                  type: string
                  description: >-
                    Optional string of comma-separated model names to use for
                    tampering detection. If not given, all available models for
                    your tier will be used. If empty, no classification will be
                    performed.
                  example: Model-1, Model-2, Model-3
              required:
                - tickets
      responses:
        '200':
          description: >-
            Batch submission successful. Returns the list of analysis
            identifiers.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchSubmissionResponse'
              example:
                batch_id: 674a3c9b8e2d4f12b7c9a8d3
                total_tickets: 3
                submissions:
                  - identifier: 674a3c9b8e2d4f12b7c9a8d4
                    ref_id: Ticket-001
                  - identifier: 674a3c9b8e2d4f12b7c9a8d5
                    ref_id: Ticket-002
                  - identifier: 674a3c9b8e2d4f12b7c9a8d6
                    ref_id: Ticket-003
        '400':
          description: Bad request - Invalid input parameters
          content:
            application/json:
              example:
                error: Invalid request
                message: The number of ref_ids must match the number of tickets
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              example:
                error: Unauthorized
                message: Invalid or missing API key
        '413':
          description: Payload too large - Batch size exceeds limit
          content:
            application/json:
              example:
                error: Payload too large
                message: Maximum batch size is 10 tickets
      security:
        - ApiKeyAuth: []
components:
  schemas:
    BatchSubmissionResponse:
      type: object
      properties:
        batch_id:
          type: string
          description: Unique identifier for this batch submission
        total_tickets:
          type: integer
          description: Total number of tickets submitted in this batch
        submissions:
          type: array
          description: >-
            List of image submission identifiers created. The list could be
            greater than the number of tickets if multiple images have been
            extracted from a single ticket (e.g. PDF file). In this case,
            multiple submission will refer to the same ref_id.
          items:
            $ref: '#/components/schemas/AnalysisIdentifier'
    AnalysisIdentifier:
      type: object
      properties:
        identifier:
          type: string
          description: Internal analysis identifier
        ref_id:
          type: string
          description: Reference ID provided during submission (if any)
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````