Integration
Generate PDFs from Zapier
A form is submitted, a row is added, a deal is won — and something has to produce the paperwork. Zapier gets you as far as the data; this is the step that turns it into a document.
There is no official Zapier app yet. This uses Zapier's own HTTP and webhook steps, which is fully supported and takes about five minutes. If you would rather have a one-click app, email support@doc2api.co — demand is how we decide what to build next.
1. Send the values, get a document
Add a Webhooks by Zapier → Custom Request (POST) step and point it at your template's fill endpoint. Use your workspace's automation key — one key for everything, from your dashboard — rather than a per-template key, so you only paste a credential once however many automations you build.
Need the template id? GET /api/v1/templates lists them all by name with the same key, and GET /api/v1/me confirms the key works before you build anything on it.
| Method | POST |
| URL | https://www.doc2api.co/api/v1/templates/<TEMPLATE_ID>/fill |
| Header | X-Api-Key: d2a_auto_… |
| Header | Content-Type: application/json |
Body — your field names, under `data`:
{
"data": {
"customer_name": "Sarah Whitfield",
"invoice_ref": "INV-0042",
"amount_due": "1350.00"
},
"params": { "order_id": "A-1029" }
}The completed PDF comes back in the response. Add "preview": true while you are building the automation — the first 100 of those each month do not count against your documents.
2. Or have it delivered to you
Add a Webhooks by Zapier → Catch Hook step, copy the URL it gives you, and paste it into your template's webhook settings. Every completed document then arrives there on its own — with retries if Zapier is briefly unreachable, which the synchronous call above cannot give you.
The delivery is signed, so you can prove it came from us: how to verify the signature.
Worth knowing about Zapier
- Choose Custom Request rather than POST so you can set the X-Api-Key header — the plain POST action sends the body but not your own headers.
- Set the payload type to JSON and put your field values under a data object.
- Zapier steps time out, so for anything slow prefer the webhook: send the fill, let it return immediately, and catch the finished document in a second Zap.
Get a template and a key first
Upload the PDF you need filled, or design one, and you have the endpoint and key this needs. No account required to try it.