Resolve citation links in a batch
Batch form of the single-doc citation resolver - the N+1
replacement for calling GET /documents/{document_id}/source_url
once per search hit. Resolves up to 50 documents in one
round-trip. Authorization is on the KNOWLEDGE BASE (reader+),
the same boundary as /search and the single-doc resolver: a
caller who can search the store already reads its chunks, so a
source URL follows the store ACL.
Per-item failures are returned INLINE - a document not in this
knowledge base, a dangling native file, or a transient mint
failure never fails the whole batch, which always returns 200.
Each data entry is either a resolved document.source_url
object or a { document_id, error } item; a failed item carries
no object field, so detect it by the presence of error.
Technical item failures (error.technical: true, e.g.
MINT_FAILED / RESOLVE_FAILED) are retryable; business ones
(NOT_FOUND, SOURCE_UNAVAILABLE) are terminal.
Authorizations
User session JWT or instance API key (iak_*). Send as Authorization: Bearer <token>.
Path Parameters
Knowledge base id. Legacy physical prefix vs_ (the kb_ rename is deferred).
128^vs_[A-Za-z0-9-]+$Body
Document ids to resolve (1-50 per request). Bounded
strings, deliberately NOT pattern-constrained to
^vsf_ so legacy or backfilled ids still resolve.
1 - 50 elements1 - 128Optional override of the path parameter (body wins).
128Agent context for trusted-workspace authorization, used when a trusted product resolves citations on an end user's behalf.
128Response
One entry per requested document (order not guaranteed). Always 200, even when every item failed - inspect each entry.
Batch citation-resolution response. data holds one entry per
requested document, in no guaranteed order; each entry is either a
resolved document.source_url object or a per-item error object.
Even a fully-failed batch returns 200 - inspect every item.
list Result of the lazy citation resolver. For uploaded_file, the
URL is a short-lived native share URL minted BY THE STORAGE
WORKSPACE (not the user - a knowledge-base reader may have no
rights on the underlying file; chunk text is already readable
through search, so the source follows the knowledge base's ACL).
For all other source types, url is the document's
source_url as-is and expires_at is null.
- Option 1
- Option 2