webhooks

Rotate a webhook subscription's secret

Changed on
post/webhook-subscriptions/{subscription_id}/rotate-secret

Request

  • Base URL
    https://api.pscrpt.com/v1
  • URL
    https://api.pscrpt.com/v1/webhook-subscriptions/{subscription_id}/rotate-secret
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization code: https://api.pscrpt.com/oauth/authorize
      Token URL: https://api.pscrpt.com/oauth/token scopes: webhooks:write

Path parameters

subscription_idstring required

Headers

Idempotency-Keystring

Deduplicates retries for 24 hours: the same key returns the original response with Idempotency-Replayed: true; the same key with a different body returns 409 idempotency_key_reused.

If-Matchstring

The ETag from your last read; the write fails if the resource has changed since.

Postscript-Versionstring date
Example:2026-07-23

Overrides the key's pinned API revision for this request.

Request body

previous_secret_expires_in_secondsinteger

Seconds the previous secret stays valid, from 0 (revoked immediately) to 86400 (24 hours, the default).

Response

The subscription, with its secret.

Example response

{
  "data": {
    "created_at": "2026-07-23T17:32:01.123456Z",
    "updated_at": "2026-07-23T17:32:01.123456Z"
  }
}

Changes