Skip to main content
POST

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].

Required array length: 2 elements
Example:
collection
object | null

The collection this document belongs to (the membership foreign key); null means the "Default" (uncategorised) bucket. A mirrored ["tag", slug] pair is also kept on metadata. Move a document with the set-collection action.

status
enum<string>

Document deletion status

Available options:
active,
deleting,
deleted
created_at
string<date-time>
read-only

When the document was added to the project.

created_by
object | null
read-only

The user who uploaded the document. Only returned to callers with admin permission on the project; null for non-admin callers. Also null for connector-imported documents (which are attributed to the connector, not a person) and for documents created before this was tracked.