Auth API reference

Auth API · App-Outbound-Webhooks

post/v1/apps/{app_id}/webhook/rotate-secretAuth

Rotate the signing secret of the first endpoint. Returns the new plaintext ONCE. `X-Auth-Signature` uses it at once; the standard `webhook-signature` header carries both secrets for 24 hours. Deprecated: use `/v1/apps/{appId}/webhooks/endpoints` (several endpoints, event descriptions, Send test, event log, replay). This route acts on the app's first endpoint. Responses carry `Deprecation: true` and `Sunset: Fri, 15 Jan 2027 00:00:00 GMT`.

Path parameters

app_id*string

Id of the app.

Response · 200 Rotated endpoint and the new plaintext.

id*string
app_id*string · uuid
url*string

Example: "https://customer.example.com/webhooks/auth"

event_types*array

Subscribed events. Empty means the endpoint is switched off.

Example: ["user.email_verified","tenant.created"]

signing_secret_hint*string

Last 4 chars of the signing secret.

disabled_at*string · date-time

Set when the endpoint was switched off automatically after sustained failures.

disabled_reason*string
consecutive_failures*number
dead_letter_dropped_count*number

Always 0: every event is kept in the event log for 30 days, so none is dropped. Kept for older clients.

Example: 0

dead_letter_dropped_at*string · date-time

Always null. Kept for older clients.

created_at*string · date-time
updated_at*string · date-time
signing_secret*string

Plaintext signing secret. Returned exactly once.

Example

Request

POST https://api.auth.productcraft.co/v1/apps/{app_id}/webhook/rotate-secret
Authorization: Bearer YOUR_TOKEN

Response

{
  "id": "string",
  "app_id": "00000000-0000-0000-0000-000000000000",
  "url": "https://customer.example.com/webhooks/auth",
  "event_types": [
    "user.email_verified",
    "tenant.created"
  ],
  "signing_secret_hint": "string",
  "disabled_at": "2026-01-01T00:00:00.000Z",
  "disabled_reason": "string",
  "consecutive_failures": 0,
  "dead_letter_dropped_count": 0,
  "dead_letter_dropped_at": "2026-01-01T00:00:00.000Z",
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z",
  "signing_secret": "string"
}