HTTP API
List documents
const url = 'https://sergo.example.com/v1/documents';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://sergo.example.com/v1/documents \ --header 'Authorization: Bearer <token>'The documents the key can read, newest first.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Responses
Section titled “Responses”Successful Response
object
object
The file name, with its extension
The folder it is in
The page numbers are estimates, for a file without pages of its own
How many chunks of text processing made
All its chunks are in the search index
Pages whose text may miss a figure, chart or table — worth looking at as a picture
object
none (never processed: Not processed), queued, running, done or failed
No processor for this is running — it carries on when one starts
Things to know, such as pages with no text
For a file uploaded with preset_id that a model reads: whether it started
object
measuring: waiting for a page count before it starts. rejected: it was not processed
People this file was shared with on its own
object
The person’s username — it may be an email address
The person’s display name
object
The person’s username — it may be an email address
The person’s display name
Example
{ "items": [ { "chunk_count": 14, "folder_id": "Hn3pX7cR", "format": "pdf", "id": "4kTq8Wmz", "indexed": true, "name": "Leave policy.pdf", "page_count": 12, "pages_estimated": false, "pages_to_view": [ 5 ], "processing": { "changed_at": "2026-11-02T09:14:03+00:00", "preset": { "id": "basic", "name": "Basic" }, "processor": { "id": "read-pdf.pypdfium2", "name": "PDF text layer" }, "stalled": false, "state": "done", "warnings": [] }, "shared_with": [], "size_bytes": 482113, "uploaded_at": "2026-11-02T09:13:51+00:00", "uploaded_by": { "name": "Ava Bennett", "username": "ava-hr" } } ]}Validation Error
object
What was wrong, field by field
Example
{ "code": "invalid_request"}