Skip to content

Rotate the endpoint's signing secret

POST
/v1/webhook-endpoint/rotate-secret
curl --request POST \
--url https://api.vocapable.com/v1/webhook-endpoint/rotate-secret \
--header 'Authorization: Bearer <token>'

Mint a new signing secret, keeping the superseded one valid for 24 hours.

During the overlap every delivery carries two v1= signatures - one per secret - so a receiver can be redeployed with the new key at any point inside the window (docs/04-api.md §5 signing). previous_secret_expires_at on the response is when the old key stops verifying.

An Idempotency-Key is honored so a retried rotate replays the first rotation’s minted secret rather than rotating a second time - a double rotate would collapse the previous secret’s 24-hour overlap before a receiver could pick up the new one. The claim shares this request’s transaction with the rotation, so a failure frees the key.

Idempotency-Key
Any of:
string

Unique key for this request, so a retry replays the original result instead of repeating the work. Stored for 24 hours; a replayed response carries Idempotent-Replay: true. A UUID is the documented shape.

Successful Response

Media typeapplication/json
WebhookEndpointSecretView

A summary plus the plaintext secret, when the answering call minted one.

object
id
required
Id
string
url
required
Url
string
enabled_events
required
Enabled Events
Array<string>
status
required
Status
string
api_version_pin
required
Any of:
string
previous_secret_expires_at
required
Any of:
string format: date-time
created_at
required
Created At
string format: date-time
updated_at
required
Updated At
string format: date-time
secret
required
Any of:
string
Examplegenerated
{
"id": "example",
"url": "example",
"enabled_events": [
"example"
],
"status": "example",
"api_version_pin": "example",
"previous_secret_expires_at": "2026-04-15T12:00:00Z",
"created_at": "2026-04-15T12:00:00Z",
"updated_at": "2026-04-15T12:00:00Z",
"secret": "example"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}