Create Webhook

Create a new webhook endpoint

POST/webhooks
Requires Bearer authentication

Create a new webhook to receive event notifications.

Body Parameters

urlstringrequired

The URL to send webhook payloads to.

eventsarrayrequired

Array of event types to subscribe to.

secretstring

Optional secret for signing webhook payloads.

POST/webhooks
curl -X POST "https://api.vastal.agency/v1/webhooks" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "url": "https://example.com/webhook",
  "events": ["row.created", "row.updated", "row.deleted"]
}'
201Created
{
"success": true,
"data": {
  "id": "whk_xyz789",
  "url": "https://example.com/webhook",
  "events": ["row.created", "row.updated", "row.deleted"],
  "secret": "whsec_...",
  "active": true
}
}