Rotate the signing secret
POST
/webhooks/{id}/rotate-secret
const url = 'https://api.vaartix.com/webhooks/wh_4n8x2k7q1m9c3v5d/rotate-secret';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
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.vaartix.com/webhooks/wh_4n8x2k7q1m9c3v5d/rotate-secret \ --header 'Authorization: Bearer <token>'Creates a new signing secret. The old one stops working immediately.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Example
wh_4n8x2k7q1m9c3v5dResponses
Section titled “Responses”The endpoint with its new secret.
Media typeapplication/json
object
id
string
url
string format: uri
events
Array<string>
status
Endpoints are turned off automatically after 5 deliveries in a row fail every attempt.
string
createdAt
string format: date-time
secret
required
The signing secret. Shown only when created or rotated.
string
Example
{ "id": "wh_4n8x2k7q1m9c3v5d", "events": [ "email.sent" ], "status": "enabled", "secret": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw"}unauthorized: the API key is missing, invalid or revoked.
Media typeapplication/json
object
error
required
object
type
required
Stable, machine-readable error type.
string
message
required
Human-readable explanation, safe to show to developers.
string
Example
{ "error": { "type": "validation_error" }}forbidden: the key cannot do this, for example a send-only key on a management endpoint.
Media typeapplication/json
object
error
required
object
type
required
Stable, machine-readable error type.
string
message
required
Human-readable explanation, safe to show to developers.
string
Example
{ "error": { "type": "validation_error" }}not_found: no such resource in your team.
Media typeapplication/json
object
error
required
object
type
required
Stable, machine-readable error type.
string
message
required
Human-readable explanation, safe to show to developers.
string
Example
{ "error": { "type": "validation_error" }}