---
title: Endpoints
description: The calls an integration uses, in one table. The full contract is the OpenAPI document.
section: API
order: 6
---

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. 10 requests a minute, 24 hours, 50 pages of uploads. |
| `POST /workflows/{workflowId}/runs` | [Run a workflow](/docs/api/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 /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 PDFs to a case, multipart field `files`. `?expectedDocId=` declares what a file is for. |
| `GET /applications` | Your cases, with how many lines of each list are satisfied. |
| `GET /applications/{id}` | One case: `run.state`, `run.lastRunError`, its files, its pinned list. |
| `POST /applications/{id}/run/cancel` | Stop the paid run in flight. The case goes back to where the run started. A preview cannot be stopped. |
| `GET /applications/{id}/documents` | Every document the case holds, filed or unmatched. |
| `GET /applications/{id}/approved-docs/{approvedDocId}/file` | A filed document's PDF. `?kind=md` for its text. |
| `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. |
| `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. |
| `GET /openapi.json` | The whole contract. Readable without a key. |

## Everything else

The app itself runs on this same API, so the [contract](/api/openapi.json) lists more than the table above: building lists, schemas and workflows, review decisions, and so on. A key may call anything an Originator may. The table is what an integration normally needs.

Use only operations the contract lists. Endpoint shapes shown in marketing copy elsewhere on this site are illustrations.
