Docs
EN
Sign up

Quickstart

Generate your first PDF with the ShipPDF REST API in three steps. For every endpoint, request, and response, see the API reference.

1. Create an API token

In your ShipPDF workspace, open Members & keys and create an API token with the documents:create and documents:read scopes. Treat it like a password.

See Authentication for token setup, scopes, and authentication errors.

Every request goes to the api. subdomain under /v1 and is authenticated with a bearer token:

Authorization: Bearer sk_live_xxx

2. Generate a document

POST the id of a published template plus the data to bind into it. The call spends one generation credit and returns immediately with a document whose status is queued.

curl -X POST https://api.shippdf.com/v1/documents \
  -H "Authorization: Bearer sk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "template_id": "tmpl_8f3a",
    "data": { "invoice": { "number": "INV-1042" } }
  }'
{ "id": "doc_a1b2c3", "status": "queued", "pdf_url": null }

Pass an Idempotency-Key header to make retries safe — a repeat with the same key replays the original document instead of spending another credit.

3. Poll for the PDF

Fetch the document by its id until status is completed. The response then carries a short-lived pdf_url.

curl https://api.shippdf.com/v1/documents/doc_a1b2c3 \
  -H "Authorization: Bearer sk_live_xxx"
{ "id": "doc_a1b2c3", "status": "completed", "pdf_url": "https://.../doc.pdf" }

Prefer a push model? Include a webhook_url when you generate, and ShipPDF POSTs the document payload to it once the PDF is ready.

Next steps

  • Browse every endpoint in the API reference.
  • Drive PDF generation from an AI assistant over MCP.