Webhooks
Webhooks allow you to receive real-time updates when new Variations are created. By setting up a webhook, your application can automatically receive information about these events without the need for constant polling.
How Webhooks Work
When creating a Render or Variation, include a webhook_url
parameter:
Your endpoint will receive separate POST requests for:
Each Variation's completion or error state
Analysis results (when using the analyze endpoint)
For example, if you create a render with 3 Variations, you'll receive 3 webhook responses once the Variations either complete or fail. You will not receive a separate webhook response for the parent Render.
Variation Webhook Response Types
There are 2 Variation webhook payload types: done
and error
.
`Done` response schema
When using Multi-View Staging the result
object will be returned as an array of objects
`Error` response schema
Analysis Webhook Response Types
Best Practices
Acknowledge Quickly: Return a 200 status code as soon as you receive the webhook. Process the payload asynchronously if needed.
Handle Retries: Webhooks will be retried up to 3 times if your endpoint fails to respond with a 200 status.
Store Base Variation IDs: For staging variations, the
base_variation_id
links to the removal variation it was based on (if a base variation was used or the removal mode was set toauto
).Track Event Types: Different
event_type
values indicate different stages:update
: Status changes and progressdone
: Processing completeerror
: Processing failedanalysis_completion
: Analysis completeanalysis_error
: Analysis failed
Testing Webhooks
We recommend using tools like webhook.site for testing webhook integration before setting up your production endpoint.
Last updated