Skip to main content

Create Webhook

Create a new webhook to receive event notifications.

Endpointโ€‹

POST /v1/webhooks

Authenticationโ€‹

Requires an API key with the webhooks:write scope.

Request Bodyโ€‹

FieldTypeRequiredDescription
namestringYesWebhook name (max 255 characters)
urlstringYesEndpoint URL (must be HTTPS in production)
eventsarrayYesList of event types to subscribe to
is_activebooleanNoWhether webhook is active (default: true)

Available Eventsโ€‹

The booking events most integrations start with:

EventDescription
booking.createdNew booking created
booking.updatedBooking details updated
booking.cancelledBooking cancelled
booking.completedBooking marked complete
booking.no_showBooking marked as a no-show
booking.status_changedBooking status changed

An event name not on the Webhook Events list is refused with 422. That page lists every event, and GET /v1/webhooks/events returns the same list.

Example Requestโ€‹

curl -X POST "https://app.equipdash.com/api/v1/webhooks" \
-H "Authorization: Bearer eqd_live_abc123xyz789..." \
-H "Content-Type: application/json" \
-d '{
"name": "My Integration",
"url": "https://my-app.com/webhooks/equipdash",
"events": ["booking.created", "booking.cancelled", "payment.received"]
}'

Responseโ€‹

Success (201 Created)โ€‹

{
"data": {
"id": 3,
"name": "My Integration",
"url": "https://my-app.com/webhooks/equipdash",
"events": ["booking.created", "booking.cancelled", "payment.received"],
"is_active": true,
"failure_count": 0,
"last_triggered_at": null,
"secret": "abc123xyz789...",
"created_at": "2026-01-15T12:00:00+00:00",
"updated_at": "2026-01-15T12:00:00+00:00"
},
"meta": {
"request_id": "req_def456",
"timestamp": "2026-01-15T12:00:00+00:00"
}
}
Save Your Secret

The secret is only returned when creating the webhook. Store it securely - you'll need it to verify webhook signatures. Use Regenerate Secret if you lose it.

Verifying Webhook Signaturesโ€‹

Each webhook request includes a signature in the X-Webhook-Signature header. Verify it using HMAC-SHA256:

$payload = file_get_contents('php://input');
$signature = hash_hmac('sha256', $payload, $secret);

if (hash_equals($signature, $_SERVER['HTTP_X_WEBHOOK_SIGNATURE'])) {
// Signature valid - process the webhook
}

Errorsโ€‹

StatusCodeDescription
401authentication_requiredNo API key provided
401invalid_api_keyInvalid API key
403insufficient_scopeAPI key lacks webhooks:write scope
422validation_errorInvalid request data

Validation Error Exampleโ€‹

{
"error": {
"code": "validation_error",
"message": "The given data was invalid.",
"details": {
"url": ["The url must be a valid URL."],
"events": ["The events field must have at least 1 items."]
}
}
}