DocuDetectDocs

Quickstart

Make an API key, upload a PDF with a signer and one signature field, send it, and download the signed PDF.

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.

You need a DocuDetect account with a verified email, curl, and a PDF. Every call below is a real call to the production API.

Make a key

In the app, open Settings, Developers and choose Create key. Give it a name and tick Make drafts and Email your signers as well as the default See your documents. Creating a key needs a sign-in from the last few minutes; if it asks, sign in again.

The key is shown once. Copy it into an environment variable on the machine that will call the API:

export DOCUDETECT_API_KEY="dd_live_xxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Check it:

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

The answer names the account and the key, with the permissions it has.

Make a draft

Upload the PDF with the signer and the fields. Field positions are fractions of the page, from its top left corner, and page counts from 1. This places one signature box near the bottom of page 1:

curl -X POST "https://docudetect.com/api/public/v1/documents" \
  -H "Authorization: Bearer $DOCUDETECT_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -F "file=@lease.pdf" \
  -F "title=Lease for 12 Main St" \
  -F "signerName=Alex Example" \
  -F "signerEmail=alex@example.com" \
  -F 'fields=[{"id":"sig1","type":"signature","page":1,"x":0.1,"y":0.82,"width":0.3,"height":0.05,"required":true}]'

Nothing is emailed yet. The answer is the Document: keep its id.

export DOCUMENT_ID="<the id from the answer>"

Leave out fields to place them in the app instead, where field detection suggests them for you.

Send it

curl -X POST "https://docudetect.com/api/public/v1/documents/$DOCUMENT_ID/send" \
  -H "Authorization: Bearer $DOCUDETECT_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

The signer gets an email with their link. status is now sent. If the account's sending checks refuse the email, the answer is an error whose code says why, for example email_unverified or held_for_review (see Errors).

Hear back

Either add a webhook for document.completed, or poll:

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

status becomes completed once the signer has signed. To follow many documents, poll the list with updatedSince (see Lists and polling).

Download it

curl "https://docudetect.com/api/public/v1/documents/$DOCUMENT_ID/pdf" \
  -H "Authorization: Bearer $DOCUDETECT_API_KEY" -o signed.pdf
curl "https://docudetect.com/api/public/v1/documents/$DOCUMENT_ID/certificate" \
  -H "Authorization: Bearer $DOCUDETECT_API_KEY" -o certificate.pdf

The signed PDF carries a DocuDetect Document ID on every page; the certificate of completion lists who signed, when, and from where.

Next