Integrations
Preview

Rotate an endpoint's signing secret

Makes a new signing secret and returns it once, in `secret`. The old one stops signing at once: the next post of every delivery still waiting is signed with the new one, so update the receiver first if it must not miss a post. Needs `integration:manage`.

POST
/outbound-webhooks/{endpointId}/rotate
cookiebetter-auth.session_token<token>

Better Auth session cookie. Production uses the __Secure- prefixed name.

endpointId*string
Formatuuid
Idempotency-Key?string

Makes retries safe. A repeated key with the same request returns the first result and sets Idempotent-Replayed: true. The same key with a different request answers 409 idempotency.key_reused, and while the first request is still running 409 idempotency.in_progress. Results are kept for 24 hours. Server errors and refusals for lack of sign-in or permission are not kept, so a retry runs again.

Match^[A-Za-z0-9_.:-]+$
Length1 <= length <= 255

Response Body

The endpoint and its new signing secret.

application/json
  1. response
endpoint*
secret*string

The signing secret, whsec_ and 64 hex characters. It is shown here once and cannot be read again.

Example Request
curl -X POST 'https://wardn.example.com/api/v1/outbound-webhooks/497f6eca-6276-4993-bfeb-53cbbbba6f08/rotate'
Example Response
{  "endpoint": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "name": "deploy-events",    "url": "https://hooks.example.com/wardn/deploys",    "events": [      "string"    ],    "paused": true,    "maskedSecret": "whsec_••••a91f",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "lastDelivery": {      "status": "pending",      "at": "2019-08-24T14:15:22Z",      "code": 0    }  },  "secret": "string"}