What is Webhook?
Definition
An HTTP callback that automatically notifies your application when an event occurs, such as an image finishing rendering, by sending a POST request to a URL you specify.
A webhook is a way for one service to notify another when something happens. In design automation, webhooks are used to notify your application when an asynchronous render completes, or to trigger image generation when an event occurs in another system.
Two uses of webhooks in design automation:
1. Render completion webhooks (outbound)
Some platforms use async jobs and notify you when rendering finishes. Layerre’s usual path is synchronous: POST /v1/template/{template_id}/variant returns the variant JSON (including a signed url) in the response—no webhook required for that flow. A generic async pattern looks like:
Your app → POST /v1/render-job (example) → Image API
Image API → POST /your-webhook-url → Your app
{ "renderId": "abc", "status": "complete", "url": "https://..." }2. Trigger webhooks (inbound)
An external service sends a webhook to trigger image generation:
Shopify (new order) → POST /your-endpoint → Your app → Layerre API → ImageWebhook vs. polling:
- Polling: Your app repeatedly asks "is it done yet?" at intervals. Wastes requests, adds latency.
- Webhook: The service tells you when it's done. More efficient, faster response.
Setting up webhooks:
- Create an endpoint in your backend that accepts POST requests
- Register the webhook URL with the service
- Handle the incoming payload (validate signature, process data, trigger actions)
Webhooks in no-code tools:
Zapier, Make, and n8n all support receiving webhooks as triggers. You can use a webhook URL from these tools as the trigger for a design generation workflow: any system that can send an HTTP request can trigger your automation.
Related Terms
Related Questions
Try Layerre Free
Import your Canva designs and start generating variations in minutes. No credit card required.