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

# Submit a transcript correction (unified ingestion)

> Unified corrections ingestion for all kinds: line_edit, speaker_reassign, speaker_identify, add_person, entity_tag. Corrections are free (0 rows) and land as pending-review rows attributed to your API key; speaker_identify/add_person also create a community-flagged appearance immediately. Anchored kinds (line_edit, speaker_reassign, entity_tag) must echo the transcript `meta.revision` and an `anchor` ({ segmentIndex, contentHash: djb2 of the covered segment text }). Error semantics for outbox-style clients: 409 = revision/anchor mismatch — the transcript changed underneath the correction (body { reason, currentRevision }); drop or re-anchor the event and continue — the sequence number is consumed. 412 = seq mismatch (body { expectedSeq }); refetch the transcript, rebase local counters, and resend. Supports the Idempotency-Key header (client event UUID): replays return the stored final response verbatim with Idempotency-Replayed: true.



## OpenAPI

````yaml /openapi/arcmira-v1.json post /v1/videos/{video_id}/corrections
openapi: 3.1.0
info:
  title: Arcmira API
  version: 1.0.0
  contact:
    name: Arcmira
    url: https://arcmira.com
servers:
  - url: https://api.arcmira.com
security: []
paths:
  /v1/videos/{video_id}/corrections:
    post:
      tags:
        - Corrections
      summary: Submit a transcript correction (unified ingestion)
      description: >-
        Unified corrections ingestion for all kinds: line_edit,
        speaker_reassign, speaker_identify, add_person, entity_tag. Corrections
        are free (0 rows) and land as pending-review rows attributed to your API
        key; speaker_identify/add_person also create a community-flagged
        appearance immediately. Anchored kinds (line_edit, speaker_reassign,
        entity_tag) must echo the transcript `meta.revision` and an `anchor` ({
        segmentIndex, contentHash: djb2 of the covered segment text }). Error
        semantics for outbox-style clients: 409 = revision/anchor mismatch — the
        transcript changed underneath the correction (body { reason,
        currentRevision }); drop or re-anchor the event and continue — the
        sequence number is consumed. 412 = seq mismatch (body { expectedSeq });
        refetch the transcript, rebase local counters, and resend. Supports the
        Idempotency-Key header (client event UUID): replays return the stored
        final response verbatim with Idempotency-Replayed: true.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                kind:
                  type: string
                  enum:
                    - line_edit
                    - speaker_reassign
                    - speaker_identify
                    - add_person
                    - entity_tag
                seq:
                  type: integer
                  exclusiveMinimum: 0
                  description: >-
                    Per-video monotonic sequence number (strict FIFO per
                    user+video). Optional for one-off submissions; required for
                    outbox-style clients that depend on ordering. Any mismatch
                    returns 412 with the expected value.
                revision:
                  type: string
                  description: >-
                    The meta.revision from the transcript GET this correction
                    was made against. Required for line_edit, speaker_reassign,
                    and entity_tag.
                anchor:
                  type: object
                  properties:
                    segmentIndex:
                      type: integer
                      minimum: 0
                    contentHash:
                      type: string
                      minLength: 1
                      description: >-
                        djb2 hash of the covered segment text (joined with \n
                        for ranges), computed against your projected view of the
                        transcript.
                  required:
                    - segmentIndex
                    - contentHash
                  description: Required for line_edit, speaker_reassign, and entity_tag.
                payload:
                  type: object
                  additionalProperties: {}
                  description: >-
                    Kind-specific payload. line_edit: { segmentIndex,
                    originalText, correctedText }. speaker_reassign: {
                    selection: { startIndex, startChar, endIndex, endChar },
                    target: { kind: existing|new|role, speakerId, label?, role?
                    } }. speaker_identify: { speakerId, entityId }. add_person:
                    { speakerId, name }. entity_tag: { segmentIndex, charStart,
                    charEnd, entityId } or { segmentIndex, charStart, charEnd,
                    proposedName, proposedType }.
              required:
                - kind
                - payload
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema: {}
        '201':
          description: >-
            Correction accepted ({ ok, kind, result }; result.id withdraws it
            later)
          content:
            application/json:
              schema: {}
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      param:
                        type: string
                      doc_url:
                        type: string
                      request_id:
                        type: string
                    required:
                      - type
                      - code
                      - message
                      - doc_url
                      - request_id
                required:
                  - error
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      param:
                        type: string
                      doc_url:
                        type: string
                      request_id:
                        type: string
                    required:
                      - type
                      - code
                      - message
                      - doc_url
                      - request_id
                required:
                  - error
        '402':
          description: Quota exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      param:
                        type: string
                      doc_url:
                        type: string
                      request_id:
                        type: string
                    required:
                      - type
                      - code
                      - message
                      - doc_url
                      - request_id
                required:
                  - error
        '403':
          description: Permission error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      param:
                        type: string
                      doc_url:
                        type: string
                      request_id:
                        type: string
                    required:
                      - type
                      - code
                      - message
                      - doc_url
                      - request_id
                required:
                  - error
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      param:
                        type: string
                      doc_url:
                        type: string
                      request_id:
                        type: string
                    required:
                      - type
                      - code
                      - message
                      - doc_url
                      - request_id
                required:
                  - error
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      param:
                        type: string
                      doc_url:
                        type: string
                      request_id:
                        type: string
                    required:
                      - type
                      - code
                      - message
                      - doc_url
                      - request_id
                required:
                  - error
        '412':
          description: Sequence mismatch ({ expectedSeq }) — refetch, rebase, resend
          content:
            application/json:
              schema: {}
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      param:
                        type: string
                      doc_url:
                        type: string
                      request_id:
                        type: string
                    required:
                      - type
                      - code
                      - message
                      - doc_url
                      - request_id
                required:
                  - error
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      param:
                        type: string
                      doc_url:
                        type: string
                      request_id:
                        type: string
                    required:
                      - type
                      - code
                      - message
                      - doc_url
                      - request_id
                required:
                  - error
      security:
        - bearerAuth: []
        - apiKeyAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: arc_sk_*
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````