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 nextCursor back as cursor; null is 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 }. The code is 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

21 areas · 234 endpoints

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.16 endpointsReviewApprove, reject, edit fields, recapture regions and ask questions of a document.17 endpointsExtractionOne call in, structured data out.1 endpointSearch & viewsGlobal search and saved Documents views.8 endpointsEventsLive server-sent events for the caller's workspace.1 endpointQueuesDocument families: automation, workload and assignment.10 endpointsSchemas & rulesVersioned extraction schemas and validation rules.12 endpointsLearning & evaluationsLearnings distilled from reviewer corrections, and extraction evaluations against a golden set.14 endpointsConnectionsMicrosoft 365 accounts connected through Nango (connected in the app; browsed and imported from here).16 endpointsSourcesAuto-pull watchers on drive folders, mailboxes and Teams channels.10 endpointsAutomationsWorkflow 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.11 endpointsDestinationsWhere approved data goes: drive folders, email, or a signed webhook.9 endpointsWebhooksSigned JSON POSTs when documents change state. See the webhooks section for payloads.10 endpointsReference dataData sets used by lookups, dataset-match rules and enrichment.14 endpointsExportsBulk and scheduled exports. Files are only readable through the authenticated download endpoint.12 endpointsWorkspaceSettings, API keys, audit log, analytics and usage.20 endpointsMembers & accessMembers, invitations, roles and teams. Governance needs a signed-in person: API keys can never call these.26 endpointsAccountThe signed-in user and the workspaces they belong to.12 endpointsPlatformBuilding 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.7 endpointsMetaThis document and inbound integration callbacks.3 endpoints

Building on DocuFlow

Areas for the signed-in app (account, notifications, members) are in the reference too, marked as needing a person.