Skip to main content
POST
/
api
/
v1
/
webhooks
Create a new webhook
curl --request POST \
  --url https://api.example.com/api/v1/webhooks \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>",
  "collection": "<string>",
  "events": [
    "<string>"
  ],
  "secret": "<string>",
  "filter": "<string>",
  "enabled": true,
  "headers": {}
}
'
{
  "id": "<string>",
  "account_id": "<string>",
  "url": "<string>",
  "collection": "<string>",
  "events": [
    "<string>"
  ],
  "filter": "<string>",
  "enabled": true,
  "headers": {},
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "created_by": "<string>",
  "secret": "<string>"
}

Body

application/json

Request body for creating a webhook.

url
string
required

Destination URL for webhook HTTP POST

Required string length: 1 - 2048
collection
string
required

Collection name to watch

Required string length: 1 - 100
events
string[]
required

Events to fire on: create, update, delete

Minimum array length: 1
secret
string | null

HMAC-SHA256 signing secret (auto-generated if omitted)

Maximum string length: 100
filter
string | null

Optional rule expression to conditionally fire webhook

enabled
boolean
default:true

Whether the webhook is active

headers
Headers · object

Optional custom HTTP headers to include in delivery

Response

Successful Response

Webhook creation response — includes secret (shown ONCE only).

id
string
required
account_id
string
required
url
string
required
collection
string
required
events
string[]
required
filter
string | null
required
enabled
boolean
required
headers
Headers · object
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
created_by
string | null
required
secret
string
required

Signing secret — save this, it will never be shown again