Quick Start Guide
Below is a step-by-step guide to get up and running with PDFBolt's PDF generation API quickly. Test with cURL or Postman, or integrate using Node.js, Python, Java, PHP, C#, Go, Rust.
1. Sign Up and Get Your API Keyโ
Start by signing up for an account. Once registered, you'll find your unique API key in the Dashboard under the API Keys section. Every new user is automatically enrolled in our free plan, which provides 100 document conversions per month to explore PDFBoltโs features.
For more details on managing API keys, visit the Dashboard API Keys section.
- Use our Postman collection and start testing API requests in seconds!
- For detailed instructions, check out our Quick Start Guide for Postman.
Click the button below to get started:
2. Set Up Authorizationโ
Securely access PDFBolt's API by including your unique API-KEY in the headers of your REST API requests:
API-KEY: YOUR-API-KEY
3. Make Your First Requestโ
Choose your preferred endpoint and source combination using cURL.
โก๏ธ Endpoints:
- Direct
- Sync
- Async
The Direct endpoint provides immediate PDF generation and returns the raw PDF file in the response.
โก๏ธ Sources:
- URL
- HTML
- Template
Convert any webpage into a PDF:
curl 'https://api.pdfbolt.com/v1/direct' \
-H 'Content-Type: application/json' \
-H 'API-KEY: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
-d '{
"url": "https://example.com",
"format": "A4",
"printBackground": true
}' \
-o webpage.pdf
Convert HTML content directly into a PDF:
curl 'https://api.pdfbolt.com/v1/direct' \
-H 'Content-Type: application/json' \
-H 'API-KEY: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
-d '{
"html": "PGh0bWw+PGJvZHk+PGgxPkhlbGxvITwvaDE+PHA+VGhpcyBpcyBhIHNhbXBsZSBQREYuPC9wPjwvYm9keT48L2h0bWw+",
"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>
Use reusable templates for dynamic PDF generation:
curl 'https://api.pdfbolt.com/v1/direct' \
-H 'Content-Type: application/json' \
-H 'API-KEY: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
-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 Sync endpoint returns a JSON response with a download URL for the PDF.
โก๏ธ Sources:
- URL
- HTML
- Template
Convert webpage and get download URL:
curl 'https://api.pdfbolt.com/v1/sync' \
-H 'Content-Type: application/json' \
-H 'API-KEY: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
-d '{
"url": "https://example.com",
"format": "A4",
"printBackground": true
}'
Convert HTML and get download URL:
curl 'https://api.pdfbolt.com/v1/sync' \
-H 'Content-Type: application/json' \
-H 'API-KEY: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
-d '{
"html": "PGh0bWw+PGJvZHk+PGgxPkhlbGxvITwvaDE+PHA+VGhpcyBpcyBhIHNhbXBsZSBQREYuPC9wPjwvYm9keT48L2h0bWw+",
"margin": {
"top": "30px",
"left": "30px"
}
}'
Use templates and get download URL:
curl 'https://api.pdfbolt.com/v1/sync' \
-H 'Content-Type: application/json' \
-H 'API-KEY: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
-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"
}
]
}
}'
The Async endpoint processes requests asynchronously and sends results via webhook.
โก๏ธ Sources:
- URL
- HTML
- Template
Convert webpage with webhook notification:
curl 'https://api.pdfbolt.com/v1/async' \
-H 'Content-Type: application/json' \
-H 'API-KEY: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
-d '{
"url": "https://example.com",
"format": "A4",
"printBackground": true,
"webhook": "https://your-app.com/webhook"
}'
Convert HTML with webhook notification:
curl 'https://api.pdfbolt.com/v1/async' \
-H 'Content-Type: application/json' \
-H 'API-KEY: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
-d '{
"html": "PGh0bWw+PGJvZHk+PGgxPkhlbGxvITwvaDE+PHA+VGhpcyBpcyBhIHNhbXBsZSBQREYuPC9wPjwvYm9keT48L2h0bWw+",
"margin": {
"top": "30px",
"left": "30px"
},
"webhook": "https://your-app.com/webhook"
}'
Use templates with webhook notification:
curl 'https://api.pdfbolt.com/v1/async' \
-H 'Content-Type: application/json' \
-H 'API-KEY: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
-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"
}'
4. Quick Start for Your Favorite Language and Postmanโ
Ready to get started? Choose your favorite language or tool and follow our tailored stepโbyโstep guides to integrate PDFBolt with ease.