Webhooks
Sync webhooks deliver real-time HTTP POST notifications when your lip sync generation jobs complete or fail. Use webhooks instead of polling to build efficient, event-driven workflows that respond to generation status changes without repeated API calls.
How do I set up webhooks?
To utilize webhooks:
- Specify a
webhookUrlparameter when calling an API endpoints that support it. - Ensure your webhook endpoint can receive and handle HTTP
POSTrequests and can consume the Webhook Payload for status updates.
For security purposes, your webhook URL must be configured to accept and
process HTTPS POST requests.
By leveraging webhooks, you can streamline your workflow with non-blocking calls, allowing you to focus on other tasks while receiving job completion notifications.
Error Handling in Webhooks
When a generation fails, the webhook payload will include error information in two fields:
error: A human-readable error message describing what went wrongerror_code: A specific error code that can be used for programmatic error handling (see the Error Handling guide for a complete list of error codes)
This improved error structure allows you to both display meaningful messages to users and implement specific error handling logic based on the error codes.
Verify webhook signatures
To ensure webhook requests are coming from Sync, we sign each webhook request with a signature. The signature is included in the Sync-Signature header.
To verify signatures, use your signing secret.
The signature is made out of 2 components:
- Timestamp (at the time of sending the event)
- Signature hash (timestamp and the JSON payload)
Related Resources
- Batch Processing — use webhooks with batch processing for high-volume workflows
- Rate Limits — understand API rate limiting and how it affects webhook delivery
Frequently Asked Questions
How do I test webhooks locally?
Use a tunneling tool like ngrok to expose your local server to the internet. Start your webhook endpoint locally, then run ngrok to get a public HTTPS URL. Pass that URL as the webhookUrl when creating a generation. Sync will send POST requests to your local server through the tunnel.
What if my endpoint is down?
If your webhook endpoint is unreachable when Sync attempts delivery, the notification may be lost. There is no automatic retry for failed webhook deliveries. As a safety net, you can poll the generation status endpoint to check for completed or failed jobs that your webhook may have missed.
How do I verify webhook signatures?
Each webhook request includes a Sync-Signature header containing a timestamp and HMAC-SHA256 hash. Use your signing secret from the webhooks settings page to compute the expected signature and compare it using a timing-safe comparison function to prevent timing attacks. See the code examples above.

