Setting up Webhooks
To use webhooks, you need to set up a webhook endpoint URL in your application that can receive POST requests from Cobalt. This URL should be publicly accessible and use HTTPS for security. You can set up multiple webhook urls (eg. one for development and one for production) and Cobalt will send the same webhook event to each url.Register
To register a new webhook, POST/v1/webhook.
Example request:
Get Configuration
To retrieve your current webhook configuration, GET/v1/webhook.
Example request:
Remove a Webhook URL
To remove a webhook url, DELETE/v1/webhook/:id.
Example request:
Rotate Secret
To rotate your webhook secret key, POST/v1/webhook/rotate-secret.
Overriding the Destination Per Request
By default, every event is delivered to all of your registered webhook URLs. To route the events for a single operation somewhere else instead, include acallback_urls array in the body of any asynchronous request (the POST and PATCH endpoints that return a job_id):
callback_urls is provided, the completion event for that operation is delivered only to those URLs and not to your registered account URLs. Omit it and delivery is unchanged. Each URL must use HTTPS.