Appearance
Webhook Management
Register and manage webhook endpoints.
POST /v1/manage/webhooks
Register a new webhook endpoint.
bash
curl -X POST https://api.availengine.com/v1/manage/webhooks \
-H "Authorization: Bearer avail_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://yourapp.com/webhooks/availengine",
"events": ["booking.created", "booking.cancelled", "deposit.paid"]
}'Response:
json
{
"id": "uuid",
"url": "https://yourapp.com/webhooks/availengine",
"secret": "whsec_generated_secret_key",
"events": ["booking.created", "booking.cancelled", "deposit.paid"],
"is_active": true
}Save the secret — you need it to verify webhook signatures, and it's only shown once.
GET /v1/manage/webhooks
List all webhook endpoints for the current business.
bash
curl https://api.availengine.com/v1/manage/webhooks \
-H "Authorization: Bearer avail_live_YOUR_KEY"DELETE /v1/manage/webhooks/{endpoint_id}
Remove a webhook endpoint.
Rotating a Secret
To rotate a webhook secret, delete the old endpoint and create a new one. Deploy the new secret before deleting the old one to avoid losing events during the switch.