Skip to main content
POST
Upload document(s) to a chat
Multipart upload into an existing Extract thread. Billed at the single-document page rate once extraction starts. Digital formats (docx/xlsx/…) only if digital uploads are enabled for the estate.

Authorizations

Authorization
string
header
required

Organisation API key from Settings → API / /api/keys/. The secret is shown once. Send Authorization: Bearer sk-abacus-…. One active key per organisation. Ingest (/api/v2/ingest/*) refuses API keys — that surface is Auth0-only with ingest:read / ingest:write scopes.

Path Parameters

thread_id
string
required

Body

Multipart body for POST /api/v2/chats/<thread_id>/attachments/.

Declared for drf-spectacular codegen only — the view reads request.FILES / request.data directly (DRF can't bind a ListField(FileField) from a multipart request into validated_data cleanly). The FileField marks the operation as multipart/form-data in the schema.

Fields: files: One or more documents to upload + process. struct_version_id: Optional schema (StructVersion PK) for schema-guided extraction. Opt-in (Decision 2) — omitted means OCR-only. Must be visible to the caller or the upload is rejected with 400. target_language: Optional ISO language code for a translation pass.

files
file[]
required

One or more document files to upload and process.

struct_version_id
integer

Optional StructVersion PK for schema-guided extraction (must be visible to the caller).

Required range: x >= 1
target_language
string

Optional ISO language code for a translation pass (e.g. 'en', 'ar').

Maximum string length: 10

Response

201 response for POST /api/v2/chats/<thread_id>/attachments/.

Lynx processing is dispatched in the background, so the created rows come back with processing_status='pending'; the SPA polls the list (or subscribes to the per-document stream in Task 16) for completion.

created
object[]
required
skipped_duplicates
object[]
required
skipped_unsupported
object[]
required