PUT /api/v1/auth/applications/{id}/webhook
{ "url": "https://bistro.example/hooks/auth" }The answer carries signingSecret (whsec_…), shown only then. Calling it again replaces the secret.
| Event | When |
|---|---|
| user.disabled | An administrator deactivates the person |
| user.roles_changed | The person's workspace roles change |
| user.application_roles_changed | The person's roles in this application change |
| user.application_data_erased | An administrator erased what Auth holds about the person in this application |
Verify every delivery
Each request carries Ziqme-Webhook-Id, Ziqme-Webhook-Event, Ziqme-Webhook-Timestamp and Ziqme-Webhook-Signature: v1=<hex>, the HMAC-SHA256 of "{timestamp}.{body}" keyed with the signing secret. Compare in constant time and refuse old timestamps. The ID is stable across retries; drop duplicates.
The example uses @smartdesk/auth-sdk, which is not on npm yet (contact Ziqme support at https://ziqme.com/contact for early access). The check is plain HMAC-SHA256, so any crypto library does the same.
import { verifyWebhook } from '@smartdesk/auth-sdk'
const genuine = await verifyWebhook({
secret: process.env.AUTH_WEBHOOK_SECRET!,
body: rawBody,
timestamp: request.headers.get('ziqme-webhook-timestamp'),
signature: request.headers.get('ziqme-webhook-signature'),
})Delivery
Answer 2xx to acknowledge. Anything else, or no answer within 10 seconds, is retried after 30 seconds, doubling up to 6 hours, ten attempts in all. Auth posts over HTTPS only, to public addresses only, and follows no redirects. The body carries IDs and roles, never a name or an address.