API by Zapier versus Webhooks by Zapier
API by Zapier is designed for services without a native integration and can keep API credentials in a connection. Webhooks Custom Request supports deeply nested JSON, but its headers are plaintext step fields. Custom Request cannot send Zapier file objects. These differences are why the recipe defaults to JSON references and separates file delivery from job creation.
{
"template_id": "REPLACE_TEMPLATE_ID",
"options": {
"format": "png",
"mode": "full",
"slots": {
"REPLACE_SLOT_ID": {
"asset_id": "REPLACE_ASSET_ID",
"fit": "contain"
}
}
}
}
Official platform documentation for this setup
Avoid double-encoded options
In a JSON request, send options as the object shown above, not an escaped JSON string inside another JSON document. Build dynamic values through structured mapping or JSON utilities so quotes in source data remain valid. Form or multipart clients use the opposite contract: options is encoded once as a string. A 422 should be fixed at the payload stage before retrying.
Completion callbacks are separate executions
A Catch Hook does not pause and resume the initiating Zap. Make it a dedicated completion Zap. Catch Raw Hook may expose the bytes and headers needed for signature verification; use a verifier that computes HMAC-SHA256 over the exact raw bytes. If you cannot verify that contract, treat the notification as untrusted and look up a previously stored job ID. Deduplicate stable event_id before delivery.
Collections and multi-artwork layouts
For many product views, preflight the areas-based collection with exact slot IDs and saved assets. Review the actual assignments and sample, then store the plan token with the source item. POST /bulk-jobs with the unchanged token and idempotency_key. The completion Zap checks has_result and the manifest because an error or cancelled collection can still contain approved completed images. A raw ZIP response needs a file-transfer capability just like a PNG.
Verify completion and move a real file
Treat 202 as acceptance. Persist id, then poll the canonical job endpoint with the same bearer credential. queued, running and cancelling mean wait; done means download; error and cancelled need a recovery branch. A protected result URL cannot be pasted into a destination that has no way to send your API key. Download the bytes through an authenticated action, then upload a file to your destination. A temporary signed link can expire, so refresh it or use the canonical result endpoint. Do not forward the bearer key across a redirect to another origin.
Retries, duplicate events and interrupted runs
Use one key for one intended operation, such as order-1042-artwork-v1. Keep it stable on a lost-response retry. The same inputs and key return the same render job; changed inputs return 409 and need an explicit new version. Do not repeat a synchronous paid render just because the previous step timed out. Retry reads and idempotent submissions with bounded backoff for temporary network or 5xx errors. Fix 401 credentials, 404 ownership, 402 allowance and 422 validation before retrying. When a polling deadline is reached, save the job ID and resume checking it later; the server continues independently.
Troubleshooting checklist
Check the actual HTTP status and detail field before changing the workflow. Test a single ready template and saved asset first, then add multi-area placements and collection output. Avoid enabling schedules until the downloaded file and its destination record have both been inspected.
| Field or condition | Mapping or action |
|---|
| 401 | Use the full Bearer value and a non-revoked API key; a website key is for the iframe only. |
|---|
| 404 | Confirm the template, asset or job belongs to this account or is an accessible public template. |
|---|
| 409 | Read detail: result not ready, changed inputs, stale revision and expired review need different actions. |
|---|
| 402 / 429 | Check account allowance / reduce concurrency and back off for rate limits. |
|---|
| 422 | Inspect the slot ID, ready status, nested options and direct-image URL. JSON options must be an object. |
|---|
| Broken destination image | Download with authentication and upload bytes; protected URLs are not public attachments. |
|---|