Create webhook
const url = 'https://reignitor.com/api/webhooks/hooks';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"event":"video.completed","webhook_url":"https://hooks.example.com/reignitor","description":"Post finished videos to our CMS"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://reignitor.com/api/webhooks/hooks \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "event": "video.completed", "webhook_url": "https://hooks.example.com/reignitor", "description": "Post finished videos to our CMS" }'Subscribes a public URL to one event. The response includes secret, the key used
to sign every delivery. It is shown once. Store it; later reads never include it.
Registering the same event and webhook_url again returns the existing webhook
(with reused: true) and switches it back on. It does not create a duplicate.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
A public http(s) URL. Private and local network addresses are refused.
Example
{ "event": "video.completed", "webhook_url": "https://hooks.example.com/reignitor", "description": "Post finished videos to our CMS"}Responses
Section titled “ Responses ”This event and URL were already registered. The existing webhook is returned and switched on.
object
object
Whether the webhook has a signing secret. The secret itself is never returned after creation.
Failed deliveries in a row. After 20 the webhook is switched off.
Example
{ "hook": { "event": "user.signup" }, "reused": true}Created. Store secret now.
object
object
Whether the webhook has a signing secret. The secret itself is never returned after creation.
Failed deliveries in a row. After 20 the webhook is switched off.
Signing secret, 64 hex characters. Shown once.
Example
{ "hook": { "event": "user.signup" }}UNKNOWN_EVENT, URL_NOT_DELIVERABLE, or a validation error.
Every error has a human-readable error. Most also have a machine-readable code.
object
A message you can show to a person.
A stable code to branch on. Not every error has one.
Extra context for some codes, such as retryAfter or usage figures.
Seconds to wait before retrying. Present on some RATE_LIMITED errors.
object
Every problem found, as field: message, separated by ; .
Example
{ "error": "Validation failed"}The key is missing, malformed, unknown or revoked.
Every error has a human-readable error. Most also have a machine-readable code.
object
A message you can show to a person.
A stable code to branch on. Not every error has one.
Extra context for some codes, such as retryAfter or usage figures.
Seconds to wait before retrying. Present on some RATE_LIMITED errors.
Examples
No key, or not an emp_ key
{ "error": "Unauthorized", "code": "NO_API_KEY"}Unknown or revoked key
{ "error": "Invalid or revoked API key", "code": "INVALID_API_KEY"}The account already has the maximum number of webhooks.
Every error has a human-readable error. Most also have a machine-readable code.
object
A message you can show to a person.
A stable code to branch on. Not every error has one.
Extra context for some codes, such as retryAfter or usage figures.
Seconds to wait before retrying. Present on some RATE_LIMITED errors.
Example
{ "error": "Hook limit reached (25)", "code": "HOOK_LIMIT"}A rate limit or the concurrent-render limit was hit. code is RATE_LIMITED or
CONCURRENT_LIMIT. For RATE_LIMITED, wait the number of seconds in retryAfter
(or details.retryAfter) before trying again.
Every error has a human-readable error. Most also have a machine-readable code.
object
A message you can show to a person.
A stable code to branch on. Not every error has one.
Extra context for some codes, such as retryAfter or usage figures.
Seconds to wait before retrying. Present on some RATE_LIMITED errors.
Examples
{ "error": "Rate limit exceeded", "retryAfter": 37, "code": "RATE_LIMITED"}{ "error": "Too many renders in flight", "code": "CONCURRENT_LIMIT"}Something went wrong on our side.
Every error has a human-readable error. Most also have a machine-readable code.
object
A message you can show to a person.
A stable code to branch on. Not every error has one.
Extra context for some codes, such as retryAfter or usage figures.
Seconds to wait before retrying. Present on some RATE_LIMITED errors.
Example
{ "error": "Something went wrong handling that request."}