Webhooks API
These endpoints manage webhook subscriptions - the URLs the API delivers events to. For the delivery model, signature verification, and event payloads, see the Webhooks guide. All endpoints require the webhooks:manage scope.
#The subscription object
| Field | Type | Description |
|---|---|---|
id | string | Subscription id. |
url | string | HTTPS endpoint events are delivered to. |
event_types | string[] | Event types this subscription receives. |
enabled | boolean | Whether delivery is active. |
secret | string | Signing secret - returned only once, at creation. |
created_at | string | ISO 8601 timestamp. |
#Create a subscription
POST
| Body field | Type | Description |
|---|---|---|
url | string | HTTPS endpoint to receive events. |
event_types | string[] | Event types to subscribe to. |
bash
curl -X POST https://api.smile-app.co.il/v1/webhooks \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/hooks/smile",
"event_types": ["appointment.created", "appointment.updated"]
}'
json
{
"data": {
"id": "wh_2a9f",
"url": "https://example.com/hooks/smile",
"event_types": ["appointment.created", "appointment.updated"],
"enabled": true,
"secret": "whsec_8f2c...",
"created_at": "2026-06-27T12:00:00+03:00"
}
}
Save the secret now
secret (the whsec_... signing key) is shown once. Store it securely - you'll need it to verify delivery signatures, and it can't be retrieved later. If lost, delete the subscription and create a new one.
#List subscriptions
GET
Returns the clinic's subscriptions with the secret masked.
bash
curl https://api.smile-app.co.il/v1/webhooks \
-H "Authorization: Bearer sk_live_..."
#Retrieve a subscription
GET
bash
curl https://api.smile-app.co.il/v1/webhooks/wh_2a9f \
-H "Authorization: Bearer sk_live_..."
#Delete a subscription
DELETE
Stops all future deliveries to the subscription.
bash
curl -X DELETE https://api.smile-app.co.il/v1/webhooks/wh_2a9f \
-H "Authorization: Bearer sk_live_..."
#List deliveries
GET
A paginated log of delivery attempts for a subscription - useful for debugging failures.
bash
curl https://api.smile-app.co.il/v1/webhooks/wh_2a9f/deliveries \
-H "Authorization: Bearer sk_live_..."
#Retry a delivery
POST
Manually re-attempts a failed delivery.
bash
curl -X POST \
https://api.smile-app.co.il/v1/webhooks/wh_2a9f/deliveries/dl_771/retry \
-H "Authorization: Bearer sk_live_..."