v2

latestOpenAPI 3.1.02026-08-0382170235.8 KB
context-attachments

List context_attachments for a document

Returns all attachments for the document in stable chronological order (by attachment_id, which is a UUIDv7 — the leading bytes encode the creation timestamp, so attachment_id order equals creation order for all practical purposes). Capped at 5 items per document, so no pagination is needed.

get/documents/{document_id}/context-attachments

Path parameters

document_idstring uuid required

Response

List of attachments (possibly empty)

attachment_idstring uuid

UUIDv7 — chronologically sortable. Stable order for prompt assembly.

workspace_idstring uuid required

Owning workspace; multi-tenant isolation key.

document_idstring uuid required

Document this attachment travels with.

type'author_note' | 'json_schema' required

Vocabulary label (see CreateRequest).

namestring required
content_textstring nullable

Set for inline (≤16KB) attachments. Mutually exclusive with s3_key — see the model_validator below.

s3_keystring nullable

Set for >16KB attachments stored on the FileStorageBackend. Mutually exclusive with content_text. The repository computes this; callers never set it via the create endpoint.

mime_type'text/plain' | 'application/json' | 'application/schema+json' required

MIME type of the payload (text/plain | application/json | application/schema+json).

byte_sizeinteger required

Encoded UTF-8 byte size of the payload. Used for cap math at extract time.

created_atstring date-time