Skip to content

Send events to an https address (owners)

POST
/webhooks
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).

Media typeapplication/json
object
url
required

An https address on the public internet.

string
events
required
Array<string>
>= 1 items
Allowed values: sandbox.state_changed scheduled_task.finished model_cap.reached approval.requested approval.decided budget.warning budget.exceeded alert.raised

The webhook and its secret

Media typeapplication/json
object
id
required
string
url
required
string
events
required
Array<string>
Allowed values: sandbox.state_changed scheduled_task.finished model_cap.reached approval.requested approval.decided budget.warning budget.exceeded alert.raised
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
Allowed values: pending delivered failed
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"
}