curl --request POST \
--url 'https://api.sandbox.stateset.app/api/v1/webhooks' \
--header "Authorization: Bearer $STATESET_SANDBOX_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"url": "https://example.com/webhooks/stateset",
"events": [
"string"
],
"secret": "YOUR_API_KEY"
}'
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"url": "https://example.com/webhooks/stateset",
"events": "*",
"hasSecret": true,
"enabled": true,
"orgId": "string",
"sandboxId": "string",
"headers": {},
"retryCount": 1,
"retryDelayMs": 1,
"timeoutMs": 250,
"createdAt": "2026-08-31T14:22:05Z"
}
Register a webhook endpoint
Webhook registered. Keys are camelCase, matching the controller’s WebhookConfig; the secret is stripped.
POST
/
api
/
v1
/
webhooks
curl --request POST \
--url 'https://api.sandbox.stateset.app/api/v1/webhooks' \
--header "Authorization: Bearer $STATESET_SANDBOX_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"url": "https://example.com/webhooks/stateset",
"events": [
"string"
],
"secret": "YOUR_API_KEY"
}'
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"url": "https://example.com/webhooks/stateset",
"events": "*",
"hasSecret": true,
"enabled": true,
"orgId": "string",
"sandboxId": "string",
"headers": {},
"retryCount": 1,
"retryDelayMs": 1,
"timeoutMs": 250,
"createdAt": "2026-08-31T14:22:05Z"
}
Request body
CreateWebhookRequest
string (uri)
required
string[]
required
string
Response
object
string
required
string
required
string
required
Either the literal ’*’ or an array of subscribed event names
boolean
boolean
required
string
string
object
integer
required
integer
required
integer
required
string (date-time)
required
Status codes
| Code | Meaning |
|---|---|
201 | Webhook registered. Keys are camelCase, matching the controller’s WebhookConfig; the secret is stripped. |
400 | Invalid request |
curl --request POST \
--url 'https://api.sandbox.stateset.app/api/v1/webhooks' \
--header "Authorization: Bearer $STATESET_SANDBOX_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"url": "https://example.com/webhooks/stateset",
"events": [
"string"
],
"secret": "YOUR_API_KEY"
}'
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"url": "https://example.com/webhooks/stateset",
"events": "*",
"hasSecret": true,
"enabled": true,
"orgId": "string",
"sandboxId": "string",
"headers": {},
"retryCount": 1,
"retryDelayMs": 1,
"timeoutMs": 250,
"createdAt": "2026-08-31T14:22:05Z"
}
Last modified on August 31, 2026