Skip to content

Rotate the secret

POST/v1/webhooks/{id}/rotate_secretKey scope write

Replaces the endpoint's signing secret and returns the new one once. The old secret stops being used at once, so deliveries signed after the call verify only with the new secret.

Needs a key with the write scope. Authentication

curl -X POST https://api.useinfrared.com/v1/webhooks/whe_2HLyVEWQelwo16welH16NM/rotate_secret \
  -H "Authorization: Bearer $INFRARED_KEY"
200 OKResponse
{
  "object": "webhook_endpoint",
  "id": "whe_2HLyVEWQelwo16welH16NM",
  "project_id": "prj_0TBAgHGtdMketrbltGFHuk",
  "url": "https://example.com/webhooks/infrared",
  "description": "Marketplace backend",
  "event_types": [
    "moderation.completed",
    "moderation.failed",
    "queue_item.created"
  ],
  "status": "active",
  "api_version": "2026-09-01",
  "consecutive_failures": 0,
  "disabled_at": null,
  "disabled_reason": null,
  "last_delivery_at": "2026-10-08T09:29:11.086Z",
  "last_success_at": "2026-10-08T09:29:11.086Z",
  "created_at": "2026-10-08T09:28:59.023Z",
  "updated_at": "2026-10-08T09:29:14.447Z",
  "secret": "whsec_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

Path parameters

idstringRequired

Id of the endpoint: whe_ plus 22 base62 characters.

Returns

The endpoint, including the new secret.

Errors

404
not_found

The key's project has no webhook endpoint with this id.

Every endpoint can also answer the errors any request can meet: a missing key, a rate limit, a malformed body. Errors

Something missing or unclear on this page? Write to support@useinfrared.com.