Documentation

Your first PDF, without detours.

The public documentation explains the contract needed for an integration. It exposes no secret and runs no request against your account.

01

1. Create an API key

Create a key from your account, restrict it to required templates and keep it server-side.

Authorization: Bearer dc_live_••••••••
02

2. Publish a version

Production generation targets a published version. Drafts are for authoring and preview.

03

3. Generate

Send JSON to the generation endpoint.

curl -X POST "$DOCCRAFT_URL/api/v1/shared/document/generate" \
+  -H "Authorization: Bearer $DOCCRAFT_API_KEY" \
+  -H "Content-Type: application/json" \
+  -d '{"templateVersionId":"tv_01JDC12","data":{"customer":{"name":"Acme"}}}'
04

4. Track the job

Poll the returned job or configure a webhook. Always handle pending, processing, completed and failed.

05

5. Handle errors

Log the job identifier, retain the business payload client-side and retry only transient failures.

Design Partner

Evaluate DocCraft on a real document.

Book a demo