Skip to main content

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.

  1. Token

    POST client credentials. Cache access_token; it expires in about 300 seconds. 401 and 403 have an empty body.

    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"

    Scopes and hosts: Authentication.

  2. Webhook, then GET

    Acknowledge with 2xx. Dedupe on webhookId. Route on product, then event. Do not poll.

    Tip

    Docmind workspace ids and Docbooks workspace ids are different. If you enable both capabilities, store a mapping — Enable capture and booking.