Update a webhook
PUT
/webhooks/{webhookID}Updates a webhook subscription's target URL or subscribed event types and returns the updated resource.
Auth:
BearerPath parameters
webhookIDuuidrequired
Request body
urlstring
eventsstring[]
activeboolean
Response
idUnique identifier for this resource.
uuid
family_idIdentifier of the family this resource belongs to.
uuid
urlHTTPS endpoint that receives POSTed webhook events.
string
eventsList of event types this webhook subscribes to.
string[]
activeWhether the webhook is currently active and receiving deliveries.
boolean
created_atRFC 3339 timestamp of when the resource was created.
datetime
updated_atRFC 3339 timestamp of the resource's most recent update.
datetime
Request
bash
curl -sS -X PUT "https://phosra-api-sandbox-production.up.railway.app/api/v1/webhooks/8a1b2c3d-4e5f-4a6b-9c8d-1e2f3a4b5c6d" \
-H "Authorization: Bearer $PHOSRA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://yourapp.com/webhooks/phosra",
"events": [
"enforcement.completed"
],
"active": true
}'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"
}