PDF
Create PDF async
Get Started
Templating
API Documentation
Sync/Async options
PDF
Create PDF async
Queue the creation of a PDF and call the webhook with the result.
POST
/
v1
/
pdf
/
async
curl --request POST \
--url https://api.doczilla.app/v1/pdf/async \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"page": {
"url": "<string>",
"html": "<string>",
"htmlTemplate": "<string>",
"templateData": {},
"waitUntil": "auto",
"waitForMilliseconds": 2500,
"waitForSelector": {
"selector": "<string>",
"options": {
"visible": false,
"hidden": false,
"timeout": 10000
}
},
"waitForFunction": {
"pageFunction": "window.innerWidth < 100",
"options": {
"polling": "raf",
"timeout": 10000
}
},
"headers": {
"x-foo": "bar"
},
"adblock": true,
"javascript": true,
"cookies": [
{
"name": "<string>",
"value": "<string>",
"domain": "<string>",
"url": "<string>",
"path": "<string>",
"secure": true,
"httpOnly": true,
"sameSite": "Strict",
"expires": 123
}
],
"authentication": {
"username": "<string>",
"password": "<string>"
},
"colorScheme": "<string>",
"mediaType": "screen",
"timezone": "<string>"
},
"pdf": {
"scale": 1,
"displayHeaderFooter": false,
"headerHtml": "<string>",
"footerHtml": "<string>",
"printBackground": false,
"landscape": false,
"pageRanges": "1-5",
"format": "letter",
"width": "<string>",
"height": "<string>",
"preferCSSPageSize": false,
"margin": {
"top": "<string>",
"bottom": "<string>",
"left": "<string>",
"right": "<string>"
},
"omitBackground": false,
"outline": false,
"tagged": false
},
"storage": {
"preSignedUrl": "<string>"
},
"webhook": {
"receiveType": "URL",
"url": "<string>",
"method": "POST",
"headers": {},
"metadata": {}
}
}'
{
"id": "5KqYNUjbxRJ-rKbIeGsXo",
"status": "PENDING"
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Response
201
application/json
The response is of type object
.
Was this page helpful?
curl --request POST \
--url https://api.doczilla.app/v1/pdf/async \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"page": {
"url": "<string>",
"html": "<string>",
"htmlTemplate": "<string>",
"templateData": {},
"waitUntil": "auto",
"waitForMilliseconds": 2500,
"waitForSelector": {
"selector": "<string>",
"options": {
"visible": false,
"hidden": false,
"timeout": 10000
}
},
"waitForFunction": {
"pageFunction": "window.innerWidth < 100",
"options": {
"polling": "raf",
"timeout": 10000
}
},
"headers": {
"x-foo": "bar"
},
"adblock": true,
"javascript": true,
"cookies": [
{
"name": "<string>",
"value": "<string>",
"domain": "<string>",
"url": "<string>",
"path": "<string>",
"secure": true,
"httpOnly": true,
"sameSite": "Strict",
"expires": 123
}
],
"authentication": {
"username": "<string>",
"password": "<string>"
},
"colorScheme": "<string>",
"mediaType": "screen",
"timezone": "<string>"
},
"pdf": {
"scale": 1,
"displayHeaderFooter": false,
"headerHtml": "<string>",
"footerHtml": "<string>",
"printBackground": false,
"landscape": false,
"pageRanges": "1-5",
"format": "letter",
"width": "<string>",
"height": "<string>",
"preferCSSPageSize": false,
"margin": {
"top": "<string>",
"bottom": "<string>",
"left": "<string>",
"right": "<string>"
},
"omitBackground": false,
"outline": false,
"tagged": false
},
"storage": {
"preSignedUrl": "<string>"
},
"webhook": {
"receiveType": "URL",
"url": "<string>",
"method": "POST",
"headers": {},
"metadata": {}
}
}'
{
"id": "5KqYNUjbxRJ-rKbIeGsXo",
"status": "PENDING"
}