Extract a document
This is the Docmind core: send a business document, get structured data back. Product-wise it is capture (classify + extract). Architecturally it is an asynchronous job — not a synchronous OCR RPC.
POST a PDF or image. The API returns 202 with a documentId. Wait for PROCESSING_FINALISED, then GET. Do not poll.
/v1/workspaces/{workspaceId}/documentsUse stage (idp-stage.docpier.com) while integrating. Keep the Stage server
selected in Try It.
Authentication
AuthorizationstringheaderrequiredBearer token. Scope docmind.capture (today request idp.capture).
Path parameters
workspaceIdstringpathrequiredYour Docpier workspace ULID.
Body
multipart/form-data
filefilebodyrequiredPDF, JPEG, PNG, or TIFF. Maximum 200 MB.
extRefstring | nullbodyPartner-supplied stable id for the file (max 70 characters). Echoed in webhooks.
optionsstring | nullbodyJSON string of processing options (ProcessingInstruction). Split, OCR, retention,
and related keys: OpenAPI models.
Response
202 returns a documentId used to retrieve results and correlate webhooks.
Then:
/v1/workspaces/{workspaceId}/documents/{documentId}Each extracted document in data[] is typed (INVOICE, RECEIPT, …). See document types.
When processing fails
202 means accepted, not extracted. PROCESSING_FAILED is a domain outcome. GET the document if you need stored status. Do not replay the multipart until you know the file was the problem (INVALID_FILE on the original POST is different).
Dedupe on webhookId. Envelope: Webhooks.