Create a webhook subscription

POST/webhooks

Register a webhook endpoint to receive event notifications.

Auth:Bearer

Request body

family_id

uuidrequired
url

Webhook URL to receive events

stringrequired
events

Events to subscribe to (e.g. policy.updated, enforcement.completed)

string[]required

Response

id

uuid
family_id

uuid
url

string
events

string[]
active

boolean
created_at

datetime
updated_at

datetime
Request
bash
curl -X POST "https://prodapi.phosra.com/api/v1/webhooks" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "family_id": "550e8400-e29b-41d4-a716-446655440000",
  "url": "string",
  "events": [
    "string"
  ]
}'
Response
json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "family_id": "550e8400-e29b-41d4-a716-446655440000",
  "url": "string",
  "events": [
    "string"
  ],
  "active": true,
  "created_at": "2025-01-15T09:30:00Z",
  "updated_at": "2025-01-15T09:30:00Z"
}