Quick Start Guide
Generate your first PDF in 5 minutes – using cURL, Postman, or your preferred language (Node.js, Python, Java, PHP, C#, Go, Rust).
1. Sign Up and Get Your API Key
Sign up for an account. Once registered, find your API key on the API Keys page in your Dashboard. The free plan includes 100 document conversions per month – no credit card required.
- Import the PDFBolt Postman collection to run API requests without writing code.
- See the Postman Quick Start for setup details.
2. Set Up Authorization
Authenticate by adding your API-KEY to request headers:
API-KEY: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
If your source URLs or webhook endpoints restrict access by source IP, allowlist PDFBolt's static outbound IP addresses.
See IP Addresses for the full list.
3. Make Your First Request
Choose your endpoint based on response type:
- Direct – get the PDF immediately in the response (simplest, recommended for getting started).
- Sync – get a downloadable URL in a JSON response.
- Async – receive a webhook callback when ready (best for high-volume).
Choose your endpoint:
- Direct
- Sync
- Async
Choose your source:
- URL
- HTML
- Template
Convert a webpage to PDF:
curl 'https://api.pdfbolt.com/v1/direct' \
-H 'API-KEY: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://example.com",
"format": "A4",
"printBackground": true
}' \
-o webpage.pdf
Convert HTML to PDF:
curl 'https://api.pdfbolt.com/v1/direct' \
-H 'API-KEY: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
-H 'Content-Type: application/json' \
-d '{
"html": "PGh0bWw+PGJvZHk+PGgxPkhlbGxvITwvaDE+PHA+VGhpcyBpcyBhIHNhbXBsZSBQREYuPC9wPjwvYm9keT48L2h0bWw+",
"format": "A4",
"printBackground": true,
"margin": {
"top": "30px",
"left": "30px"
}
}' \
-o document.pdf
The base64 encoded HTML above represents:
<html><body><h1>Hello!</h1><p>This is a sample PDF.</p></body></html>
Convert a template with data to PDF:
curl 'https://api.pdfbolt.com/v1/direct' \
-H 'API-KEY: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
-H 'Content-Type: application/json' \
-d '{
"templateId": "your-template-id",
"templateData": {
"client_name": "John Doe",
"invoice_number": "INV-001",
"total_amount": "$299.99",
"line_items": [
{
"description": "Web Development",
"unit_price": "$200.00"
},
{
"description": "Design Services",
"unit_price": "$99.99"
}
]
}
}' \
-o invoice.pdf
- Create your first template in the app, then use its ID in your API calls. Learn more about Templates
- You can also generate templates with AI from descriptions or reference files.
The response is the raw PDF binary, saved to the file specified by your -o flag. Open it to view your PDF.
Choose your source:
- URL
- HTML
- Template
Convert a webpage and get a download URL:
curl 'https://api.pdfbolt.com/v1/sync' \
-H 'API-KEY: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://example.com",
"format": "A4",
"printBackground": true
}'
Convert HTML and get a download URL:
curl 'https://api.pdfbolt.com/v1/sync' \
-H 'API-KEY: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
-H 'Content-Type: application/json' \
-d '{
"html": "PGh0bWw+PGJvZHk+PGgxPkhlbGxvITwvaDE+PHA+VGhpcyBpcyBhIHNhbXBsZSBQREYuPC9wPjwvYm9keT48L2h0bWw+",
"format": "A4",
"printBackground": true,
"margin": {
"top": "30px",
"left": "30px"
}
}'
Convert a template with data and get a download URL:
curl 'https://api.pdfbolt.com/v1/sync' \
-H 'API-KEY: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
-H 'Content-Type: application/json' \
-d '{
"templateId": "your-template-id",
"templateData": {
"client_name": "John Doe",
"invoice_number": "INV-001",
"total_amount": "$299.99",
"line_items": [
{
"description": "Web Development",
"unit_price": "$200.00"
},
{
"description": "Design Services",
"unit_price": "$99.99"
}
]
}
}'
- Create your first template in the app, then use its ID in your API calls. Learn more about Templates
- You can also generate templates with AI from descriptions or reference files.
The response is JSON with a documentUrl field – fetch that URL to download your PDF (valid for 24 hours).
The /v1/async endpoint is available on paid plans. Free plan users can use /v1/direct and /v1/sync.
Choose your source:
- URL
- HTML
- Template
Convert a webpage and receive a webhook callback:
curl 'https://api.pdfbolt.com/v1/async' \
-H 'API-KEY: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://example.com",
"format": "A4",
"printBackground": true,
"webhook": "https://your-app.com/webhook"
}'
Convert HTML and receive a webhook callback:
curl 'https://api.pdfbolt.com/v1/async' \
-H 'API-KEY: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
-H 'Content-Type: application/json' \
-d '{
"html": "PGh0bWw+PGJvZHk+PGgxPkhlbGxvITwvaDE+PHA+VGhpcyBpcyBhIHNhbXBsZSBQREYuPC9wPjwvYm9keT48L2h0bWw+",
"format": "A4",
"printBackground": true,
"margin": {
"top": "30px",
"left": "30px"
},
"webhook": "https://your-app.com/webhook"
}'
Convert a template with data and receive a webhook callback:
curl 'https://api.pdfbolt.com/v1/async' \
-H 'API-KEY: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
-H 'Content-Type: application/json' \
-d '{
"templateId": "your-template-id",
"templateData": {
"client_name": "John Doe",
"invoice_number": "INV-001",
"total_amount": "$299.99",
"line_items": [
{
"description": "Web Development",
"unit_price": "$200.00"
},
{
"description": "Design Services",
"unit_price": "$99.99"
}
]
},
"webhook": "https://your-app.com/webhook"
}'
- Create your first template in the app, then use its ID in your API calls. Learn more about Templates
- You can also generate templates with AI from descriptions or reference files.
The response is JSON with a requestId. Your webhook URL receives a POST request with the PDF once it's ready.
4. Integration Guides
Full integration guides for each supported language and for Postman:
📄️ Node.js
📄️ Python
📄️ Java
📄️ PHP
📄️ C#
📄️ Go
📄️ Rust
📄️ Postman
Next Steps
- API Endpoints – Direct, Sync, Async modes and Usage Monitoring.
- Conversion Parameters – customize page size, headers/footers, fonts, and more.
- Error Handling – HTTP status codes and recommended actions.
- Templates – reusable PDF layouts with Handlebars syntax.