Skip to main content
POST https://api.pdfnoodle.com/v1/pdf/async

Request

curl --location 'https://api.pdfnoodle.com/v1/pdf/async' \
--header 'Authorization: Bearer pdfnoodle_api_123456789' \
--header 'Content-Type: application/json' \
--data '{
    "templateId": "check",
    "webhook": "https://webhook.url",
    "data": {
        "currentDDate": "01/12/2025",
        "user": {
            "name": "John Doe",
            "email": "[email protected]"
        },
        "details": [{"score": "100", "description": "high score"}]
    }
}'

Response

{
  "requestId": "pdfnoodle_request_123456789"
}
This endpoint responds with 200 OK immediately with a requestId. After a few seconds, the PDF file will be generated and we will send a POST to your webhook with the response body shown above. The renderStatus could be either SUCCESS or FAILED.
If the request FAILED, you should contact support to figure out why your PDF generation failed.
The response body will contain a signedUrl key which is a temporary URL pointing to the generated PDF file on our S3 bucket. If you passed a custom s3_bucket, it’ll be stored there instead. This URL will expire after 1 hour.

PDF Render Metadata

We’ll also bring some additional metadata from your PDF render with every response:
  • executionTime - Time in seconds it took to generate your PDF
  • fileSize - PDF size in kiloBytes

Parameters

templateId
string
required
The id of your PDF template
webhook
string
required
The url of your webhook
data
object
required
The object containing the variables from your PDF template
convertToImage
boolean
If true, will return a .PNG file instead of a .PDF file (default: false)
metadata
object
This object containing the metadata for your PDF. See all the options here.
s3_bucket
string
The id of the active s3 connection you want to store your generated file on. (only available in the high plan)
s3_key
string
The path, including subdirectories and the filename without extension, to use when saving the render in your S3 bucket. (only available if being stored in custom s3_bucket)
externalId
string
If you’re using our embedded white-label solution, you can pass the UUID of your customer to generate the PDF of the customized template
hasCover
boolean
If true, will hide the footer and the header elements on the first page of the generated PDF. (default: false)
debug
boolean
If true, will enter Debug Mode and show additional properties on the response to help you figure out your variables and html rendered content. Here’s everything you need to know about Debug Mode. (default: false)

Checking PDF Status

Instead of waiting for the webhook, you can also check the status of your PDF generation by polling the Get PDF Status endpoint using the requestId returned from this request.