Webhooks
Rotating secrets
There is no overlap window. Order matters.
curl -X POST https://api.calllens.io/api/v1/ingest/webhooks/{id}/secret \
-H "Authorization: Bearer clk_..."Returns the endpoint plus the new secret.
There is no overlap window. The next delivery is signed with the new secret only. The old secret stops working the instant you rotate.
Rotating without dropping deliveries
Because there is no dual-signing period, the safe pattern is to make your consumer accept either secret across the change:
- Deploy a consumer that tries the current secret, then a
CALLLENS_WEBHOOK_SECRET_NEXTvalue if the first fails. With no next value configured it behaves exactly as before. - Rotate. Store the returned secret as
CALLLENS_WEBHOOK_SECRET_NEXT. - Confirm with
POST /webhooks/{id}/test— the probe is signed with the new secret. - Promote the new value to
CALLLENS_WEBHOOK_SECRETand clear the next value.
Trying two secrets means two constant-time comparisons; it does not weaken verification.
If you have lost the secret
Rotate. There is no way to read an existing secret — POST /webhooks returned it once and no
route returns it again.