Rotate an event destination bearer secret
to try read requests with your account, or paste an API key into the Authorization field. Create an API key in the Partner Portal.
Replaces an event destination's bearer secret, for example when the old one may have leaked. Prets sends the new secret on subsequent deliveries and there is no overlap period, so update your endpoint to accept it straight away.
Returns the new bearerSecret, shown only once, and rotatedAt. Returns 404 when the destination does not exist or belongs to another organization.
destinationId*stringEvent destination id
^whk_[0-9A-HJKMNP-TV-Z]{26}$The new bearer secret, shown only this once
application/json- response
New bearer secret minted for the destination. Returned cleartext exactly once; the previous secret stops working immediately.
destinationId*stringEvent destination whose bearer secret was rotated
^whk_[0-9A-HJKMNP-TV-Z]{26}$bearerSecret*stringBearer secret returned cleartext exactly once when minted. Sent on every delivery as Authorization: Bearer {secret}. Cannot be retrieved later.
^whsec_[A-Za-z0-9_-]{43}$rotatedAt*stringWhen this secret became the live delivery credential
date-timebearerAuthAuthorizationBearer <token>curl -X POST 'https://api.prets.app/v1/events/destinations/whk_01ARZ3NDEKTSV4RRFFQ69G5FAV/bearer-secret'{ "destinationId": "whk_01ARZ3NDEKTSV4RRFFQ69G5FAV", "bearerSecret": "whsec_3XvK2nQ8mB7pR1sT4uW6yZ0aE5gH9jLcV2bN1xM4qP8", "rotatedAt": "2026-06-01T12:00:00.000Z"}