Sheaf.us
SheafDocsAPIAuthentication

Authentication

Authenticate every call with an organization API key, sent as a bearer token.

Make a key

Anyone who works in the app can make a key under Connected agents, in a case's Control Center on the Research page. There, Sheaf fills in a name and gives you a note for the agent that names the case. A Manager can also make a key under Settings, in API keys: Copy setup copies a setup for an agent, Copy key the key alone.

Name each key for its purpose. The secret is shown once. Sheaf stores only its hash. A Manager can revoke a key under Settings at any time. A revoked key is refused from the next request.

An agent can also connect with a code instead of a key: see Connect an agent.

Try it as a guest

One call, with no account, opens your own sandbox with the sample case and returns a key. On sheaf.us, the agent box makes the same sandbox for you: its click copies a setup with the key and signs your browser in to the sandbox.

curl -X POST https://sheaf.us/api/guest
{ "key": "sheaf_…", "applicationId": "AohWhGa4uo", "expiresAt": "2026-09-27T14:02:11Z",
  "requestsPerMinute": 10, "pagesIncluded": 50, "docs": "https://sheaf.us/docs/api", "signedIn": true }

applicationId is your copy of the sample case. signedIn is true when the answer signed the caller in to the sandbox, as a browser with no session is. Read it by that id: GET /applications/{id}, /documents, /text. GET /applications lists the cases you make yourself. The key works like any organization key: read and search the sample, upload a document of your own, and run a workflow on it. It has three limits:

LimitValue
Requests10 a minute
Lifetime24 hours, then the key is refused and the sandbox is deleted with everything in it. Add an email to the sandbox first, signed in to it, and it is kept: the key becomes an ordinary key.
Uploads50 pages, across the sandbox
RunsOne. A second run returns 403 with emailRequired until an email is added.

POST /guest itself allows 3 sandboxes a day in total. Past that, it returns 429: try again tomorrow, or make an account. Research questions and briefs in a sandbox are capped by the hour and by the day, as in any workspace without an email. The key is shown only in this response.

Send it

Authorization: Bearer sheaf_…

A secret is sheaf_ followed by 40 characters.

What a key may do

A key acts for one organization with an Originator's rights. It can start cases, upload files, run workflows and read everything in its organization.

RequestResponse
Anything in another organization404
People, keys, webhooks, passwords, the access table403
A wrong, malformed or revoked secret401, even if a valid session cookie is also present
More than 500 requests in a minute429 with Retry-After

How it shows up

The ledger records a key's actions under the key's name, for example LOS integration (API). When a workflow files documents on a run the key started, the row says Workflow decided, authenticated as the key. The key's row in Settings shows when it was last used.

Where to keep it

Give it to your agent in its setup, or keep it in an environment variable, SHEAF_API_KEY, which your code and every agent on the machine can read. If it leaks, revoke it and make another.

This page as markdown · llms.txt · API contract