Integrations & API
Connect Personalia with your favorite tools and automate your creative workflows with our developer-friendly API.
Connect With Your Tools
Personalia integrates seamlessly with your favorite platforms and automation tools.

Zapier
Connect Personalia to 5,000+ apps without coding

Make
Create complex automations with visual workflows

n8n
Open-source workflow automation with self-hosting options

WordPress
Integrate with WordPress and Elementor for dynamic websites

Enfocus Switch
Integrate with Enfocus Switch for dynamic content
1. Request PDF Generation
Start by sending a POST request to generate a PDF document with your template and data.
// 1. Request PDF generation
const response = await fetch(
'https://api.personalia.io/v1/content',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'ApiKey YOUR_API_KEY'
},
body: JSON.stringify({
TemplateId: 'c790fd3b-10ef-4a58-963b-b688e564eefa',
Fields: {
'First Name': 'John',
'Machine': 'AK-2000',
'Color': 'Blue'
},
Output: {
Format: 'PDF',
Quality: 'Display',
Package: false,
StrictPolicy: true
}
})
}
);
// 2. Get the request ID for polling
const { RequestId } = await response.json();
2. Poll for Completion
Poll the API to check if your PDF is ready for download. Once it is ready the URL to the asset remains live for 30 minutes.
// 3. Poll for completion
const getResult = async () => {
const result = await fetch(
`https://api.personalia.io/v1/content?requestId=${RequestId}`,
{
headers: {
'Authorization': 'ApiKey YOUR_API_KEY'
}
}
);
return await result.json();
};
// 4. Check status periodically
let result = await getResult();
while (result.Status === 'InProgress') {
await new Promise(resolve => setTimeout(resolve, 1000));
result = await getResult();
}
// 5. Handle the result
if (result.Status === 'Completed') {
console.log('Download URL:', result.URLs[0]);
// URL is valid for 15 minutes
} else if (result.Status === 'Failed') {
console.error('Generation failed:', result.FailureDescription);
}
API Endpoint Comparison
Personalia offers two different approaches to content generation through our API, each suited for different use cases.
Immediate Rendering
Endpoints: POST /v1/content + GET /v1/content
The POST request triggers immediate rendering of your asset, and you poll the GET endpoint until the asset is ready for download. Once complete, the download URL remains valid for 30 minutes.
Best for:
- Immediate content needs
- Batch processing
- Server-side applications
- When you need the asset right away
This method is best when you need the asset immediately. Credits are charged immediately
On-Demand Rendering
Endpoint: POST /v1/content/url
This endpoint immediately returns a URL that stays valid for 30 days. The asset is only rendered and delivered when someone accesses the URL, and the final document is returned directly to the user.
Best for:
- Email campaigns with document links
- Cost optimization (only pay when rendered)
- User-triggered document generation
- When immediate rendering isn't needed
This method is best for when you want to generate content on demand and only pay for credits when the asset is rendered.
Quick Start API Guide
Get started quickly with our API. For full documentation, visit developer.personalia.io
Authentication
All API requests must include an Authorization
header with your API key in the format:
You can find your API key in the API Keys section of your Personalia dashboard.
// Generate a document using JavaScript
const response = await fetch('https://api.personalia.io/v1/content', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'ApiKey YOUR_API_KEY'
},
body: JSON.stringify({
TemplateId: 'c790fd3b-10ef-4a58-963b-b688e564eefa',
Fields: {
'First Name': 'John',
'Machine': 'AK-2000',
'Color': 'Blue'
},
Output: {
Format: 'PDF',
Quality: 'Display'
}
})
});
const { RequestId } = await response.json();
# Generate a document using Python
import requests
url = "https://api.personalia.io/v1/content"
headers = {
"Authorization": "ApiKey YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"TemplateId": "c790fd3b-10ef-4a58-963b-b688e564eefa",
"Fields": {
"First Name": "John",
"Machine": "AK-2000",
"Color": "Blue"
},
"Output": {
"Format": "PDF",
"Quality": "Display"
}
}
response = requests.post(url, headers=headers, json=data)
result = response.json()
request_id = result.get('RequestId')
# Generate a document using cURL
curl -X POST https://api.personalia.io/v1/content \
-H "Authorization: ApiKey YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"TemplateId": "c790fd3b-10ef-4a58-963b-b688e564eefa",
"Fields": {
"First Name": "John",
"Machine": "AK-2000",
"Color": "Blue"
},
"Output": {
"Format": "PDF",
"Quality": "Display"
}
}'
API Endpoints
Generate a document from a template
Parameters
Name | Type | Required | Description |
---|---|---|---|
TemplateId | string | Required | ID of the Personalia template to use |
Fields | object | Required | Key-value pairs of template fields |
Output | object | Optional | Output configuration (format, quality, resolution, etc.)Default: {"Format": "PDF", "Quality": "Display", "Package": false} |
Get the status and result of a content generation request
Parameters
Name | Type | Required | Description |
---|---|---|---|
requestId | string | Required | ID of the content generation request |
Generate a URL that creates content when accessed
Parameters
Name | Type | Required | Description |
---|---|---|---|
TemplateId | string | Required | ID of the Personalia template to use |
Fields | object | Required | Key-value pairs of template fields |
Output | object | Optional | Output configuration (only PDF format is supported for URLs)Default: {"Format": "PDF", "Quality": "Display"} |
Get information about a template including its fields
Parameters
Name | Type | Required | Description |
---|---|---|---|
templateId | string | Required | ID of the template |
API Workflow
Create Templates
Design your templates in InDesign and upload them to Personalia through the dashboard.
Get Your API Key
Create an account and get your API key from the Personalia dashboard.
Generate Content
Use the API to generate personalized PDFs or images with data from your app, service or platform.
Error Handling
The API uses standard HTTP status codes to indicate success or failure of an API request.
Error Response Example
{
"error": {
"code": "invalid_request_error",
"message": "The request was invalid. Check the request parameters and try again.",
"param": "templateId",
"type": "invalid_request_error"
}
}
Common Error Codes
Status Code | Description |
---|---|
400 | Bad Request - Invalid request format or parameters |
401 | Unauthorized - Invalid or missing API key |
403 | Forbidden - Insufficient permissions |
404 | Not Found - Resource not found |
429 | Too Many Requests - Rate limit exceeded |
5xx | Server Error - Something went wrong on our end |