Skip to content

HTML → PDF (async job)

POST
/v1/utilities/html-pdf/jobs

Renders an HTML document (public URL or s3://) to PDF in headless Chromium, with page size, orientation, scale and margins.

Async: answers 202 immediately with a queued job. Get the result with getJob (?wait=30 long-polls), or pass callbackUrl to receive the finished job as a signed POST. Runs up to 15 min.

Authorizations

apiKey

An API key from the console (API keys). Only its SHA-256 is stored; it is shown once.

Type
HTTP (bearer)

Parameters

Header Parameters

Idempotency-Key

Makes retries safe: re-sending the same key (per API key) returns the original job with Idempotent-Replayed: true instead of running again. Reusing it for a different utility → 409.

Type
string
Max Length
200

Request Body

application/json
JSON
{
  
"input": {
  
  
"url": "https://example.com/invoice.html",
  
  
"pdfOptions": {
  
  
  
"format": "A4",
  
  
  
"orientation": "portrait",
  
  
  
"printBackground": true,
  
  
  
"margin": {
  
  
  
  
"top": "12mm",
  
  
  
  
"bottom": "12mm"
  
  
  
}
  
  
}
  
},
  
"metadata": {
  
  
"orderId": "ORD-1042"
  
},
  
"callbackUrl": "https://billing.finnoto.com/hooks/developer-utils"
}

Responses

Accepted — the job is queued. Location points at it.

application/json
JSON
{
  
"id": "job_01K7Z3Q4N5P6R7S8T9V0W1X2Y3",
  
"object": "job",
  
"utility": "html-pdf",
  
"mode": "async",
  
"status": "queued",
  
"createdAt": "2026-09-10T17:30:08.412Z",
  
"startedAt": null,
  
"finishedAt": null,
  
"timings": {
  
  
"queueMs": null,
  
  
"upstreamMs": null,
  
  
"storageMs": null,
  
  
"totalMs": null
  
},
  
"metadata": {
  
  
"orderId": "ORD-1042"
  
},
  
"result": null,
  
"error": null,
  
"callback": {
  
  
"url": "https://billing.finnoto.com/hooks/developer-utils",
  
  
"status": "pending",
  
  
"attempts": 0
  
},
  
"links": {
  
  
"self": "/v1/jobs/job_01K7Z3Q4N5P6R7S8T9V0W1X2Y3"
  
}
}

Playground

Authorization
Headers
Body

Samples

Powered by VitePress OpenAPI

ServiceLabs · a Finnoto company