PDF webhook API

Know when your PDF is ready. Keep your app moving.

Submit the render job, then handle the result asynchronously. JayCode sends the job outcome in the X-Webhook-Event header, with a signed PDF download URL for completed jobs.

Three parts of the delivery flow

  1. Submit a job

    Send your blueprint reference and variables through your integration. Rendering runs asynchronously.

  2. Receive the event

    Use X-Webhook-Event to distinguish job.completed from job.failed.

  3. Process the result

    For completion, associate jobId with your application record and use the signed downloadUrl before it expires.

A production completion webhook

The event name is an HTTP header, separate from the JSON body. This production example includes a completed job with execution diagnostics.

HTTP event header
X-Webhook-Event: job.completed
Completion body · JSON
{
  "jobId": "1234567890",
  "downloadUrl": "https://example.com/signed-url-to-download-pdf",
  "downloadUrlExpiresAt": "1789221474",
  "executionLogs": {
      "execution": [
        {
          "path": "job",
          "messages": [
            {
              "path": "job/task[<inline>]/Compilation/Body/0/InsertNode<TableNodeSpec>",
              "messages": [
                {
                  "type": "Warning",
                  "message": "ImageNode: resource 'company_logo' not found in resource map, skipping"
                }
              ]
            },
            {
              "path": "job/task[<inline>]/Compilation/Body/2/ExecuteNode<TableNodeSpec>/tbody/TableRowNodeSpec/TableCellNodeSpec/ComputedValueNodeSpec",
              "messages": [
                {
                  "type": "InvalidValue",
                  "message": "Computed value node expression evaluated to undefined and the node will be ignored"
                }
              ]
            },
            {
              "path": "job/task[<inline>]/Compilation/Footer/1/ExecuteNode<ParagraphNodeSpec>/ComputedValueNodeSpec",
              "messages": [
                {
                  "type": "InvalidValue",
                  "message": "Computed value node expression evaluated to undefined and the node will be ignored"
                }
              ]
            }
          ]
        }
      ]
    }
  }

What to read in the payload

jobId
Identifies the render job that produced this event.
downloadUrl
A signed link to the completed PDF. The example uses a placeholder URL.
downloadUrlExpiresAt
Epoch time in seconds, in UTC. This payload represents it as a string; convert it to a number when comparing times. JavaScript dates use milliseconds, so multiply by 1,000.
executionLogs
Nested diagnostics with document paths and messages. Preserve the paths when investigating a template issue.
Completed does not mean free of warnings

In this event, company_logo was missing and skipped. Other computed values evaluated to undefined and their nodes were ignored. Review these diagnostics if a completed PDF is missing expected content.

Connect the event to your application

Use the client’s webhook handling flow for signed callbacks. The home page includes Python examples for setup, render submission, and webhook processing.

Open the Python client examples →

On completion

Record the job outcome, inspect diagnostics, and retrieve the PDF within the signed URL’s validity period.

On failure

Record the failure and investigate the reported issue before submitting a corrected job. The completion example above does not define the failure payload.

In your handler

As an application design practice, make repeated processing safe by tracking events against the job ID. Keep PDF distribution separate from recording the outcome.

Build your first document

Start with a blueprint. Make it yours.

Explore working examples, then connect a render job to your application.