Skip to content

Give a webhook a new signing secret

POST
/v1/webhooks/{id}/secret
curl --request POST \
--url https://api.sotirea.com/v1/webhooks/1/secret \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "grace": "example" }'

The new secret is in this answer only. Deliveries are signed with both the new and the old secret for the grace you choose, so you can move across without a gap.

id
required
integer

The webhook’s id.

Media typeapplication/json
object
grace
required

How long the old secret is still signed with: now, 1h, 24h or 7d.

string

Example generated

{
"grace": "example"
}

Done.

Media typeapplication/json
object
data
required
object
secret
required

The signing secret, whsec_…: verify every delivery with it. Shown once.

string
webhook
required
object
created_at
required
string format: date-time
created_by_name
required

The person or API key that added it.

string
description
required
string
disabled_at
required
Any of:
string format: date-time
disabled_reason
required
string
events
required

The event types sent to it.

Array<string>
failing
required

How many deliveries gave up.

integer
id
required
integer
previous_secret_until
required
Any of:
string format: date-time
url
required
string
waiting
required

How many deliveries are still being tried.

integer
meta
object
request_id

Quote it when asking about a request; it is in the X-Request-Id header too.

string
success
required

Example

{
"success": true
}

Refused or failed, in words a person can act on.

Media typeapplication/json
object
error
required
object
code
required
string
fields
object
key
additional properties
string
message
required
string
meta
object
request_id

Quote it when asking about a request.

string
success
required

Example

{
"success": false
}