Getting started
You need client_id, client_secret, and a Docmind workspace and/or Docbooks partner access. Email support@docpier.com if you do not have them. Keep the secret off the browser and out of git.
Pick a first capability: extract (Docmind, when you need typed data in your product) or book (Docbooks). Booking already uses Docpier extraction internally — Enable capture and booking.
Token
POST client credentials. Cache
access_token; it expires in about 300 seconds. 401 and 403 have an empty body.- Docmind
- Docbooks
curl -X POST https://auth-stage.docpier.com/realms/idp/protocol/openid-connect/token \-H "Content-Type: application/x-www-form-urlencoded" \-d "grant_type=client_credentials" \-d "client_id=$CLIENT_ID" \-d "client_secret=$CLIENT_SECRET" \-d "scope=idp.capture"curl -X POST 'https://stage.docpier.io/auth/realms/idp/protocol/openid-connect/token' \-H 'Content-Type: application/x-www-form-urlencoded' \-d 'grant_type=client_credentials' \-d 'client_id=$CLIENT_ID' \-d 'client_secret=$CLIENT_SECRET' \-d 'scope=docbooks.onboarding'Scopes and hosts: Authentication.
First write
Neither call waits for processing. You get
202and an id.Webhook, then GET
Acknowledge with
2xx. Dedupe onwebhookId. Route onproduct, thenevent. Do not poll.TipDocmind workspace ids and Docbooks workspace ids are different. If you enable both capabilities, store a mapping — Enable capture and booking.