Skip to main content
POST
/
projects
/
{project_id}
/
documents
/
{document_id}
/
metadata-add
Add metadata to a document
import requests

url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/documents/{document_id}/metadata-add/"

payload = {
    "key": "category",
    "value": "Finance"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "file": "<string>",
  "content_type": "application/pdf",
  "computed_pdf_file": "<string>",
  "source": "upload",
  "source_metadata": {},
  "page_count": 123,
  "file_size": 123,
  "metadata": [
    [
      "category",
      "Finance"
    ],
    [
      "region",
      "EMEA"
    ]
  ],
  "status": "active"
}

Documentation Index

Fetch the complete documentation index at: https://docs.clarifeye.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Use Authorization: Bearer

Path Parameters

project_id
string<uuid>
required

UUID of the project

document_id
string<uuid>
required

UUID of the document

Body

application/json
key
string
required

Metadata key

value
string
required

Metadata value

Response

Metadata added successfully

id
string<uuid>
name
string

Document filename

file
string<uri>

URL to the document file

content_type
string

MIME type of the document

Example:

"application/pdf"

computed_pdf_file
string<uri> | null

URL to generated PDF version (if applicable)

source
enum<string>

Origin of the document

Available options:
upload,
connector
source_metadata
object

Metadata about the document source

page_count
integer | null

Number of pages in the document

file_size
integer | null

File size in bytes

metadata
string[][]

List of key-value metadata pairs. Each element is a two-element array [key, value]. Requires the project to use the auto-sync data versioning option.

Required array length: 2 elements
Example:
[["category", "Finance"], ["region", "EMEA"]]
status
enum<string>

Document deletion status

Available options:
active,
deleting,
deleted