Webhooks
Overview
Webhooks allow you to listen to events from the Captions API once your generated videos are ready. You can specify the URL to be notified for certain events when video generation either succeeds or fails.
Instructions
Instructions
/events
List available webhook events to trigger notifications on the webhook URL.
Request
Response Types
200 - Successful Response
200 - Successful Response
/register
Register a webhook URL for your API account.
url
- required - URL for your webhook to be notified for the provided enabledEvents
.
enabledEvents
- required - List of events for which your webhook should be notified.
Request
Response Types
200 - Successful Response
200 - Successful Response
A successful response contains a secret and a unique ID, both of which you should store. We will use this secret as an Authorization Bearer token so that you can confirm our API as the caller.
/list
List registered webhooks for your API account.
Request
Response Types
200 - Successful Response
200 - Successful Response
A successful response contains a list of webhook objects, each with their own unique ID, the webhook URL, a unique secret, and a list of enabled events for that webhook.
/update
Update a registered webhook’s URL and/or enabled events.
id
- required - ID for the webhook to be updated.
url
- optional - New URL for your webhook to be notified for the provided or existing enabledEvents
.
enabledEvents
- optional - Updated list of events for which your webhook should be notified.
200 - Successful Response
200 - Successful Response
A successful response contains a new secret and a the existing ID as well as the updated URL and enabled events. We will use the new secret as an Authorization Bearer token so that you can confirm our API as the caller.
/delete
Delete a registered webhook.
id
- required - ID for the webhook to be deleted.
200 - Successful Response
200 - Successful Response
Usage
Once your webhook is registered, you can call the AI Creator API with a /submit
request without having to poll. Our API will post a request to your registered webhook URL with the following signature once your video generation is ready: