Skip to main content
POST
Rotate a signing secret

Authorizations

Authorization
string
header
required

Workspace API key (lora_sk_…) sent as Authorization: Bearer <api_key>. Each scoped operation names the scope it requires in its security requirement, for example shortcuts.write; a key without it receives 403 with code: insufficient_scope. GET /v1/qr also accepts anonymous requests and requires no scope.

Scopes

webhooks.write

Path Parameters

id
string
required

The endpoint's unique ID, wh_ and a UUID.

Pattern: ^wh_[0-9a-f-]{36}$
Example:

"wh_0198f2a4-7c1b-7d3e-9a52-3f6b1c2d4e5f"

Body

application/json

Options for rotating a signing secret. The body may be left out.

immediate
boolean
default:false

Stop the old secret at once instead of after 24 hours. Use it when the old secret is compromised: requests signed with it no longer verify, so the receiver must switch immediately.

Response

The new signing secret.

The new signing secret. Every request signs with the new secret, and with the old one too until previousSecretExpiresAt.

id
string
required

The endpoint's unique ID.

Pattern: ^wh_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Example:

"wh_0198f2a4-7c1b-7d3e-9a52-3f6b1c2d4e5f"

previousSecretExpiresAt
string<date-time> | null
required

When the replaced secret stops signing, ISO 8601: 24 hours from now, or null for an immediate rotation. Rotating again before then replaces the older secret.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
secret
string
required

The signing secret, whsec_ and base64. Shown here once and never again: store it now. Verify requests with it using any Standard Webhooks library.

Example:

"whsec_your_signing_secret"