Give a webhook a new signing secret
POST
/v1/webhooks/{id}/secret
const url = 'https://api.sotirea.com/v1/webhooks/1/secret';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"grace":"example"}'};
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.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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
integer
The webhook’s id.
Request Bodyrequired
Section titled “Request Bodyrequired”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"}Responses
Section titled “Responses”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_reason
required
string
events
required
The event types sent to it.
Array<string>
failing
required
How many deliveries gave up.
integer
id
required
integer
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}default
Section titled “default”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}