Auth API reference

Auth API · App-Outbound-Webhooks

put/v1/apps/{app_id}/webhookAuth

Create or replace the app's first webhook endpoint. Returns a new plaintext signing secret ONCE (the old one stops working). Also clears an automatic disable. 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.

Request body

url*string

Destination URL. Must be absolute https:// with a public TLD.

Example: "https://api.acme.com/webhooks/auth"

event_types*array

Event types this destination subscribes to. An empty list receives nothing (the endpoint is switched off).

Example: ["user.signup","user.email_verified"]

Response · 200 The endpoint and its new plaintext secret.

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

PUT https://api.auth.productcraft.co/v1/apps/{app_id}/webhook
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "url": "https://api.acme.com/webhooks/auth",
  "event_types": [
    "user.signup",
    "user.email_verified"
  ]
}

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"
}