Skip to main content
POST
/
v1
/
webhook-destinations
Create Webhook Destination
curl --request POST \
  --url https://identity.contra.id/v1/webhook-destinations

Request

curl -X POST https://identity.contra.id/v1/webhook-destinations \
  -H "x-api-key: $CONTRA_KEY" -H "Content-Type: application/json" \
  -d '{
    "url":     "https://yourapp.com/contra/webhook",
    "version": "v3",
    "events":  ["session.status_changed", "agent.revoked"]
  }'
BodyTypeRequiredDescription
urlurlyesHTTPS endpoint that will receive POSTs.
versionenumnov3 (recommended) · v2 · v1.
eventsstring[]noSubscribe to a subset; omit for all.

Response · 201

{
  "uuid":   "whd_b3f1…",
  "url":    "https://yourapp.com/contra/webhook",
  "secret": "whsec_a1b2c3d4e5f6g7h8i9j0…",
  "version":"v3",
  "active": true
}
The secret is shown once. Store it — Contra signs every payload with HMAC-SHA256 using this key.