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",
    "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": true,
    "headerHtml": "<string>",
    "footerHtml": "<string>",
    "printBackground": true,
    "landscape": true,
    "pageRanges": "1-5",
    "format": "letter",
    "width": "<string>",
    "height": "<string>",
    "preferCSSPageSize": true,
    "margin": {
      "top": "<string>",
      "bottom": "<string>",
      "left": "<string>",
      "right": "<string>"
    },
    "omitBackground": true,
    "outline": true,
    "tagged": true
  },
  "storage": {
    "preSignedUrl": "<string>"
  },
  "webhook": {
    "receiveType": "URL",
    "url": "<string>",
    "method": "POST",
    "headers": {},
    "metadata": {}
  }
}'
{
  "id": "5KqYNUjbxRJ-rKbIeGsXo",
  "status": "PENDING"
}

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
page
object
required

Page options, either provide the url, html or htmlTemplate option.

pdf
object
storage
object
webhook
object
required

Webhook to call when screenshot is generated.

Response

201 - application/json
id
string
required

Id of the queued job.

status
enum<string>
required

Status of the job.

Available options:
PENDING,
RUNNING,
FAILED,
COMPLETED