Skip to content
Documentation
Get started

Webhooks

Rotate the signing secret of a webhook endpoint

POST
/v1/webhook-endpoints/{webhookEndpointId}/rotate-secret
curl --request POST \
--url https://api.timbro.do/v1/webhook-endpoints/example/rotate-secret \
--header 'Authorization: Bearer <token>' \
--header 'idempotency-key: example'

Issues a new signing secret, returned only in this response, and keeps the previous secret signing deliveries for 24 hours.

webhookEndpointId
required
string
/^webhook_endpoint_[0-9a-hjkmnp-tv-z]{24,}$/

Webhook endpoint to operate on.

idempotency-key
required
string
>= 1 characters <= 255 characters /^[\x20-\x7e]+$/

The endpoint and its new signing secret. Store the secret securely.

Media typeapplication/json
Response fields and codes

The endpoint and its new signing secret. Store the secret securely.

object
id
required

Webhook endpoint identifier.

string
/^webhook_endpoint_[0-9a-hjkmnp-tv-z]{24,}$/
object
required
string
Allowed value: webhook_endpoint
url
required
string format: uri
enabledEvents
required

The retained subscription configuration, including event types from earlier contracts.

Array<string>
>= 1 items
status
required
Any of:
string
Allowed value: active
secretCreatedAt
required

When the current signing secret was issued.

string format: date-time
previousSecretExpiresAt
required
Any of:
string format: date-time
createdAt
required
string format: date-time
secret
required

Signing secret in the Standard Webhooks whsec_ form. Returned only when it is issued.

string
/^whsec_[A-Za-z0-9+/]+={0,2}$/
request-id
required
string

Identifies this request. Quote it when you contact support.

Idempotent-Replayed
string
Allowed value: true

true when this response replays the stored result of an earlier request with the same Idempotency-Key.