curl -X POST "https://api.hookpdf.com/render" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"template_id": "123e4567-e89b-12d3-a456-426614174000",
"payload": {
"name": "John Doe",
"date": "2024-01-01"
},
"options": {
"page_size": "A4",
"orientation": "portrait"
}
}'
const response = await fetch('https://api.hookpdf.com/render', {
method: 'POST',
headers: {
'Authorization': 'Bearer <YOUR_API_KEY>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
template_id: "123e4567-e89b-12d3-a456-426614174000",
payload: {
name: "John Doe",
date: "2024-01-01"
},
options: {
page_size: "A4",
orientation: "portrait"
}
})
});
const result = await response.json();
console.log("Job ID:", result.job_id);
import requests
url = "https://api.hookpdf.com/render"
headers = {
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
}
data = {
"template_id": "123e4567-e89b-12d3-a456-426614174000",
"payload": {
"name": "John Doe",
"date": "2024-01-01"
},
"options": {
"page_size": "A4",
"orientation": "portrait"
}
}
response = requests.post(url, headers=headers, json=data)
print("Job ID:", response.json().get("job_id"))
$url = "https://api.hookpdf.com/render";
$data = [
"template_id" => "123e4567-e89b-12d3-a456-426614174000",
"payload" => [
"name" => "John Doe",
"date" => "2024-01-01"
],
"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 "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 = "John Doe", date = "2024-01-01" },
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", 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 = "John Doe"
date = "2024-01-01"
}
options = @{
page_size = "A4"
orientation = "portrait"
}
} | ConvertTo-Json -Depth 3
$response = Invoke-RestMethod -Uri "https://api.hookpdf.com/render" `
-Method POST -Headers $headers -Body $body
Write-Output "Job ID: $($response.job_id)"
{
"job_id": "7cdb01f7-3530-4862-8523-93e5d38fc1b9",
"status": "queued",
"is_preview": false,
"created_at": "2026-02-28T15:09:17.006604+00:00"
}
Render
Render PDF
POST
/
render
curl -X POST "https://api.hookpdf.com/render" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"template_id": "123e4567-e89b-12d3-a456-426614174000",
"payload": {
"name": "John Doe",
"date": "2024-01-01"
},
"options": {
"page_size": "A4",
"orientation": "portrait"
}
}'
const response = await fetch('https://api.hookpdf.com/render', {
method: 'POST',
headers: {
'Authorization': 'Bearer <YOUR_API_KEY>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
template_id: "123e4567-e89b-12d3-a456-426614174000",
payload: {
name: "John Doe",
date: "2024-01-01"
},
options: {
page_size: "A4",
orientation: "portrait"
}
})
});
const result = await response.json();
console.log("Job ID:", result.job_id);
import requests
url = "https://api.hookpdf.com/render"
headers = {
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
}
data = {
"template_id": "123e4567-e89b-12d3-a456-426614174000",
"payload": {
"name": "John Doe",
"date": "2024-01-01"
},
"options": {
"page_size": "A4",
"orientation": "portrait"
}
}
response = requests.post(url, headers=headers, json=data)
print("Job ID:", response.json().get("job_id"))
$url = "https://api.hookpdf.com/render";
$data = [
"template_id" => "123e4567-e89b-12d3-a456-426614174000",
"payload" => [
"name" => "John Doe",
"date" => "2024-01-01"
],
"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 "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 = "John Doe", date = "2024-01-01" },
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", 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 = "John Doe"
date = "2024-01-01"
}
options = @{
page_size = "A4"
orientation = "portrait"
}
} | ConvertTo-Json -Depth 3
$response = Invoke-RestMethod -Uri "https://api.hookpdf.com/render" `
-Method POST -Headers $headers -Body $body
Write-Output "Job ID: $($response.job_id)"
{
"job_id": "7cdb01f7-3530-4862-8523-93e5d38fc1b9",
"status": "queued",
"is_preview": false,
"created_at": "2026-02-28T15:09:17.006604+00:00"
}
Enqueue a production PDF render job. Once processed, it consumes your quota and generates the final PDF.
Response Fields
Unique identifier for the render job. Use this to poll the job status via
GET /reports/{job_id}.curl -X POST "https://api.hookpdf.com/render" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"template_id": "123e4567-e89b-12d3-a456-426614174000",
"payload": {
"name": "John Doe",
"date": "2024-01-01"
},
"options": {
"page_size": "A4",
"orientation": "portrait"
}
}'
const response = await fetch('https://api.hookpdf.com/render', {
method: 'POST',
headers: {
'Authorization': 'Bearer <YOUR_API_KEY>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
template_id: "123e4567-e89b-12d3-a456-426614174000",
payload: {
name: "John Doe",
date: "2024-01-01"
},
options: {
page_size: "A4",
orientation: "portrait"
}
})
});
const result = await response.json();
console.log("Job ID:", result.job_id);
import requests
url = "https://api.hookpdf.com/render"
headers = {
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
}
data = {
"template_id": "123e4567-e89b-12d3-a456-426614174000",
"payload": {
"name": "John Doe",
"date": "2024-01-01"
},
"options": {
"page_size": "A4",
"orientation": "portrait"
}
}
response = requests.post(url, headers=headers, json=data)
print("Job ID:", response.json().get("job_id"))
$url = "https://api.hookpdf.com/render";
$data = [
"template_id" => "123e4567-e89b-12d3-a456-426614174000",
"payload" => [
"name" => "John Doe",
"date" => "2024-01-01"
],
"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 "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 = "John Doe", date = "2024-01-01" },
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", 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 = "John Doe"
date = "2024-01-01"
}
options = @{
page_size = "A4"
orientation = "portrait"
}
} | ConvertTo-Json -Depth 3
$response = Invoke-RestMethod -Uri "https://api.hookpdf.com/render" `
-Method POST -Headers $headers -Body $body
Write-Output "Job ID: $($response.job_id)"
{
"job_id": "7cdb01f7-3530-4862-8523-93e5d38fc1b9",
"status": "queued",
"is_preview": false,
"created_at": "2026-02-28T15:09:17.006604+00:00"
}
Body
application/json
Response
Job queued
Returned when a render job is successfully queued.