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

# Update Video Detection

> Update an existing video detection record by its unique ID. This endpoint allows modifying detection data or reassigning the detection run to a different case. Commonly used when post-processing detections, adding new results, or associating an existing detection job with a case for organizational purposes. All updates are applied atomically.



## OpenAPI

````yaml PATCH /video-detections/{id}
openapi: 3.0.1
info:
  title: Indora Labs API
  description: >-
    Comprehensive API for search, ingestion, file ops, redaction, detections,
    audit trail, and case management. All endpoints return strongly-typed JSON
    with explicit field descriptions and examples.
  version: 1.0.0
  license:
    name: Proprietary
servers:
  - url: https://api.indoralabs.com
security:
  - apiKeyAuth: []
tags:
  - name: Search
  - name: Uploads
  - name: Files
  - name: Redactions
  - name: Detections
  - name: Cases
  - name: Audit
  - name: Auth
  - name: Embeddings
  - name: Policy
paths:
  /video-detections/{id}:
    patch:
      tags:
        - Detections
      summary: PATCH /video-detections/{id}
      description: >-
        Update an existing video detection record by its unique ID. This
        endpoint allows modifying detection data or reassigning the detection
        run to a different case. Commonly used when post-processing detections,
        adding new results, or associating an existing detection job with a case
        for organizational purposes. All updates are applied atomically.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: The unique ID of the video detection run to update.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                detections:
                  type: array
                  items:
                    type: object
                  description: >-
                    An optional array of detection objects, representing new or
                    updated detection data. Each detection entry may include
                    bounding boxes, timestamps, labels, or confidence scores. If
                    provided, this array replaces the existing detections for
                    the specified run.
                caseId:
                  type: string
                  format: uuid
                  nullable: true
                  description: >-
                    An optional Case ID to link this detection run to. Use
                    `null` to clear any existing case association.
              description: >-
                Fields to update on the specified video detection record. At
                least one property must be present.
            examples:
              updateDetections:
                summary: 'Example: Replace detection array'
                value:
                  detections:
                    - frame: 123
                      label: Face
                      confidence: 0.92
                    - frame: 140
                      label: LicensePlate
                      confidence: 0.85
              assignCase:
                summary: 'Example: Assign detection to a case'
                value:
                  caseId: b37f2a74-99a1-4a61-8cfb-973344dfcf21
      responses:
        '200':
          description: Detection record successfully updated.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detection:
                    $ref: '#/components/schemas/VideoDetections'
        '400':
          description: Invalid input or malformed payload.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized (missing or invalid token).
        '404':
          description: Detection record not found.
        '500':
          description: Internal server error while updating detection record.
components:
  schemas:
    VideoDetections:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: d2f0cf30-b573-4797-97d4-aaab3ec2c5f1
          description: id field from video_detections09192349.
        tenant_id:
          type: string
          format: uuid
          example: 743db90f-7e76-49f7-8d4e-5f42a16efc06
          description: tenant_id field from video_detections09192349.
        file_id:
          type: string
          format: uuid
          example: de13d372-a870-4eea-b975-9060d442f38c
          description: file_id field from video_detections09192349.
        case_id:
          type: number
          description: case_id field from video_detections09192349.
        doc_id:
          type: string
          format: uuid
          example: de13d372-a870-4eea-b975-9060d442f38c
          description: doc_id field from video_detections09192349.
        detections:
          type: string
          example: '[]'
          description: detections field from video_detections09192349.
        created_at:
          type: string
          example: 2025-09-07 13:48:43.927 -0500
          description: created_at field from video_detections09192349.
      additionalProperties: false
      description: Schema inferred from video_detections dataset.
      example:
        id: d2f0cf30-b573-4797-97d4-aaab3ec2c5f1
        tenant_id: 743db90f-7e76-49f7-8d4e-5f42a16efc06
        file_id: de13d372-a870-4eea-b975-9060d442f38c
        case_id: null
        doc_id: de13d372-a870-4eea-b975-9060d442f38c
        detections: '[]'
        created_at: 2025-09-07 13:48:43.927 -0500
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
          description: Short error code or category.
        message:
          type: string
          description: Human-readable error explanation.
        details:
          type: object
          description: Optional structured error details for debugging.
      example:
        error: BadRequest
        message: Missing required parameter 'fileId'.
        details:
          param: fileId
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````