Sheaf
SheafDocsAPIQuickstart

Quickstart

Three commands: run a workflow on a packet, poll the case, read what was filed.

You need an API key in SHEAF_KEY and a PDF.

1. Run a workflow on a packet

curl -X POST "https://sheaf.us/api/workflows/standard-intake/runs" \
  -H "Authorization: Bearer $SHEAF_KEY" \
  -F "files=@packet.pdf" \
  -F "applicant=Jane Doe" \
  -F "expectedDocList=purchase-loan-ca"

The answer is 201 with the case:

{ "id": "euw8ydHxTW", "applicantName": "Jane Doe", "run": { "state": "running", "kind": "parse" } }

standard-intake and purchase-loan-ca exist in every new organization. Your own are listed by GET /workflows and GET /expected-doc-lists.

2. Poll until the run lands

curl "https://sheaf.us/api/applications/euw8ydHxTW" \
  -H "Authorization: Bearer $SHEAF_KEY"

Ask every five to ten seconds. When run.state is report, the run has landed and the workflow has filed what it could. A run takes minutes.

3. Read what was filed

curl "https://sheaf.us/api/applications/euw8ydHxTW/documents" \
  -H "Authorization: Bearer $SHEAF_KEY"

Each entry is a document with its pages, the line of the list it was filed under, and the decision. The shape is in reading results.

If the first call answers 409

Pre-flight flagged a file and Sheaf will not override that for you. The case exists and waits for a person. See run a workflow.

This page as markdown · llms.txt · API contract