Introduction
DocuFlow API
Send documents in, get structured, reviewed data out. Queues, extraction, review, webhooks and exports over one REST API with a single key.
Try it
Every endpoint takes the same key in the same header and returns JSON. whoami needs no permission beyond a valid key, so it is the first call to make: it says which workspace the key acts in, exactly what it may do, and how much of its budget is left.
Request
curl "https://docuflow.pendral.io/api/v2/whoami" \-H "Authorization: Bearer $DOCUFLOW_API_KEY"
200 OK
{"principal": { "kind": "apiKey", "label": "Accounts payable sync", "platformAdmin": false, … },"workspace": { "id": "clx9k2m4p0001qh8z3v7d5f2a", "name": "Acme Health", "slug": "acme-health", "personal": false },"permissions": ["documents:create", "documents:read", "queues:read"],"queueScope": null,"rateLimit": { "limit": 600, "remaining": 599, "resetAt": "2026-10-01T12:01:00.000Z", "window": "1 minute" },"api": { "version": "v2", "baseUrl": "https://docuflow.pendral.io/api/v2", "openapi": "…/api/v2/openapi" }}
Base URLhttps://docuflow.pendral.io/api/v2
The rules
- headerAuthorization: Bearer
- A
dfk_key, created under Developers → API keys. It acts as the person who made it, in one workspace, narrowed to the scopes chosen at creation.Authentication → - querycursor, nextCursor
- Lists are cursor-paginated: pass a page's
nextCursorback ascursor;nullis the last page. - limit600 / min
- Per key by default, and each key can carry its own. Reported on every response in the
X-RateLimit-*headers.Rate limits → - jsoncode
- Failures are
{ error, code, details, requestId }. Thecodeis stable; branch on it, show the sentence.Errors → - headerIdempotency-Key
- A write that carries one is served at most once, so a retry after a timeout never uploads or approves twice.Idempotency →
The surface
Each area is documented end to end: every parameter, every response, and the permission a key needs to call it. The same registry serves the OpenAPI document.
DocumentsUpload, list, inspect and manage documents. Processing is asynchronous: poll a document, listen on the event stream, or subscribe a webhook.ReviewApprove, reject, edit fields, recapture regions and ask questions of a document.ExtractionOne call in, structured data out.Search & viewsGlobal search and saved Documents views.EventsLive server-sent events for the caller's workspace.QueuesDocument families: automation, workload and assignment.Schemas & rulesVersioned extraction schemas and validation rules.Learning & evaluationsLearnings distilled from reviewer corrections, and extraction evaluations against a golden set.ConnectionsMicrosoft 365 accounts connected through Nango (connected in the app; browsed and imported from here).SourcesAuto-pull watchers on drive folders, mailboxes and Teams channels.AutomationsWorkflow rules: when a document reaches a trigger, if its conditions hold, do a list of actions. Ordered per workspace; a rule with no queue reaches every queue.DestinationsWhere approved data goes: drive folders, email, or a signed webhook.WebhooksSigned JSON POSTs when documents change state. See the webhooks section for payloads.Reference dataData sets used by lookups, dataset-match rules and enrichment.ExportsBulk and scheduled exports. Files are only readable through the authenticated download endpoint.WorkspaceSettings, API keys, audit log, analytics and usage.Members & accessMembers, invitations, roles and teams. Governance needs a signed-in person: API keys can never call these.AccountThe signed-in user and the workspaces they belong to.PlatformBuilding a workflow on top of DocuFlow. whoami says what a credential can do, /events/log is the webhook feed as something you poll, /batch collapses several calls into one round trip, and /logs shows what your integration actually sent.MetaThis document and inbound integration callbacks.
Building on DocuFlow
WebhooksBe told when a document is extracted, needs review or is approved, instead of polling for it.Event log & replayThe same events as a feed you poll, kept for 30 days and replayable to your endpoint.Batch requestsUp to 25 calls in one round trip, each authorized exactly like the direct call.TypeScript SDKTyped methods, live events, webhook verification and the docuflow CLI.
Areas for the signed-in app (account, notifications, members) are in the reference too, marked as needing a person.