Skip to main content
GET
List batches visible to the caller
Batches the caller can see (owner, org admin, approved library share, accepted direct share). Newest first. page_size defaults to 24, clamped to 1–100. ?search= matches the batch name. Optional ?thread_id= restricts the list to batches that chat may attach — same scope as POST /api/v2/chats/{thread_id}/batch-attachments/.

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.

Query Parameters

page
integer

1-indexed page number. Defaults to 1.

page_size
integer

Rows per page. Defaults to 24; clamped to [1, 100].

Case-insensitive substring match against Batch.name. Trimmed and truncated to 100 characters.

thread_id
string

Optional chat thread id. Visibility always resolves against the caller's own organization; supplying a thread the caller does not own in it returns an empty page instead of the full list, matching the scope of POST /api/v2/chats/<thread_id>/batch-attachments/. Use from the chat picker modal so the offered batches match what the attach endpoint will accept.

Response

200 - application/json

Top-level response shape for GET /api/v2/batches/.

Page-based pagination (mirrors batch_library_documents so the JS can reuse the same paging widget). has_more is server-computed to avoid the SPA inferring it from page * page_size < total (which would be wrong for a partial last page).

batches
object[]
required
page
integer
required
Required range: x >= 1
page_size
integer
required
Required range: x >= 1
total
integer
required
Required range: x >= 0
has_more
boolean
required