Skip to content
Esc
navigateopen⌘Jpreview

Create a webhook endpoint

Registers an endpoint for the given event types. The response includes the signing secret; verify deliveries with any Standard Webhooks library.

POST/webhooks
Request body
requiredapplication/json
urlstring<uri>required
eventsstring[]required
min items 1
Responses
200OK
idstringrequired
urlstringrequired
eventsstring[]required
enabledbooleanrequired
createdAtstring<date-time>required
secretstringrequired
400400
One of:
object
definedanyrequired
codeanyrequired
statusanyrequired
messagestringrequired
default: "Webhook URLs must be https (plain http is allowed for localhost)."
dataany
object
definedanyrequired
codestringrequired
statusnumberrequired
messagestringrequired
dataany
401401
One of:
object
definedanyrequired
codeanyrequired
statusanyrequired
messagestringrequired
default: "Authentication required. Pass an organization API key in the `x-api-key` header."
dataany
object
definedanyrequired
codestringrequired
statusnumberrequired
messagestringrequired
dataany
429429
One of:
object
definedanyrequired
codeanyrequired
statusanyrequired
messagestringrequired
default: "The organization's API request limit for this period has been reached."
dataany
object
definedanyrequired
codeanyrequired
statusanyrequired
messagestringrequired
default: "Too many requests. Try again shortly."
dataany
object
definedanyrequired
codestringrequired
statusnumberrequired
messagestringrequired
dataany
Request
curl -X POST "https://stetcms.com/api/v1/webhooks" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "<uri>",
  "events": [
    "content.changed"
  ]
}'
Response
{
  "id": "string",
  "url": "string",
  "events": [
    "content.changed"
  ],
  "enabled": true,
  "createdAt": "2024-01-01T00:00:00Z",
  "secret": "string"
}