Link an existing document
Link an existing visible document into a chat.
Authorizations
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
Body
Body for POST /api/v2/chats/<thread_id>/attachments/link/.
Links existing documents into the chat (Decision 8: LINK, not CLONE — the
doc's markdown / extraction / ES chunks are reused as-is, edits propagate).
Sources may be given as raw ChatAttachment PKs and/or BatchDocument
PKs (a batch row's underlying attachment). At least one list must be
non-empty.
Response
201 response for the link endpoint — the created/existing link rows.

