PDFMonkey
App · Documents · 14 actions
Generate PDFs and images from your PDFMonkey templates, manage the documents they produce, and create and edit the templates themselves.
Actions
| Action | What it does |
|---|---|
| Create a document | Queue a document for generation without waiting for it, or save it as a draft. |
| Create a template | Create a template from HTML and CSS, with its page settings, ready to generate documents from. |
| Delete a document | Permanently delete a document from PDFMonkey, along with the file it generated. |
| Delete a template | Permanently delete a template. |
| Download a document | Save a finished document's file so a later step can email, upload, or store it. |
| Generate a document | Fill in one of your PDFMonkey templates and wait for the finished file. |
| Get a document | Check whether a document has finished generating, and get its details and a fresh download link. |
| Get a template | Read a template in full: its HTML, styles, test data and page settings, both as published and as being edited. |
| Get account | Get the PDFMonkey account's plan and how many documents it allows this period, for example to check before a large batch. |
| List documents | List the documents on the account, newest first, optionally narrowed to one template, status or workspace. |
| List templates | List the templates on the account, with the ID needed to generate a document from each one. |
| List workspaces | List the PDFMonkey workspaces the API key can reach, with the ID a new template needs. |
| Update a document | Change a document's data and generate it again: for example to correct a total on an invoice, to generate a draft that was created earlier, or to try again after a failure. |
| Update a template | Change a template's name, HTML, styles, test data or page settings. |
Create a document
Queue a document for generation without waiting for it, or save it as a draft. Use this for large batches, then check on it later; to get the file in one step, use 'Generate a document' instead.
Inputs
- Template
template_idtextRequired - The PDFMonkey template to generate from. Pick one of your templates, or use a template ID from an earlier step.
- Template data
payloadobjectRequired - The fields and values that fill in the template's placeholders, for example the customer name or order total. An object, or its JSON text.
- File name
filenametext - Name for the generated file, for example 'invoice-1042'. PDFMonkey adds the right extension itself. Leave empty to let PDFMonkey name it.
- Extra details
metadataobject - Optional extra details to store with the document, for example an order reference. They come back with the document, so a later step can read them. An object, or its JSON text.
- Start generating
generatetrue/false - Start generating the document straight away. Turn this off to save it as a draft and generate it later with 'Update a document'.Default:
true. - PDF password
passwordtext - Lock the PDF so it opens only with this password. Leave empty for no password. Images can't be locked.
- Image format
image_formattext - For a template that makes images: the format to make. PDFMonkey makes WebP when this is empty. Ignored for PDFs.One of:
webp(WebP (PDFMonkey's default)),png,jpg. - Image width (pixels)
image_widthnumber - For a template that makes images: the width in pixels, instead of the template's own. Ignored for PDFs.At least 1.
- Image height (pixels)
image_heightnumber - For a template that makes images: the height in pixels, instead of the template's own. Ignored for PDFs.At least 1.
- Image quality
image_qualitynumber - For a WebP image: the quality from 1 to 100. PDFMonkey uses 100 when this is empty.From 1 to 100.
Outputs
created_attext- When the document was created.
document_idtext- The ID of the document in PDFMonkey.
document_statustext- Where the document is in the generation process: "draft", "pending", "generating", "success", or "failure".
download_urltext- PDFMonkey's link to download the finished file. Empty until the document is ready, and it stops working an hour after it is issued.
failure_reasontext- Why generation failed, when the document failed to generate.
filenametext- Name of the generated file.
metaobject- The extra details stored with the document, including its file name under _filename. A PDF password is never shown here.
output_typetext- The kind of file the template produces: "pdf" or "image".
preview_urltext- Link for previewing the document in a browser.
public_share_linktext- Permanent public link to the file. Only set on PDFMonkey plans with share links (Pro+, Premium and the trial).
template_idtext- The ID of the template the document was generated from.
template_nametext- The name of that template, as shown in PDFMonkey.
updated_attext- When the document was last updated.
workspace_idtext- The ID of the PDFMonkey workspace the document belongs to.
Example output
{
"created_at": "2026-03-13T12:34:56.181+02:00",
"document_id": "a5e86d72-f5b7-43d4-a04e-8b7e08e6741c",
"document_status": "pending",
"download_url": "https://pdfmonkey.s3.eu-west-1.amazonaws.com/invoice-1042.pdf",
"failure_reason": "",
"filename": "invoice-1042.pdf",
"meta": {
"_filename": "invoice-1042.pdf",
"orderRef": "1042"
},
"output_type": "pdf",
"preview_url": "https://preview.pdfmonkey.io/pdf/web/viewer.html?file=...",
"public_share_link": "",
"template_id": "2903f5b4-623b-4e10-b2e3-dc7e2e67ea39",
"template_name": "Invoice",
"updated_at": "2026-03-13T12:34:59.412+02:00",
"workspace_id": "d6b4e8f2-7a3c-4d1e-9f5b-2c8a1d3e6f90"
}Create a template
Create a template from HTML and CSS, with its page settings, ready to generate documents from. The HTML can hold Liquid placeholders that each document fills in.
Inputs
- Template name
nametextRequired - The template's name, as shown in PDFMonkey (up to 100 characters).
- Workspace
workspace_idtext - The PDFMonkey workspace to create the template in. Leave empty when the account has only one.
- HTML
bodytext - The template's HTML, with Liquid placeholders such as {{customer_name}} for the values each document fills in.
- CSS
stylestext - CSS or SCSS for the template's HTML. It doesn't apply to the header and footer.
- Test data
sample_dataobject - Example values the PDFMonkey dashboard previews the template with, as an object or its JSON text. Documents use their own data.
- Makes
output_typetext - Whether the template makes PDFs or images. PDFMonkey makes PDFs when this is empty.One of:
pdf,image(Image (WebP, PNG or JPG)). - Editor
edition_modetext - How the template is edited in PDFMonkey: with code (HTML and CSS, the default) or in the visual builder. The HTML and CSS fields only apply to code templates.One of:
code(Code (HTML and CSS)),builder(Visual builder). - Paper size
paper_formattext - The page size of the PDFs the template makes.One of:
a4,letter(US Letter),a0,a1,a2,a3,a5,a6,custom(Custom size). - Orientation
orientationtext - Whether pages are upright (portrait) or sideways (landscape).One of:
portrait,landscape. - Paper width (mm)
paper_widthnumber - For a custom paper size: the page width in millimeters.Only when Paper size is Custom size. At least 1.
- Paper height (mm)
paper_heightnumber - For a custom paper size: the page height in millimeters.Only when Paper size is Custom size. At least 1.
- Top margin (mm)
margin_topnumber - Space at the top of each page, in millimeters. PDFMonkey uses 10 when it isn't set. A header needs room here.At least 0.
- Bottom margin (mm)
margin_bottomnumber - Space at the bottom of each page, in millimeters. PDFMonkey uses 10 when it isn't set. A footer needs room here.At least 0.
- Left margin (mm)
margin_leftnumber - Space at the left of each page, in millimeters. PDFMonkey uses 10 when it isn't set.At least 0.
- Right margin (mm)
margin_rightnumber - Space at the right of each page, in millimeters. PDFMonkey uses 10 when it isn't set.At least 0.
- More settings
settingsobject - Other page settings, as an object or its JSON text, for example {"footer": {"right": "Page [page] of [topage]"}, "use_emojis": true}. The step's own page fields win over the same settings here.
- Keep documents for
retentiontext - How long PDFMonkey keeps the documents made from this template before deleting them. A period your plan doesn't allow becomes its longest.One of:
300(5 minutes),1200(20 minutes),3600(1 hour),86400(1 day),604800(1 week (Pro plan or higher)),2592000(1 month (Pro+ or Premium)),31536000(1 year (Pro+ or Premium)),0(Never delete (Pro+ or Premium)). - Publish
publishtrue/false - Publish the template, so documents can be generated from it straight away. Turn this off to save it as a draft to review and publish in the PDFMonkey dashboard.Default:
true.
Outputs
bodytext- The published HTML and Liquid that documents are generated from.
body_drafttext- The HTML and Liquid being edited, not yet used for documents.
created_attext- When the template was created.
edition_modetext- How the template is edited: "code" (HTML and CSS) or "builder" (PDFMonkey's visual builder).
engine_idtext- The ID of the rendering engine documents are generated with.
folder_idtext- The ID of that folder, if any.
nametext- The template's name, as shown in PDFMonkey.
output_typetext- What the template produces: "pdf" or "image".
preview_urltext- Link that previews the template's draft in a browser.
retention_secondsnumber- How long documents made from the template are kept before PDFMonkey deletes them, in seconds. 0 keeps them for good.
sample_dataobject- The published test data PDFMonkey previews the template with.
sample_data_draftobject- The test data being edited, used for the dashboard preview.
settingsobject- The published page settings: paper_format, orientation, margin (in millimeters), header, footer and the rest.
settings_draftobject- The page settings being edited.
stylestext- The published CSS or SCSS styles.
styles_drafttext- The CSS or SCSS styles being edited.
template_idtext- The template's ID, used to generate a document from it.
updated_attext- When the template was last updated.
workspace_idtext- The ID of the PDFMonkey workspace the template belongs to.
Example output
{
"body": "<h1>Invoice {{number}}</h1><p>Total: {{total}}</p>",
"body_draft": "<h1>Invoice {{number}}</h1><p>Total: {{total}}</p>",
"created_at": "2026-01-08T09:12:04.512+02:00",
"edition_mode": "code",
"engine_id": "5c709522-90db-4aea-b49f-15aeaa7180c7",
"folder_id": "",
"name": "Invoice",
"output_type": "pdf",
"preview_url": "https://preview.pdfmonkey.io/pdf/web/viewer.html?file=...",
"retention_seconds": 86400,
"sample_data": {
"number": "INV-001",
"total": "$123.50"
},
"sample_data_draft": {
"number": "INV-001",
"total": "$123.50"
},
"settings": {
"footer": {
"right": "Page [page] of [topage]"
},
"margin": {
"bottom": 20,
"left": 15,
"right": 15,
"top": 20
},
"orientation": "portrait",
"paper_format": "a4"
},
"settings_draft": {
"footer": {
"right": "Page [page] of [topage]"
},
"margin": {
"bottom": 20,
"left": 15,
"right": 15,
"top": 20
},
"orientation": "portrait",
"paper_format": "a4"
},
"styles": "h1 { color: #333; }",
"styles_draft": "h1 { color: #333; }",
"template_id": "2903f5b4-623b-4e10-b2e3-dc7e2e67ea39",
"updated_at": "2026-02-27T16:40:11.902+02:00",
"workspace_id": "d6b4e8f2-7a3c-4d1e-9f5b-2c8a1d3e6f90"
}Delete a document
Permanently delete a document from PDFMonkey, along with the file it generated.
Inputs
- Document ID
document_idtextRequired - The ID of the PDFMonkey document to delete.
Outputs
deletedtrue/false- Whether the document was deleted.
document_idtext- The ID of the document that was deleted.
Example output
{
"deleted": true,
"document_id": "a5e86d72-f5b7-43d4-a04e-8b7e08e6741c"
}Delete a template
Permanently delete a template. Documents already made from it are kept.
Inputs
- Template
template_idtextRequired - The template to delete.
Outputs
deletedtrue/false- Whether the template was deleted.
template_idtext- The ID of the template that was deleted.
Example output
{
"deleted": true,
"template_id": "2903f5b4-623b-4e10-b2e3-dc7e2e67ea39"
}Download a document
Save a finished document's file so a later step can email, upload, or store it. The document must have generated successfully.
Inputs
- Document ID
document_idtextRequired - The ID of the PDFMonkey document to download.
Outputs
content_typetext- MIME type of the saved file
created_attext- When the document was created.
document_idtext- The ID of the document in PDFMonkey.
document_reftext- Reference to the saved file, for use by a later step
document_statustext- Where the document is in the generation process: "draft", "pending", "generating", "success", or "failure".
documentslist- The generated file, in the shape steps that send or upload files expect
download_urltext- PDFMonkey's link to download the finished file. Empty until the document is ready, and it stops working an hour after it is issued.
failure_reasontext- Why generation failed, when the document failed to generate.
filenametext- Name of the generated file.
metaobject- The extra details stored with the document, including its file name under _filename. A PDF password is never shown here.
output_typetext- The kind of file the template produces: "pdf" or "image".
preview_urltext- Link for previewing the document in a browser.
public_share_linktext- Permanent public link to the file. Only set on PDFMonkey plans with share links (Pro+, Premium and the trial).
size_bytesnumber- Size of the file in bytes
template_idtext- The ID of the template the document was generated from.
template_nametext- The name of that template, as shown in PDFMonkey.
updated_attext- When the document was last updated.
urltext- Download URL for the saved file, served by Lodol
workspace_idtext- The ID of the PDFMonkey workspace the document belongs to.
Example output
{
"content_type": "application/pdf",
"created_at": "2026-03-13T12:34:56.181+02:00",
"document_id": "a5e86d72-f5b7-43d4-a04e-8b7e08e6741c",
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"document_status": "success",
"documents": [
{
"content_type": "application/pdf",
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"filename": "invoice-1042.pdf",
"size_bytes": 84213,
"url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
}
],
"download_url": "https://pdfmonkey.s3.eu-west-1.amazonaws.com/invoice-1042.pdf",
"failure_reason": "",
"filename": "invoice-1042.pdf",
"meta": {
"_filename": "invoice-1042.pdf",
"orderRef": "1042"
},
"output_type": "pdf",
"preview_url": "https://preview.pdfmonkey.io/pdf/web/viewer.html?file=...",
"public_share_link": "",
"size_bytes": 84213,
"template_id": "2903f5b4-623b-4e10-b2e3-dc7e2e67ea39",
"template_name": "Invoice",
"updated_at": "2026-03-13T12:34:59.412+02:00",
"url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001",
"workspace_id": "d6b4e8f2-7a3c-4d1e-9f5b-2c8a1d3e6f90"
}Generate a document
Fill in one of your PDFMonkey templates and wait for the finished file. The document is saved so a later step can email, upload, or store it. Each document counts against your PDFMonkey quota.
Inputs
- Template
template_idtextRequired - The PDFMonkey template to generate from. Pick one of your templates, or use a template ID from an earlier step.
- Template data
payloadobjectRequired - The fields and values that fill in the template's placeholders, for example the customer name or order total. An object, or its JSON text.
- File name
filenametext - Name for the generated file, for example 'invoice-1042'. PDFMonkey adds the right extension itself. Leave empty to let PDFMonkey name it.
- Extra details
metadataobject - Optional extra details to store with the document, for example an order reference. They come back with the document, so a later step can read them. An object, or its JSON text.
- PDF password
passwordtext - Lock the PDF so it opens only with this password. Leave empty for no password. Images can't be locked.
- Image format
image_formattext - For a template that makes images: the format to make. PDFMonkey makes WebP when this is empty. Ignored for PDFs.One of:
webp(WebP (PDFMonkey's default)),png,jpg. - Image width (pixels)
image_widthnumber - For a template that makes images: the width in pixels, instead of the template's own. Ignored for PDFs.At least 1.
- Image height (pixels)
image_heightnumber - For a template that makes images: the height in pixels, instead of the template's own. Ignored for PDFs.At least 1.
- Image quality
image_qualitynumber - For a WebP image: the quality from 1 to 100. PDFMonkey uses 100 when this is empty.From 1 to 100.
Outputs
content_typetext- MIME type of the saved file
created_attext- When the document was created.
document_idtext- The ID of the document in PDFMonkey.
document_reftext- Reference to the saved file, for use by a later step
document_statustext- Where the document is in the generation process: "draft", "pending", "generating", "success", or "failure".
documentslist- The generated file, in the shape steps that send or upload files expect
download_urltext- PDFMonkey's link to download the finished file. Empty until the document is ready, and it stops working an hour after it is issued.
failure_reasontext- Why generation failed, when the document failed to generate.
filenametext- Name of the generated file.
metaobject- The extra details stored with the document, including its file name under _filename. A PDF password is never shown here.
output_typetext- The kind of file the template produces: "pdf" or "image".
preview_urltext- Link for previewing the document in a browser.
public_share_linktext- Permanent public link to the file. Only set on PDFMonkey plans with share links (Pro+, Premium and the trial).
size_bytesnumber- Size of the file in bytes
template_idtext- The ID of the template the document was generated from.
template_nametext- The name of that template, as shown in PDFMonkey.
updated_attext- When the document was last updated.
urltext- Download URL for the saved file, served by Lodol
workspace_idtext- The ID of the PDFMonkey workspace the document belongs to.
Example output
{
"content_type": "application/pdf",
"created_at": "2026-03-13T12:34:56.181+02:00",
"document_id": "a5e86d72-f5b7-43d4-a04e-8b7e08e6741c",
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"document_status": "success",
"documents": [
{
"content_type": "application/pdf",
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"filename": "invoice-1042.pdf",
"size_bytes": 84213,
"url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
}
],
"download_url": "https://pdfmonkey.s3.eu-west-1.amazonaws.com/invoice-1042.pdf",
"failure_reason": "",
"filename": "invoice-1042.pdf",
"meta": {
"_filename": "invoice-1042.pdf",
"orderRef": "1042"
},
"output_type": "pdf",
"preview_url": "https://preview.pdfmonkey.io/pdf/web/viewer.html?file=...",
"public_share_link": "",
"size_bytes": 84213,
"template_id": "2903f5b4-623b-4e10-b2e3-dc7e2e67ea39",
"template_name": "Invoice",
"updated_at": "2026-03-13T12:34:59.412+02:00",
"url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001",
"workspace_id": "d6b4e8f2-7a3c-4d1e-9f5b-2c8a1d3e6f90"
}Get a document
Check whether a document has finished generating, and get its details and a fresh download link.
Inputs
- Document ID
document_idtextRequired - The ID of the PDFMonkey document to check.
Outputs
created_attext- When the document was created.
document_idtext- The ID of the document in PDFMonkey.
document_statustext- Where the document is in the generation process: "draft", "pending", "generating", "success", or "failure".
download_urltext- PDFMonkey's link to download the finished file. Empty until the document is ready, and it stops working an hour after it is issued.
failure_reasontext- Why generation failed, when the document failed to generate.
filenametext- Name of the generated file.
metaobject- The extra details stored with the document, including its file name under _filename. A PDF password is never shown here.
output_typetext- The kind of file the template produces: "pdf" or "image".
preview_urltext- Link for previewing the document in a browser.
public_share_linktext- Permanent public link to the file. Only set on PDFMonkey plans with share links (Pro+, Premium and the trial).
template_idtext- The ID of the template the document was generated from.
template_nametext- The name of that template, as shown in PDFMonkey.
updated_attext- When the document was last updated.
workspace_idtext- The ID of the PDFMonkey workspace the document belongs to.
Example output
{
"created_at": "2026-03-13T12:34:56.181+02:00",
"document_id": "a5e86d72-f5b7-43d4-a04e-8b7e08e6741c",
"document_status": "success",
"download_url": "https://pdfmonkey.s3.eu-west-1.amazonaws.com/invoice-1042.pdf",
"failure_reason": "",
"filename": "invoice-1042.pdf",
"meta": {
"_filename": "invoice-1042.pdf",
"orderRef": "1042"
},
"output_type": "pdf",
"preview_url": "https://preview.pdfmonkey.io/pdf/web/viewer.html?file=...",
"public_share_link": "",
"template_id": "2903f5b4-623b-4e10-b2e3-dc7e2e67ea39",
"template_name": "Invoice",
"updated_at": "2026-03-13T12:34:59.412+02:00",
"workspace_id": "d6b4e8f2-7a3c-4d1e-9f5b-2c8a1d3e6f90"
}Get a template
Read a template in full: its HTML, styles, test data and page settings, both as published and as being edited.
Inputs
- Template
template_idtextRequired - The template to read.
Outputs
bodytext- The published HTML and Liquid that documents are generated from.
body_drafttext- The HTML and Liquid being edited, not yet used for documents.
created_attext- When the template was created.
edition_modetext- How the template is edited: "code" (HTML and CSS) or "builder" (PDFMonkey's visual builder).
engine_idtext- The ID of the rendering engine documents are generated with.
folder_idtext- The ID of that folder, if any.
nametext- The template's name, as shown in PDFMonkey.
output_typetext- What the template produces: "pdf" or "image".
preview_urltext- Link that previews the template's draft in a browser.
retention_secondsnumber- How long documents made from the template are kept before PDFMonkey deletes them, in seconds. 0 keeps them for good.
sample_dataobject- The published test data PDFMonkey previews the template with.
sample_data_draftobject- The test data being edited, used for the dashboard preview.
settingsobject- The published page settings: paper_format, orientation, margin (in millimeters), header, footer and the rest.
settings_draftobject- The page settings being edited.
stylestext- The published CSS or SCSS styles.
styles_drafttext- The CSS or SCSS styles being edited.
template_idtext- The template's ID, used to generate a document from it.
updated_attext- When the template was last updated.
workspace_idtext- The ID of the PDFMonkey workspace the template belongs to.
Example output
{
"body": "<h1>Invoice {{number}}</h1><p>Total: {{total}}</p>",
"body_draft": "<h1>Invoice {{number}}</h1><p>Total: {{total}}</p>",
"created_at": "2026-01-08T09:12:04.512+02:00",
"edition_mode": "code",
"engine_id": "5c709522-90db-4aea-b49f-15aeaa7180c7",
"folder_id": "",
"name": "Invoice",
"output_type": "pdf",
"preview_url": "https://preview.pdfmonkey.io/pdf/web/viewer.html?file=...",
"retention_seconds": 86400,
"sample_data": {
"number": "INV-001",
"total": "$123.50"
},
"sample_data_draft": {
"number": "INV-001",
"total": "$123.50"
},
"settings": {
"footer": {
"right": "Page [page] of [topage]"
},
"margin": {
"bottom": 20,
"left": 15,
"right": 15,
"top": 20
},
"orientation": "portrait",
"paper_format": "a4"
},
"settings_draft": {
"footer": {
"right": "Page [page] of [topage]"
},
"margin": {
"bottom": 20,
"left": 15,
"right": 15,
"top": 20
},
"orientation": "portrait",
"paper_format": "a4"
},
"styles": "h1 { color: #333; }",
"styles_draft": "h1 { color: #333; }",
"template_id": "2903f5b4-623b-4e10-b2e3-dc7e2e67ea39",
"updated_at": "2026-02-27T16:40:11.902+02:00",
"workspace_id": "d6b4e8f2-7a3c-4d1e-9f5b-2c8a1d3e6f90"
}Get account
Get the PDFMonkey account's plan and how many documents it allows this period, for example to check before a large batch.
Inputs
None.
Outputs
available_documentsnumber- How many documents the plan allows in the current period. PDFMonkey doesn't say how many of them are used.
billing_intervaltext- How often the plan is billed: "month" or "year".
created_attext- When the account was created.
emailtext- The user's email address.
external_resources_blockedtrue/false- Whether templates are kept from loading web fonts, images and other files from the internet, as on the Free plan.
languagetext- The language the account uses, such as en.
nametext- The user's name.
paying_customertrue/false- Whether the account is on a paid plan.
plantext- The PDFMonkey plan, such as "free", "starter", "pro" or "premium".
share_linkstrue/false- Whether documents get a permanent public share link.
trial_ends_ontext- The day the free trial ends, or empty when there is none.
user_idtext- The ID of the PDFMonkey user the key belongs to.
Example output
{
"available_documents": 3000,
"billing_interval": "month",
"created_at": "2025-01-01T12:34:56.123+00:00",
"email": "jane.doe@example.com",
"external_resources_blocked": false,
"language": "en",
"name": "Jane Doe",
"paying_customer": true,
"plan": "pro",
"share_links": false,
"trial_ends_on": "",
"user_id": "12345678-90ab-cdef-1234-567890abcdef"
}List documents
List the documents on the account, newest first, optionally narrowed to one template, status or workspace. Returns 24 per page.
Inputs
- Template
template_idtext - Only list documents generated from this template. Leave empty for every template.
- Status
statustext - Only list documents in this state. Leave empty for every state.One of:
success(Generated successfully),failure(Failed to generate),pending(Waiting to generate),generating(Generating now),draft. - Search
searchtext - Match part of a file name, or give a document ID to find that one document.
- Updated since
updated_sincedate and time - Only list documents updated after this date and time.
- Page
pagenumber - Which page of results to return. Starts at 1.At least 1.
- Workspace
workspace_idtext - Only list documents in this PDFMonkey workspace. Leave empty for every workspace.
Outputs
countnumber- How many items this page returned.
current_pagenumber- The page that was returned.
documentslist- The documents on this page.
next_pagenumber- The next page number, or empty on the last page.
prev_pagenumber- The previous page number, or empty on the first page.
total_pagesnumber- How many pages there are.
Example output
{
"count": 1,
"current_page": 1,
"documents": [
{
"created_at": "2026-03-13T12:34:56.181+02:00",
"document_id": "a5e86d72-f5b7-43d4-a04e-8b7e08e6741c",
"document_status": "success",
"download_url": "https://pdfmonkey.s3.eu-west-1.amazonaws.com/invoice-1042.pdf",
"failure_reason": "",
"filename": "invoice-1042.pdf",
"meta": {
"_filename": "invoice-1042.pdf",
"orderRef": "1042"
},
"output_type": "pdf",
"preview_url": "https://preview.pdfmonkey.io/pdf/web/viewer.html?file=...",
"public_share_link": "",
"template_id": "2903f5b4-623b-4e10-b2e3-dc7e2e67ea39",
"template_name": "Invoice",
"updated_at": "2026-03-13T12:34:59.412+02:00",
"workspace_id": "d6b4e8f2-7a3c-4d1e-9f5b-2c8a1d3e6f90"
}
],
"next_page": null,
"prev_page": null,
"total_pages": 1
}List templates
List the templates on the account, with the ID needed to generate a document from each one.
Inputs
- Page
pagenumber - Which page of results to return. Starts at 1.At least 1.
- Workspace
workspace_idtext - Only list templates in this PDFMonkey workspace. Leave empty for the account's templates.
Outputs
countnumber- How many items this page returned.
current_pagenumber- The page that was returned.
next_pagenumber- The next page number, or empty on the last page.
prev_pagenumber- The previous page number, or empty on the first page.
templateslist- The templates on this page.
total_pagesnumber- How many pages there are.
Example output
{
"count": 1,
"current_page": 1,
"next_page": null,
"prev_page": null,
"templates": [
{
"created_at": "2026-01-08T09:12:04.512+02:00",
"edition_mode": "code",
"engine": "v5",
"folder": "Billing",
"folder_id": "440da20b-c5a0-40a9-862f-4070faf963ea",
"is_draft": false,
"name": "Invoice",
"output_type": "pdf",
"template_id": "2903f5b4-623b-4e10-b2e3-dc7e2e67ea39",
"updated_at": "2026-02-27T16:40:11.902+02:00",
"workspace_id": "d6b4e8f2-7a3c-4d1e-9f5b-2c8a1d3e6f90"
}
],
"total_pages": 1
}List workspaces
List the PDFMonkey workspaces the API key can reach, with the ID a new template needs.
Inputs
None.
Outputs
countnumber- How many workspaces there are.
workspaceslist- The workspaces.
Example output
{
"count": 1,
"workspaces": [
{
"name": "Acme invoicing",
"workspace_id": "d6b4e8f2-7a3c-4d1e-9f5b-2c8a1d3e6f90"
}
]
}Update a document
Change a document's data and generate it again: for example to correct a total on an invoice, to generate a draft that was created earlier, or to try again after a failure.
Inputs
- Document ID
document_idtextRequired - The ID of the PDFMonkey document to update.
- Template data
payloadobject - New values for the template's placeholders, as an object or its JSON text. This replaces the document's existing data.
- File name
filenametext - A new name for the generated file. The document's other extra details are kept.
- Extra details
metadataobject - New extra details to store with the document, as an object or its JSON text. This replaces the existing details.
- Template
template_idtext - Generate the document from a different template. Leave empty to keep the one it already uses.
- Generate again
regeneratetrue/false - Generate the file again with the new data. Turn this off to change the stored data without producing a new file (or using your quota).Default:
true. - PDF password
passwordtext - Lock the PDF so it opens only with this password. Leave empty for no password. Images can't be locked.
- Image format
image_formattext - For a template that makes images: the format to make. PDFMonkey makes WebP when this is empty. Ignored for PDFs.One of:
webp(WebP (PDFMonkey's default)),png,jpg. - Image width (pixels)
image_widthnumber - For a template that makes images: the width in pixels, instead of the template's own. Ignored for PDFs.At least 1.
- Image height (pixels)
image_heightnumber - For a template that makes images: the height in pixels, instead of the template's own. Ignored for PDFs.At least 1.
- Image quality
image_qualitynumber - For a WebP image: the quality from 1 to 100. PDFMonkey uses 100 when this is empty.From 1 to 100.
Outputs
created_attext- When the document was created.
document_idtext- The ID of the document in PDFMonkey.
document_statustext- Where the document is in the generation process: "draft", "pending", "generating", "success", or "failure".
download_urltext- PDFMonkey's link to download the finished file. Empty until the document is ready, and it stops working an hour after it is issued.
failure_reasontext- Why generation failed, when the document failed to generate.
filenametext- Name of the generated file.
metaobject- The extra details stored with the document, including its file name under _filename. A PDF password is never shown here.
output_typetext- The kind of file the template produces: "pdf" or "image".
preview_urltext- Link for previewing the document in a browser.
public_share_linktext- Permanent public link to the file. Only set on PDFMonkey plans with share links (Pro+, Premium and the trial).
template_idtext- The ID of the template the document was generated from.
template_nametext- The name of that template, as shown in PDFMonkey.
updated_attext- When the document was last updated.
workspace_idtext- The ID of the PDFMonkey workspace the document belongs to.
Example output
{
"created_at": "2026-03-13T12:34:56.181+02:00",
"document_id": "a5e86d72-f5b7-43d4-a04e-8b7e08e6741c",
"document_status": "pending",
"download_url": "https://pdfmonkey.s3.eu-west-1.amazonaws.com/invoice-1042.pdf",
"failure_reason": "",
"filename": "invoice-1042.pdf",
"meta": {
"_filename": "invoice-1042.pdf",
"orderRef": "1042"
},
"output_type": "pdf",
"preview_url": "https://preview.pdfmonkey.io/pdf/web/viewer.html?file=...",
"public_share_link": "",
"template_id": "2903f5b4-623b-4e10-b2e3-dc7e2e67ea39",
"template_name": "Invoice",
"updated_at": "2026-03-13T12:34:59.412+02:00",
"workspace_id": "d6b4e8f2-7a3c-4d1e-9f5b-2c8a1d3e6f90"
}Update a template
Change a template's name, HTML, styles, test data or page settings. Only the fields you fill in are changed.
Inputs
- Template
template_idtextRequired - The template to change.
- Template name
nametext - A new name for the template (up to 100 characters).
- HTML
bodytext - The template's HTML, with Liquid placeholders such as {{customer_name}} for the values each document fills in.
- CSS
stylestext - CSS or SCSS for the template's HTML. It doesn't apply to the header and footer.
- Test data
sample_dataobject - Example values the PDFMonkey dashboard previews the template with, as an object or its JSON text. Documents use their own data.
- Makes
output_typetext - Whether the template makes PDFs or images. PDFMonkey makes PDFs when this is empty.One of:
pdf,image(Image (WebP, PNG or JPG)). - Paper size
paper_formattext - The page size of the PDFs the template makes.One of:
a4,letter(US Letter),a0,a1,a2,a3,a5,a6,custom(Custom size). - Orientation
orientationtext - Whether pages are upright (portrait) or sideways (landscape).One of:
portrait,landscape. - Paper width (mm)
paper_widthnumber - For a custom paper size: the page width in millimeters.Only when Paper size is Custom size. At least 1.
- Paper height (mm)
paper_heightnumber - For a custom paper size: the page height in millimeters.Only when Paper size is Custom size. At least 1.
- Top margin (mm)
margin_topnumber - Space at the top of each page, in millimeters. PDFMonkey uses 10 when it isn't set. A header needs room here.At least 0.
- Bottom margin (mm)
margin_bottomnumber - Space at the bottom of each page, in millimeters. PDFMonkey uses 10 when it isn't set. A footer needs room here.At least 0.
- Left margin (mm)
margin_leftnumber - Space at the left of each page, in millimeters. PDFMonkey uses 10 when it isn't set.At least 0.
- Right margin (mm)
margin_rightnumber - Space at the right of each page, in millimeters. PDFMonkey uses 10 when it isn't set.At least 0.
- More settings
settingsobject - Other page settings, as an object or its JSON text, for example {"footer": {"right": "Page [page] of [topage]"}, "use_emojis": true}. The step's own page fields win over the same settings here.
- Keep documents for
retentiontext - How long PDFMonkey keeps the documents made from this template before deleting them. A period your plan doesn't allow becomes its longest.One of:
300(5 minutes),1200(20 minutes),3600(1 hour),86400(1 day),604800(1 week (Pro plan or higher)),2592000(1 month (Pro+ or Premium)),31536000(1 year (Pro+ or Premium)),0(Never delete (Pro+ or Premium)). - Publish
publishtrue/false - Publish the changes, so new documents use them straight away. Turn this off to save them as a draft to review and publish in the PDFMonkey dashboard.Default:
true.
Outputs
bodytext- The published HTML and Liquid that documents are generated from.
body_drafttext- The HTML and Liquid being edited, not yet used for documents.
created_attext- When the template was created.
edition_modetext- How the template is edited: "code" (HTML and CSS) or "builder" (PDFMonkey's visual builder).
engine_idtext- The ID of the rendering engine documents are generated with.
folder_idtext- The ID of that folder, if any.
nametext- The template's name, as shown in PDFMonkey.
output_typetext- What the template produces: "pdf" or "image".
preview_urltext- Link that previews the template's draft in a browser.
retention_secondsnumber- How long documents made from the template are kept before PDFMonkey deletes them, in seconds. 0 keeps them for good.
sample_dataobject- The published test data PDFMonkey previews the template with.
sample_data_draftobject- The test data being edited, used for the dashboard preview.
settingsobject- The published page settings: paper_format, orientation, margin (in millimeters), header, footer and the rest.
settings_draftobject- The page settings being edited.
stylestext- The published CSS or SCSS styles.
styles_drafttext- The CSS or SCSS styles being edited.
template_idtext- The template's ID, used to generate a document from it.
updated_attext- When the template was last updated.
workspace_idtext- The ID of the PDFMonkey workspace the template belongs to.
Example output
{
"body": "<h1>Invoice {{number}}</h1><p>Total: {{total}}</p>",
"body_draft": "<h1>Invoice {{number}}</h1><p>Total: {{total}}</p>",
"created_at": "2026-01-08T09:12:04.512+02:00",
"edition_mode": "code",
"engine_id": "5c709522-90db-4aea-b49f-15aeaa7180c7",
"folder_id": "",
"name": "Invoice",
"output_type": "pdf",
"preview_url": "https://preview.pdfmonkey.io/pdf/web/viewer.html?file=...",
"retention_seconds": 86400,
"sample_data": {
"number": "INV-001",
"total": "$123.50"
},
"sample_data_draft": {
"number": "INV-001",
"total": "$123.50"
},
"settings": {
"footer": {
"right": "Page [page] of [topage]"
},
"margin": {
"bottom": 20,
"left": 15,
"right": 15,
"top": 20
},
"orientation": "portrait",
"paper_format": "a4"
},
"settings_draft": {
"footer": {
"right": "Page [page] of [topage]"
},
"margin": {
"bottom": 20,
"left": 15,
"right": 15,
"top": 20
},
"orientation": "portrait",
"paper_format": "a4"
},
"styles": "h1 { color: #333; }",
"styles_draft": "h1 { color: #333; }",
"template_id": "2903f5b4-623b-4e10-b2e3-dc7e2e67ea39",
"updated_at": "2026-02-27T16:40:11.902+02:00",
"workspace_id": "d6b4e8f2-7a3c-4d1e-9f5b-2c8a1d3e6f90"
}