Skip to Content
Webhooks

Rotate a project webhook signing secret

Generates a new signing secret returned once in the response. The previous signing secret remains valid for 24 hours so receivers can transition cleanly.

POST
/api/projects/{projectId}/webhooks/{webhookId}/rotate-secret

Authorization

headerAuthorizationBearer <Postdot API key>

A user-owned Postdot API key sent as Authorization: Bearer <token>. Its project scope is limited by the creator’s current access.

Path Parameters

projectId*string
Length1 <= length
webhookId*string
Length1 <= length

Response Body

Response for status 200

application/json
  1. response
webhook*
secret*string

The new signing secret for this webhook. It is returned only once on rotation.

Length1 <= length
previousSecretExpiresAt*integer

Unix epoch milliseconds until which the previous signing secret remains valid during the 24-hour rotation window.

Range0 <= value
Example Request
curl -X POST 'https://postdot.example/api/projects/string/webhooks/string/rotate-secret'
Example Response
{
  "webhook": {
    "id": "string",
    "projectId": "string",
    "url": "string",
    "events": [
      "post.created"
    ],
    "state": "active",
    "pausedReason": "string",
    "cursorSequence": 0,
    "secretVersion": 1,
    "previousSecretExpiresAt": 0,
    "createdByActorId": "string",
    "updatedByActorId": "string",
    "createdAt": 0,
    "updatedAt": 0
  },
  "secret": "string",
  "previousSecretExpiresAt": 0
}

Was this page helpful?