Webhooks allow you to notify external services when your image is ready to download, or when a new has been created, updated, or deleted.
Webhooks configured in the Settings section of the RenderForm dashboard are triggered for all requests made to RenderForm API.
You can also configure a webhook for a specific request by providing a webhookUrl
parameter in the request body when rendering an image.
You can create up to 10 global webhooks.
Webhook actions
Webhooks can be triggered for the following actions:
RENDER_COMPLETE
- when the image or PDF is ready to downloadTEMPLATE_CREATE
- when a new template is createdTEMPLATE_UPDATE
- when a template is updatedTEMPLATE_DELETE
- when a template is deleted
Action names are sent in the action
field of the webhook payload.
Sample webhook payload
Webhooks are always sent via POST request. The payload is a JSON object with the following fields:
On image generation
{
"action": "RENDER_COMPLETE",
"requestId": "febbd34c-cadf-43e6-926c-5942016aea4e"
"href": "https://cdn.renderform.io/8af2cacf-a328-4a8f-a4a7-fc6419b5b805/results/febbd34c-cadf-43e6-926c-5942016aea4e.jpg"
}
On template action
{
"action": "TEMPLATE_CREATE", // or "TEMPLATE_UPDATE", "TEMPLATE_DELETE"
"templateId": "hairy-newts-chuckle-blindly-7342",
"name": "Social Media Cover",
}
You can use websites like Webhook.site to test webhooks.