Skip to main content

Async Workflow Details

Async conversion lets you queue PDF generation jobs and receive a signed webhook when each job finishes, so your application doesn't need to keep a request open while PDFBolt renders the document.

Async endpoint reference

This is a conceptual overview. For all request parameters and webhook payloads, see the /v1/async endpoint reference.

The /v1/async endpoint is available on paid plans. Free plan users can use /v1/direct or /v1/sync.


The diagram below shows the async conversion flow:

S3 BucketWebhook EndpointPDFBoltClientS3 BucketWebhook EndpointPDFBoltClientPOST /v1/async with webhook URL Return requestId Process PDF in background Upload PDF (to your S3 if custom URL provided) POST signed webhook notification Fetch from documentUrl or bucket

When to Use Async Conversion​

Use async conversion when your application doesn't need the PDF in the same HTTP response and can handle a signed webhook when the job finishes.

Use async whenWhy it helps
You generate PDFs in batches or background jobs.Your application can queue work and continue without holding client requests open.
Conversions may take longer because of large documents, complex templates, or external resources that load slowly.PDFBolt processes the job in the background and notifies your application when it finishes.
You want background generation with direct upload to your own S3-compatible bucket.PDFBolt can upload the generated PDF to your customS3PresignedUrl and send a signed completion webhook.

Your application must provide a publicly accessible HTTPS webhook endpoint.

If you need the conversion result in the same HTTP response, use /v1/direct or /v1/sync.

How Async Conversion Works​

1. Submit a Request​

  • Send a POST request to the /v1/async endpoint.
  • Authenticate with a conversion API key in the API-KEY header.
  • Include the required webhook parameter with your HTTPS webhook URL.

Replace https://your-app.com/endpoint with your HTTPS webhook URL.

Request Example:
{
"url": "https://example.com",
"webhook": "https://your-app.com/endpoint"
}

For all parameters, see the /v1/async endpoint reference and conversion parameters.

2. Receive a Request ID​

  • An accepted request returns 200 OK with a requestId. This confirms acceptance, not successful PDF generation.
  • Requests rejected before acceptance return an HTTP error and do not trigger a webhook.
  • Your application can continue without waiting for PDF generation to complete.
Response Example:
{
"requestId": "7e075770-9c50-4018-a877-fc45c45b7850"
}

3. Background Processing​

  • PDFBolt processes async jobs in the background, and accepted jobs may run in parallel.
  • Rate limits and concurrent request limits apply when submitting async requests. Accepted jobs do not occupy concurrent request slots while processing in the background.
  • By default, PDFBolt makes one conversion attempt. Use retryDelays to schedule additional attempts after a failure.

4. Direct S3 Upload (Optional)​

  • If you provide a customS3PresignedUrl, the generated PDF is uploaded directly to your S3‑compatible bucket.
  • Use a presigned PUT URL that remains valid until the upload completes, including any conversion retries.
  • If customS3PresignedUrl is omitted, PDFBolt stores the PDF for 24 hours.

5. Webhook Notification​

  • After the conversion succeeds or all conversion attempts fail, PDFBolt attempts one POST request to your webhook URL.
  • Every webhook request includes an x-pdfbolt-signature header. Verify the signature before processing the payload. See Webhook Signature Verification for details.

The webhook payload differs depending on whether you use default storage or a custom S3 bucket:

Default Storage – Success Example:
{
"requestId": "7e075770-9c50-4018-a877-fc45c45b7850",
"status": "SUCCESS",
"errorCode": null,
"errorMessage": null,
"documentUrl": "https://s3.pdfbolt.com/pdfbolt_09366e47-2423-48c7-af8b-5eea118b49b3_2026-05-05T18-28-00Z.pdf",
"expiresAt": "2026-05-06T18:28:00Z",
"isAsync": true,
"duration": 626,
"documentSizeMb": 0.02,
"isCustomS3Bucket": false
}
Custom S3 – Success Example:
{
"requestId": "7e075770-9c50-4018-a877-fc45c45b7850",
"status": "SUCCESS",
"errorCode": null,
"errorMessage": null,
"documentUrl": null,
"expiresAt": null,
"isAsync": true,
"duration": 626,
"documentSizeMb": 0.02,
"isCustomS3Bucket": true
}

When isCustomS3Bucket is true, the PDF is stored in your bucket. Both documentUrl and expiresAt are null.

For the full list of webhook fields, see webhook request parameters.

Failure webhooks

If all conversion attempts fail, PDFBolt attempts to deliver a webhook with status: "FAILURE", errorCode, and errorMessage. The documentUrl, expiresAt, and documentSizeMb fields are null. See the full failure example.

6. Retrieve the PDF​

  • Default storage: download the PDF from documentUrl before expiresAt (24 hours after generation).
  • Custom S3: the PDF is stored in your bucket at the location specified when you generated the presigned URL.

Webhook Delivery Behavior​

Keep the following in mind when handling webhooks:

  • PDFBolt attempts one webhook callback per accepted conversion after the conversion succeeds or all conversion attempts fail.
  • retryDelays retries the conversion attempt itself, not webhook delivery.
  • Store the requestId returned by the API so you can match each webhook to the original conversion request.
  • If your webhook endpoint is unavailable when PDFBolt sends the callback (timeout, 5xx, network error), the delivery is not automatically retried. If the webhook does not arrive, check the conversion status and Webhook Result in your Dashboard’s Request Logs.
  • After verifying the signature, return a fast 2xx response and run any slow follow-up work in your own background job.

For more details, see Webhook Delivery Behavior in the endpoint reference.