Skip to main content
POST
Attach Knowledge Base file(s) to a chat
Copies a Knowledge Base file into the chat (clone, not a link). Session or bearer only — an org API key is refused. Extraction of the clone is billed like a new upload.

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

application/json

Body for POST /api/v2/chats/<thread_id>/attachments/kb/.

Attaches Knowledge Base files into the chat. Kept as CLONE (a fresh ChatAttachment is created from each KB file with is_from_kb=True) for back-compat with the legacy chat-upload behaviour — unlike the link endpoint, which shares one doc across chats.

kb_file_ids
integer[]
required

KnowledgeBase file PKs to clone into the chat as attachments.

Required range: x >= 1

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