Skip to main content

1. Create a Template

Log in to the HOOKPDF Dashboard and create a new template using HTML + Handlebars syntax.

2. Grab Your API Key

Go to Settings in the Dashboard and copy your API key.

3. Send a Render Request

Use your template ID and API key to enqueue a PDF render job:
curl -X POST "https://api.hookpdf.com/render" \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "template_id": "<YOUR_TEMPLATE_ID>",
    "payload": {
      "name": "John Doe",
      "date": "2024-01-01"
    }
  }'
You’ll receive a job_id in the response:
{
  "job_id": "7cdb01f7-3530-4862-8523-93e5d38fc1b9",
  "status": "queued",
  "is_preview": false,
  "created_at": "2026-02-28T15:09:17.006604+00:00"
}

4. Poll the Job Status

Use the job_id to check when your PDF is ready:
curl -X GET "https://api.hookpdf.com/reports/<JOB_ID>" \
  -H "Authorization: Bearer <YOUR_API_KEY>"
Once status is completed, download your PDF from the output_url:
{
  "id": "7cdb01f7-3530-4862-8523-93e5d38fc1b9",
  "status": "completed",
  "output_url": "https://hookpdf-render-prod.s3.eu-central-1.amazonaws.com/reports/...",
  "page_count": 3,
  "credits_used": 3,
  "credits_remaining": 15501
}