Skip to Content
CallMitraDocs
API referenceWebhooks

Rotate an endpoint's signing secret

Returns a new `secret` once. For the next 24 hours deliveries carry signatures from both the new and the old secret in `webhook-signature`, so you can switch without dropping events.

POST
/api/v1/webhook-endpoints/{endpoint_id}/rotate-secret

Returns a new secret once. For the next 24 hours deliveries carry signatures from both the new and the old secret in webhook-signature, so you can switch without dropping events.

Authorization

headerX-API-Key<token>

Create in the console: Settings → API & webhooks.

Path Parameters

endpoint_id*Endpoint Id

Webhook endpoint id.

Response Body

OK

application/json
  1. response
secret*Secret

Signing secret (whsec_...). Shown only in this response; store it securely.

success?Success

Always true on a 2xx response.

Defaulttrue
webhookEndpoint*
[key: string]?any
Example Request
curl -X POST 'https://api.callmitra.ai/api/v1/webhook-endpoints/string/rotate-secret'
Example Response
{  "secret": "whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD",  "success": true,  "webhookEndpoint": {    "consecutiveFailures": 0,    "createdAt": "2026-11-01T08:15:00+00:00",    "description": "CRM sync",    "enabled": true,    "events": [      "call.completed",      "call.escalated",      "lead.created"    ],    "id": "4f0c2a8e-7b1d-4c39-9a51-2d6e8f3b1c07",    "lastStatus": "HTTP 200",    "lastSuccessAt": "2026-11-15T10:42:07.512000+00:00",    "previousSecretExpiresAt": "2026-11-16T10:50:00+00:00",    "updatedAt": "2026-11-15T10:42:07.512000+00:00",    "url": "https://example.com/hooks/call-mitra"  }}