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

> Update metadata for a file by its ID. This endpoint allows changing review status, tags, department, relevancy score, and file-specific metrics like page count or duration. Commonly used after review or processing is complete.



## OpenAPI

````yaml PATCH /files/{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:
  /files/{id}:
    patch:
      tags:
        - Files
      summary: PATCH /files/{id}
      description: >-
        Update metadata for a file by its ID. This endpoint allows changing
        review status, tags, department, relevancy score, and file-specific
        metrics like page count or duration. Commonly used after review or
        processing is complete.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: The unique file ID to update.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                reviewStatus:
                  type: string
                  enum:
                    - pending
                    - relevant
                    - irrelevant
                    - redacted
                  description: Current review state of the file.
                department:
                  type: string
                  description: Department responsible for the file.
                tags:
                  type: array
                  items:
                    type: string
                  description: List of tags or keywords assigned to the file.
                relevancyScore:
                  type: integer
                  minimum: 0
                  maximum: 100
                  description: Numeric score indicating relevancy confidence.
                pages:
                  type: integer
                  nullable: true
                  description: Total number of pages (if applicable).
                duration:
                  type: integer
                  nullable: true
                  description: Total duration in seconds for media files.
      responses:
        '200':
          description: File updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Files'
        '400':
          description: Invalid input payload.
        '401':
          description: Unauthorized (missing or invalid token).
        '404':
          description: File not found.
        '500':
          description: Internal server error.
components:
  schemas:
    Files:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: 6ff9fff2-027a-48a0-a5c1-bd2c6e5c03e7
          description: id field from files09192347.
        org_id:
          type: string
          format: uuid
          example: 743db90f-7e76-49f7-8d4e-5f42a16efc06
          description: org_id field from files09192347.
        name:
          type: string
          example: foia_correspondence.mbox
          description: name field from files09192347.
        size_bytes:
          type: integer
          example: 997
          description: size_bytes field from files09192347.
        mime_type:
          type: string
          example: application/octet-stream
          description: mime_type field from files09192347.
        department:
          type: string
          example: Unknown
          description: department field from files09192347.
        tags:
          type: string
          example: '{}'
          description: tags field from files09192347.
        relevancy_score:
          type: integer
          example: 0
          description: relevancy_score field from files09192347.
        review_status:
          type: string
          example: pending
          description: review_status field from files09192347.
        pages:
          type: number
          description: pages field from files09192347.
        duration_seconds:
          type: number
          description: duration_seconds field from files09192347.
        s3_bucket:
          type: string
          example: foia-dev-andromeda
          description: s3_bucket field from files09192347.
        s3_key:
          type: string
          example: >-
            743db90f-7e76-49f7-8d4e-5f42a16efc06/raw/e863a541-0832-4bce-abb8-11f32ffe5e3b/foia_correspondence.mbox
          description: s3_key field from files09192347.
        created_by:
          type: string
          format: uuid
          example: ab99f432-1141-43bf-a826-ea015838179f
          description: created_by field from files09192347.
        uploaded_at:
          type: string
          example: 2025-08-29 10:28:48.713 -0500
          description: uploaded_at field from files09192347.
        updated_at:
          type: string
          example: 2025-08-29 10:28:48.713 -0500
          description: updated_at field from files09192347.
        s3_bucket_original:
          type: string
          example: foia-dev-andromeda
          description: s3_bucket_original field from files09192347.
        s3_key_original:
          type: string
          example: >-
            743db90f-7e76-49f7-8d4e-5f42a16efc06/raw/e863a541-0832-4bce-abb8-11f32ffe5e3b/foia_correspondence.mbox
          description: s3_key_original field from files09192347.
        s3_bucket_parsed:
          type: string
          example: foia-dev-andromeda-parse
          description: s3_bucket_parsed field from files09192347.
        s3_key_parsed:
          type: string
          example: >-
            parsed/743db90f-7e76-49f7-8d4e-5f42a16efc06/Zm9pYS1kZXYtYW5kcm9tZWRhLzc0M2RiOTBmLTdlNzYtNDlmNy04ZDRlLTVmNDJhMTZlZmMwNi9yYXcvMmUxZjE5NzUtNDBjYy00YmY1LThmNzctN2VjYTkwMjhmMjFjL0Rpc3BhdGNoIEMyMy0wMTE1OC5wZGY.json
          description: s3_key_parsed field from files09192347.
        ingestion_mode:
          type: string
          enum:
            - default
            - policy
          example: policy
          description: >-
            Indicates how the file was ingested. `policy` files are policy
            documents used to drive redaction rules.
      additionalProperties: false
      description: Schema inferred from files dataset.
      example:
        id: 6ff9fff2-027a-48a0-a5c1-bd2c6e5c03e7
        org_id: 743db90f-7e76-49f7-8d4e-5f42a16efc06
        name: foia_correspondence.mbox
        size_bytes: 997
        mime_type: application/octet-stream
        department: Unknown
        tags: '{}'
        relevancy_score: 0
        review_status: pending
        pages: null
        duration_seconds: null
        s3_bucket: foia-dev-andromeda
        s3_key: >-
          743db90f-7e76-49f7-8d4e-5f42a16efc06/raw/e863a541-0832-4bce-abb8-11f32ffe5e3b/foia_correspondence.mbox
        created_by: ab99f432-1141-43bf-a826-ea015838179f
        uploaded_at: 2025-08-29 10:28:48.713 -0500
        updated_at: 2025-08-29 10:28:48.713 -0500
        s3_bucket_original: foia-dev-andromeda
        s3_key_original: >-
          743db90f-7e76-49f7-8d4e-5f42a16efc06/raw/e863a541-0832-4bce-abb8-11f32ffe5e3b/foia_correspondence.mbox
        s3_bucket_parsed: null
        s3_key_parsed: null
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````