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"
}
}'
const response = await fetch('https://api.hookpdf.com/render/preview', {
method: 'POST',
headers: {
'Authorization': 'Bearer <YOUR_API_KEY>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
template_id: "123e4567-e89b-12d3-a456-426614174000",
payload: {
name: "Jane Example",
date: "2024-05-10"
},
options: {
page_size: "A4",
orientation: "portrait"
}
})
});
const result = await response.json();
console.log("Preview Job ID:", result.job_id);
import requests
url = "https://api.hookpdf.com/render/preview"
headers = {
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
}
data = {
"template_id": "123e4567-e89b-12d3-a456-426614174000",
"payload": {
"name": "Jane Example",
"date": "2024-05-10"
},
"options": {
"page_size": "A4",
"orientation": "portrait"
}
}
response = requests.post(url, headers=headers, json=data)
print("Preview Job ID:", response.json().get("job_id"))
$url = "https://api.hookpdf.com/render/preview";
$data = [
"template_id" => "123e4567-e89b-12d3-a456-426614174000",
"payload" => [
"name" => "Jane Example",
"date" => "2024-05-10"
],
"options" => [
"page_size" => "A4",
"orientation" => "portrait"
]
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer <YOUR_API_KEY>",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
echo "Preview Job ID: " . $result["job_id"];
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer <YOUR_API_KEY>");
var data = new
{
template_id = "123e4567-e89b-12d3-a456-426614174000",
payload = new { name = "Jane Example", date = "2024-05-10" },
options = new { page_size = "A4", orientation = "portrait" }
};
var json = System.Text.Json.JsonSerializer.Serialize(data);
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://api.hookpdf.com/render/preview", content);
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
$headers = @{
"Authorization" = "Bearer <YOUR_API_KEY>"
"Content-Type" = "application/json"
}
$body = @{
template_id = "123e4567-e89b-12d3-a456-426614174000"
payload = @{
name = "Jane Example"
date = "2024-05-10"
}
options = @{
page_size = "A4"
orientation = "portrait"
}
} | ConvertTo-Json -Depth 3
$response = Invoke-RestMethod -Uri "https://api.hookpdf.com/render/preview" `
-Method POST -Headers $headers -Body $body
Write-Output "Preview Job ID: $($response.job_id)"
{
"job_id": "a1b2c3d4-5678-9012-abcd-ef1234567890",
"status": "queued",
"is_preview": true,
"created_at": "2026-02-28T15:09:17.006604+00:00"
}
Render
Render PDF Preview
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"
}
}'
const response = await fetch('https://api.hookpdf.com/render/preview', {
method: 'POST',
headers: {
'Authorization': 'Bearer <YOUR_API_KEY>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
template_id: "123e4567-e89b-12d3-a456-426614174000",
payload: {
name: "Jane Example",
date: "2024-05-10"
},
options: {
page_size: "A4",
orientation: "portrait"
}
})
});
const result = await response.json();
console.log("Preview Job ID:", result.job_id);
import requests
url = "https://api.hookpdf.com/render/preview"
headers = {
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
}
data = {
"template_id": "123e4567-e89b-12d3-a456-426614174000",
"payload": {
"name": "Jane Example",
"date": "2024-05-10"
},
"options": {
"page_size": "A4",
"orientation": "portrait"
}
}
response = requests.post(url, headers=headers, json=data)
print("Preview Job ID:", response.json().get("job_id"))
$url = "https://api.hookpdf.com/render/preview";
$data = [
"template_id" => "123e4567-e89b-12d3-a456-426614174000",
"payload" => [
"name" => "Jane Example",
"date" => "2024-05-10"
],
"options" => [
"page_size" => "A4",
"orientation" => "portrait"
]
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer <YOUR_API_KEY>",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
echo "Preview Job ID: " . $result["job_id"];
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer <YOUR_API_KEY>");
var data = new
{
template_id = "123e4567-e89b-12d3-a456-426614174000",
payload = new { name = "Jane Example", date = "2024-05-10" },
options = new { page_size = "A4", orientation = "portrait" }
};
var json = System.Text.Json.JsonSerializer.Serialize(data);
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://api.hookpdf.com/render/preview", content);
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
$headers = @{
"Authorization" = "Bearer <YOUR_API_KEY>"
"Content-Type" = "application/json"
}
$body = @{
template_id = "123e4567-e89b-12d3-a456-426614174000"
payload = @{
name = "Jane Example"
date = "2024-05-10"
}
options = @{
page_size = "A4"
orientation = "portrait"
}
} | ConvertTo-Json -Depth 3
$response = Invoke-RestMethod -Uri "https://api.hookpdf.com/render/preview" `
-Method POST -Headers $headers -Body $body
Write-Output "Preview Job ID: $($response.job_id)"
{
"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
string (uuid)
Unique identifier for the preview job. Use this to poll the job status via
GET /reports/{job_id}.string
Current status of the job. Will be
queued immediately after creation.boolean
true for preview renders.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"
}
}'
const response = await fetch('https://api.hookpdf.com/render/preview', {
method: 'POST',
headers: {
'Authorization': 'Bearer <YOUR_API_KEY>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
template_id: "123e4567-e89b-12d3-a456-426614174000",
payload: {
name: "Jane Example",
date: "2024-05-10"
},
options: {
page_size: "A4",
orientation: "portrait"
}
})
});
const result = await response.json();
console.log("Preview Job ID:", result.job_id);
import requests
url = "https://api.hookpdf.com/render/preview"
headers = {
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
}
data = {
"template_id": "123e4567-e89b-12d3-a456-426614174000",
"payload": {
"name": "Jane Example",
"date": "2024-05-10"
},
"options": {
"page_size": "A4",
"orientation": "portrait"
}
}
response = requests.post(url, headers=headers, json=data)
print("Preview Job ID:", response.json().get("job_id"))
$url = "https://api.hookpdf.com/render/preview";
$data = [
"template_id" => "123e4567-e89b-12d3-a456-426614174000",
"payload" => [
"name" => "Jane Example",
"date" => "2024-05-10"
],
"options" => [
"page_size" => "A4",
"orientation" => "portrait"
]
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer <YOUR_API_KEY>",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
echo "Preview Job ID: " . $result["job_id"];
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer <YOUR_API_KEY>");
var data = new
{
template_id = "123e4567-e89b-12d3-a456-426614174000",
payload = new { name = "Jane Example", date = "2024-05-10" },
options = new { page_size = "A4", orientation = "portrait" }
};
var json = System.Text.Json.JsonSerializer.Serialize(data);
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://api.hookpdf.com/render/preview", content);
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
$headers = @{
"Authorization" = "Bearer <YOUR_API_KEY>"
"Content-Type" = "application/json"
}
$body = @{
template_id = "123e4567-e89b-12d3-a456-426614174000"
payload = @{
name = "Jane Example"
date = "2024-05-10"
}
options = @{
page_size = "A4"
orientation = "portrait"
}
} | ConvertTo-Json -Depth 3
$response = Invoke-RestMethod -Uri "https://api.hookpdf.com/render/preview" `
-Method POST -Headers $headers -Body $body
Write-Output "Preview Job ID: $($response.job_id)"
{
"job_id": "a1b2c3d4-5678-9012-abcd-ef1234567890",
"status": "queued",
"is_preview": true,
"created_at": "2026-02-28T15:09:17.006604+00:00"
}
Authorizations
Enter your API key
Body
application/json
Response
Preview job queued
Returned when a render job is successfully queued.
Unique identifier for the render job. Use this to poll the job status via /reports/{job_id}.
Current status of the job. Will be queued immediately after creation.
Available options:
queued, processing, completed, failed true if this is a preview render (watermarked, short TTL), false for production.
Timestamp when the job was created.