Skip to content

Rotate the signing secret

POST
/webhooks/endpoints/{id}/rotate-secret
curl --request POST \
--url https://api.clearance.rest/webhooks/endpoints/example/rotate-secret \
--header 'X-API-Key: <X-API-Key>'

The previous secret stops working immediately.

id
required
string
>= 1 characters

Resource id.

Default Response

Media typeapplication/json
object
success
required
boolean
endpoint
required

A webhook subscription including its signing secret.

object
id
required
string
url
required
string
description
required
string | null
event_types
required

Subscribed event types and patterns.

Array<string>
enabled
required
boolean
disabled_reason
required

Why the endpoint is disabled: manual (disabled through the API) or failing (disabled automatically after repeated failed deliveries); null while enabled.

string | null
consecutive_failures
required
integer
>= -9007199254740991 <= 9007199254740991
last_success_at
required
Any of:

UTC timestamp (ISO 8601).

string
last_failure_at
required
Any of:

UTC timestamp (ISO 8601).

string
created_at
required

UTC timestamp (ISO 8601).

string
updated_at
required

UTC timestamp (ISO 8601).

string
secret
required

Signing secret (whsec_…). Returned only when the endpoint is created or its secret is rotated.

string
Example
{
"success": true
}

Default Response

Media typeapplication/json

Error envelope returned by every JSON endpoint.

object
success
required
boolean
error
required
object
code
required

Machine-readable error code (snake_case).

string
message
required

Human-readable message.

string
details

Extra context for the error.

object
key
additional properties
Example
{
"success": false
}

Default Response

Media typeapplication/json

Error envelope returned by every JSON endpoint.

object
success
required
boolean
error
required
object
code
required

Machine-readable error code (snake_case).

string
message
required

Human-readable message.

string
details

Extra context for the error.

object
key
additional properties
Example
{
"success": false
}

Default Response

Media typeapplication/json

Error envelope returned by every JSON endpoint.

object
success
required
boolean
error
required
object
code
required

Machine-readable error code (snake_case).

string
message
required

Human-readable message.

string
details

Extra context for the error.

object
key
additional properties
Example
{
"success": false
}