Sheaf.us
SheafDocsAPIEndpoints

Endpoints

The calls an integration uses; the OpenAPI document is the full contract.

All paths are under https://sheaf.us/api.

CallWhat it does
POST /guestA guest key: your own sandbox with the sample case, no account, no body. Its limits: try it as a guest.
POST /workflows/{workflowId}/runsRun a workflow on a packet: creates the case, receives the PDFs, starts the run.
GET /workflowsYour workflows, their versions, which one is the default.
GET /workflows/{workflowId}/{version}One version's steps, and the options each step pins.
GET /models/optionsEvery stage of a run and its options, with the default marked.
GET /expected-doc-listsYour expected document lists and their versions.
POST /applicationsCreate a case without running anything: expectedDocListId, version, applicantName.
POST /applications/{id}/filesAdd 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 /applicationsYour 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/gateStart a run on a case with its own options.
POST /applications/{id}/run/toolRun Extract over a case whose run has landed: { "tool": "extract", "decidedBy": "…" }.
POST /applications/{id}/run/cancelStop the case's active workflow. The case goes back to where the run started. A preview cannot be stopped.
DELETE /applications/{id}/run/stoppedClear the last run that stopped (run.stopped). What it read stays stored.
GET /applications/{id}/documentsEvery document the case holds, filed or unmatched.
GET /applications/{id}/analysisThe case's run records, with the extracted values.
GET /intel-templatesThe Intel templates a brief can answer.
POST /applications/{id}/intel-briefsStart a brief: { "templateId": "…" }. GET /applications/{id}/intel-briefs/{briefId} reads it.
GET /applications/{id}/approved-docs/{approvedDocId}/fileA filed document's PDF. ?kind=md for its text.
GET /applications/{id}/searchSearch 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}/textThe 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-pdfAny pages of the case as one PDF, in the order given: ?span=<fileId>:p<first>-<last>, repeatable.
GET /applications/{id}/eventsThe ledger for the case, newest first.
POST /applications/{id}/files/{fileId}/pages/{page}/teach-testsAdd 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}/readingsA new reading for a Teach test, such as a fix. A person judges it again.
GET /applications/{id}/teach-reportThe 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 /storageWhat 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.jsonThe 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.

This page as markdown · llms.txt · API contract