DocuDetectDocs

API keys and permissions

How to make, store and revoke an API key, and what each permission allows.

Early access

The REST API, webhooks and embedded signing are open to accounts in early access. If Settings, Developers is not in your account yet, write to contact@docudetect.com. What these pages describe can still change; breaking changes are announced on this site first.

Send the key in the Authorization header on every call:

curl "https://docudetect.com/api/public/v1/me" -H "Authorization: Bearer $DOCUDETECT_API_KEY"

A key looks like dd_live_xxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx: the prefix, a public id that the app shows so you can tell keys apart, and the secret. A missing, unknown, expired or revoked key gets 401 invalid_api_key with a WWW-Authenticate: Bearer header.

Making a key

Keys are made in the app under Settings, Developers, by the account owner:

  • The account's email must be verified.
  • You must have signed in recently. If not, the app asks you to sign in again first.
  • You choose a name, the permissions, and an expiry: 30, 90 or 365 days, or never.
  • The account owner gets an email whenever a key is made.

The key is shown once. We store only a hash of it, so it can't be shown again; if you lose it, make a new one and revoke the old one.

Free and Extension accounts can have 1 key at a time. Pro accounts can have up to 50.

Permissions

A key can do only what its permissions allow. A call outside them gets 403 insufficient_scope, and the reference lists the permission each operation needs.

PermissionShown asWhat it allows
documents:readticked by defaultSee your documentsTitles, status, signers, history and the PDFs.
documents:writeMake draftsUpload a PDF or use a template to make a draft. It can't send it or email anyone.
documents:sendEmail your signersSending, reminders and canceling. Every email counts against your daily email limit and goes through the same checks as the app.
templates:readticked by defaultSee your templatesYour templates and the signers each one needs. Using one to make a draft also needs Make drafts.
webhooks:manageAdd and change webhooksIt can send your events to any public address. Revoking the key turns its webhooks off.
embedding:sessionsOpen embedded signing sessionsWhoever holds this key can open a signing session for anyone you add as signing inside your app, and so can sign for them.

Tick only what the integration needs. A key for a reporting job needs See your documents and nothing else.

Keeping keys safe

  • Keep keys on a server. Never put one in a browser, a mobile app or a repository.
  • One key per integration, so you can revoke one without stopping the others.
  • Revoke a key in Settings, Developers; it stops working at once. You can revoke several at a time.
  • Revoking a key, or letting it expire, turns off the webhooks it made.