curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/webhooks' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"description": "Two-person tent, green — replacement for damaged pole set.",
"events": [
"string"
],
"url": "https://example.com/webhooks/stateset"
}'
{
"created_at": "2026-08-31T14:22:05Z",
"description": "Two-person tent, green — replacement for damaged pole set.",
"events": [
"string"
],
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"is_active": true,
"secret_shown_once": true,
"signing_secret": "YOUR_API_KEY",
"url": "https://example.com/webhooks/stateset"
}
Create a webhook handler
Required scope: write
POST
/
api
/
v1
/
webhooks
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/webhooks' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"description": "Two-person tent, green — replacement for damaged pole set.",
"events": [
"string"
],
"url": "https://example.com/webhooks/stateset"
}'
{
"created_at": "2026-08-31T14:22:05Z",
"description": "Two-person tent, green — replacement for damaged pole set.",
"events": [
"string"
],
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"is_active": true,
"secret_shown_once": true,
"signing_secret": "YOUR_API_KEY",
"url": "https://example.com/webhooks/stateset"
}
Required scope:
write
Request body
CreateWebhookRequest
string
string[]
required
Event slugs to subscribe to. Use
['*'] for all events.string
required
Response
CreateWebhookResponse
string
required
string
string[]
required
string
required
boolean
required
boolean
required
Redaction warning — this full secret is shown ONLY at creation.
string
required
string
required
Status codes
| Code | Meaning |
|---|---|
201 | Endpoint registered; signing secret returned ONCE |
400 | Invalid URL or events |
401 | Unauthorized |
403 | Forbidden — the key/token lacks the required scope |
429 | Rate limited — see Retry-After / X-RateLimit-Reset |
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/webhooks' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"description": "Two-person tent, green — replacement for damaged pole set.",
"events": [
"string"
],
"url": "https://example.com/webhooks/stateset"
}'
{
"created_at": "2026-08-31T14:22:05Z",
"description": "Two-person tent, green — replacement for damaged pole set.",
"events": [
"string"
],
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"is_active": true,
"secret_shown_once": true,
"signing_secret": "YOUR_API_KEY",
"url": "https://example.com/webhooks/stateset"
}
Last modified on August 31, 2026