---
title: "Set a DAM file's AI provenance flags"
method: PATCH
path: "/dam/files/{file_id}/provenance"
tags: ["DAM: Files"]
---

# Set a DAM file's AI provenance flags

`PATCH /dam/files/{file_id}/provenance`

## Request

- Base URL: `https://api.kontainer.com/jsonapi/v2`
- URL: `https://api.kontainer.com/jsonapi/v2/dam/files/{file_id}/provenance`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/kontainer/apis/kontainer-api-documentation/docs/dam/files/:file_id/provenance/patch.ts> (a function with typed inputs; its response is checked against the schema)

Sets the manual AI provenance flags on a file. Both attributes must be sent; sending false for both clears the flags. Only images, videos and audio files can be flagged, and files whose provenance comes from an embedded C2PA manifest are read-only.

## Path parameters

- `file_id` string, required

## Request body

- FileProvenanceUpdateRequest
  - `data` object, required
    - `type` string, required
    - `attributes` object, required
      - `is_ai_generated` boolean, required
      - `is_ai_manipulated` boolean, required

## Response `200`

success

- FileProvenanceResponse
  - `data` FileProvenance
    - `id` string
    - `type` string
    - `attributes` FileProvenanceAttributes
      - `is_ai_generated` boolean
      - `is_ai_manipulated` boolean
      - `has_c2pa` boolean
      - `source` 'MANUAL' | 'C2PA'
      - `is_editable` boolean
      - `claim_generator` string, nullable
      - `c2pa_created_at` string, nullable
      - `version` integer

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: File not found
- `422`: The file type does not support manual AI flags, or the flags are locked by an embedded C2PA manifest

---

[API](https://skmtc.dev/kontainer/apis/kontainer-api-documentation.md) - [All operations](https://skmtc.dev/kontainer/apis/kontainer-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/kontainer/apis/kontainer-api-documentation/revisions/b80a5167e09a?raw)
