Send events to an https address (owners)
POST
/webhooks
const url = 'https://api.global.stillbox.example/v1/webhooks';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"url":"example","events":["sandbox.state_changed"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.global.stillbox.example/v1/webhooks \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "url": "example", "events": [ "sandbox.state_changed" ] }'The response carries the signing secret, shown only this once. Every delivery is a POST of a JSON event,
signed in the Stillbox-Signature header (ADR 0026).
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
url
required
An https address on the public internet.
string
events
required
Array<string>
Responses
Section titled “Responses”The webhook and its secret
Media typeapplication/json
object
id
required
string
url
required
string
events
required
Array<string>
created_at
required
string format: date-time
created_by
string
last_delivery
object
event_id
required
string
type
required
string
state
required
pending includes deliveries waiting to be retried.
string
attempts
required
integer
status
The HTTP status of the latest attempt.
integer
error
string
created_at
required
string format: date-time
delivered_at
string format: date-time
secret
required
The signing secret (whsec_…), shown only now.
string
Example
{ "events": [ "sandbox.state_changed" ], "last_delivery": { "state": "pending" }}The request is invalid
Media typeapplication/json
object
code
required
string
message
required
string
Example
{ "code": "not_found"}The API key is missing or invalid
Media typeapplication/json
object
code
required
string
message
required
string
Example
{ "code": "not_found"}Only an owner can do this (owner_only), or the invitation is for another address (not_invited)
Media typeapplication/json
object
code
required
string
message
required
string
Example
{ "code": "not_found"}