Skip to main content
POST
/
render
/
preview
curl -X POST "https://api.hookpdf.com/render/preview" \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "template_id": "123e4567-e89b-12d3-a456-426614174000",
    "payload": {
      "name": "Jane Example",
      "date": "2024-05-10"
    },
    "options": {
      "page_size": "A4",
      "orientation": "portrait"
    }
  }'
{
  "job_id": "a1b2c3d4-5678-9012-abcd-ef1234567890",
  "status": "queued",
  "is_preview": true,
  "created_at": "2026-02-28T15:09:17.006604+00:00"
}
Enqueue a preview render job. A preview PDF applies watermarks and has a short Time-To-Live (TTL). It does not count towards your monthly generation quota.

Response Fields

job_id
string (uuid)
Unique identifier for the preview job. Use this to poll the job status via GET /reports/{job_id}.
status
string
Current status of the job. Will be queued immediately after creation.
is_preview
boolean
true for preview renders.
created_at
string (datetime)
Timestamp when the job was created.
curl -X POST "https://api.hookpdf.com/render/preview" \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "template_id": "123e4567-e89b-12d3-a456-426614174000",
    "payload": {
      "name": "Jane Example",
      "date": "2024-05-10"
    },
    "options": {
      "page_size": "A4",
      "orientation": "portrait"
    }
  }'
{
  "job_id": "a1b2c3d4-5678-9012-abcd-ef1234567890",
  "status": "queued",
  "is_preview": true,
  "created_at": "2026-02-28T15:09:17.006604+00:00"
}

Authorizations

Authorization
string
header
required

Enter your API key

Body

application/json
template_id
string<uuid>
required

The unique ID of the template to render. You can find this in your Dashboard.

payload
object
required

The JSON data to inject into the template's Handlebars placeholders.

options
object

Optional rendering configuration.

Response

Preview job queued

Returned when a render job is successfully queued.

job_id
string<uuid>

Unique identifier for the render job. Use this to poll the job status via /reports/{job_id}.

status
enum<string>

Current status of the job. Will be queued immediately after creation.

Available options:
queued,
processing,
completed,
failed
is_preview
boolean

true if this is a preview render (watermarked, short TTL), false for production.

created_at
string<date-time>

Timestamp when the job was created.