/v1/apps/{app_id}/webhookAuthCreate 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*stringId of the app.
Request body
url*stringDestination URL. Must be absolute https:// with a public TLD.
Example: "https://api.acme.com/webhooks/auth"
event_types*arrayEvent 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*stringapp_id*string · uuidurl*stringExample: "https://customer.example.com/webhooks/auth"
event_types*arraySubscribed events. Empty means the endpoint is switched off.
Example: ["user.email_verified","tenant.created"]
signing_secret_hint*stringLast 4 chars of the signing secret.
disabled_at*string · date-timeSet when the endpoint was switched off automatically after sustained failures.
disabled_reason*stringconsecutive_failures*numberdead_letter_dropped_count*numberAlways 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-timeAlways null. Kept for older clients.
created_at*string · date-timeupdated_at*string · date-timesigning_secret*stringPlaintext 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"
}