Endpoints
The calls an integration uses; the OpenAPI document is the full contract.
All paths are under https://sheaf.us/api.
| Call | What it does |
|---|---|
POST /guest | A guest key: your own sandbox with the sample case, no account, no body. Its limits: try it as a guest. |
POST /workflows/{workflowId}/runs | Run a workflow on a packet: creates the case, receives the PDFs, starts the run. |
GET /workflows | Your workflows, their versions, which one is the default. |
GET /workflows/{workflowId}/{version} | One version's steps, and the options each step pins. |
GET /models/options | Every stage of a run and its options, with the default marked. |
GET /expected-doc-lists | Your expected document lists and their versions. |
POST /applications | Create a case without running anything: expectedDocListId, version, applicantName. |
POST /applications/{id}/files | Add files to a case, multipart field files: PDFs, JPEG or PNG images, and HTML, markdown or plain-text files, within the limits. ?expectedDocId= declares what a file is for. |
GET /applications | Your cases, with how many lines of each list are satisfied and when each last changed. ?sort=recent (last changed first), ?limit= (1–200), ?q= (name contains). |
GET /applications/{id} | One case: run.state, run.stopped, its files, its pinned list. |
POST /applications/{id}/run/gate | Start a run on a case with its own options. |
POST /applications/{id}/run/tool | Run Extract over a case whose run has landed: { "tool": "extract", "decidedBy": "…" }. |
POST /applications/{id}/run/cancel | Stop the case's active workflow. The case goes back to where the run started. A preview cannot be stopped. |
DELETE /applications/{id}/run/stopped | Clear the last run that stopped (run.stopped). What it read stays stored. |
GET /applications/{id}/documents | Every document the case holds, filed or unmatched. |
GET /applications/{id}/analysis | The case's run records, with the extracted values. |
GET /intel-templates | The Intel templates a brief can answer. |
POST /applications/{id}/intel-briefs | Start a brief: { "templateId": "…" }. GET /applications/{id}/intel-briefs/{briefId} reads it. |
GET /applications/{id}/approved-docs/{approvedDocId}/file | A filed document's PDF. ?kind=md for its text. |
GET /applications/{id}/search | Search the case in one call: ?pattern= an exact regular expression over every line, or ?q= words, best pages first. Returns hits with file, page, line and text, a total that counts past the cap, and a count per document. A hit in a table is its row, the cells joined by |. |
GET /applications/{id}/text | The whole case as markdown in one response: every document's saved copy in page order, each with front matter naming the document and a marker before each page's text. A table is an HTML table inside the markdown, one row per line, with merged cells kept as colspan and rowspan; pages read before Oct 4 2026 have Markdown tables. |
GET /applications/{id}/pages-pdf | Any pages of the case as one PDF, in the order given: ?span=<fileId>:p<first>-<last>, repeatable. |
GET /applications/{id}/events | The ledger for the case, newest first. |
POST /applications/{id}/files/{fileId}/pages/{page}/teach-tests | Add Teach tests to a page: each a cell, field or line, with what you read there and its box. |
POST /applications/{id}/files/{fileId}/pages/{page}/teach-tests/{testId}/readings | A new reading for a Teach test, such as a fix. A person judges it again. |
GET /applications/{id}/teach-report | The Teach report as Markdown: the counts, then each test with its readings and verdicts. GET /applications/{id}/teach-tests gives the same as JSON, and each test's truth: the value a person's verdicts confirm, at its place. |
GET /storage | What your organization holds in storage: each case's folder with its files, bytes and newest time. ?folder= lists one folder's files. Names, sizes and times only. |
GET /openapi.json | The whole contract. Readable without a key. |
Everything else
The app runs on this same API, so the contract lists more than this table: building lists, schemas and workflows, review decisions, and more. A key may call anything an Originator may.
Use only operations the contract lists. Endpoint shapes in marketing copy elsewhere on this site are illustrations.
Sheaf