Skip to content

Create webhook

POST
/api/webhooks/hooks
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.

Media typeapplication/json
object
event
required
string
Allowed values: user.signup user.onboarded subscription.created subscription.canceled video.completed video.failed credits.low credits.purchased
webhook_url
required

A public http(s) URL. Private and local network addresses are refused.

string format: uri
<= 2000 characters
description
string
<= 200 characters
Example
{
"event": "video.completed",
"webhook_url": "https://hooks.example.com/reignitor",
"description": "Post finished videos to our CMS"
}

This event and URL were already registered. The existing webhook is returned and switched on.

Media typeapplication/json
object
hook
required
object
id
string | integer
event
string
Allowed values: user.signup user.onboarded subscription.created subscription.canceled video.completed video.failed credits.low credits.purchased
webhook_url
string
description
string | null
active
boolean
has_secret

Whether the webhook has a signing secret. The secret itself is never returned after creation.

boolean
failure_count

Failed deliveries in a row. After 20 the webhook is switched off.

integer | null
last_delivery_at
string | null
last_status
string | null
key
additional properties
any
reused
required
boolean
Example
{
"hook": {
"event": "user.signup"
},
"reused": true
}

Created. Store secret now.

Media typeapplication/json
object
hook
required
object
id
string | integer
event
string
Allowed values: user.signup user.onboarded subscription.created subscription.canceled video.completed video.failed credits.low credits.purchased
webhook_url
string
description
string | null
active
boolean
has_secret

Whether the webhook has a signing secret. The secret itself is never returned after creation.

boolean
failure_count

Failed deliveries in a row. After 20 the webhook is switched off.

integer | null
last_delivery_at
string | null
last_status
string | null
key
additional properties
any
secret
required

Signing secret, 64 hex characters. Shown once.

string
Example
{
"hook": {
"event": "user.signup"
}
}

UNKNOWN_EVENT, URL_NOT_DELIVERABLE, or a validation error.

Media typeapplication/json
One of:

Every error has a human-readable error. Most also have a machine-readable code.

object
error
required

A message you can show to a person.

string
code

A stable code to branch on. Not every error has one.

string
details

Extra context for some codes, such as retryAfter or usage figures.

retryAfter

Seconds to wait before retrying. Present on some RATE_LIMITED errors.

integer
feature
string
plan
string
key
additional properties
any
Example
{
"error": "Validation failed"
}

The key is missing, malformed, unknown or revoked.

Media typeapplication/json

Every error has a human-readable error. Most also have a machine-readable code.

object
error
required

A message you can show to a person.

string
code

A stable code to branch on. Not every error has one.

string
details

Extra context for some codes, such as retryAfter or usage figures.

retryAfter

Seconds to wait before retrying. Present on some RATE_LIMITED errors.

integer
feature
string
plan
string
key
additional properties
any
Examples

No key, or not an emp_ key

{
"error": "Unauthorized",
"code": "NO_API_KEY"
}

The account already has the maximum number of webhooks.

Media typeapplication/json

Every error has a human-readable error. Most also have a machine-readable code.

object
error
required

A message you can show to a person.

string
code

A stable code to branch on. Not every error has one.

string
details

Extra context for some codes, such as retryAfter or usage figures.

retryAfter

Seconds to wait before retrying. Present on some RATE_LIMITED errors.

integer
feature
string
plan
string
key
additional properties
any
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.

Media typeapplication/json

Every error has a human-readable error. Most also have a machine-readable code.

object
error
required

A message you can show to a person.

string
code

A stable code to branch on. Not every error has one.

string
details

Extra context for some codes, such as retryAfter or usage figures.

retryAfter

Seconds to wait before retrying. Present on some RATE_LIMITED errors.

integer
feature
string
plan
string
key
additional properties
any
Examples
{
"error": "Rate limit exceeded",
"retryAfter": 37,
"code": "RATE_LIMITED"
}

Something went wrong on our side.

Media typeapplication/json

Every error has a human-readable error. Most also have a machine-readable code.

object
error
required

A message you can show to a person.

string
code

A stable code to branch on. Not every error has one.

string
details

Extra context for some codes, such as retryAfter or usage figures.

retryAfter

Seconds to wait before retrying. Present on some RATE_LIMITED errors.

integer
feature
string
plan
string
key
additional properties
any
Example
{
"error": "Something went wrong handling that request."
}