SmileCloudDocs

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

FieldTypeDescription
idstringSubscription id.
urlstringHTTPS endpoint events are delivered to.
event_typesstring[]Event types this subscription receives.
enabledbooleanWhether delivery is active.
secretstringSigning secret - returned only once, at creation.
created_atstringISO 8601 timestamp.

#Create a subscription

POST

Body fieldTypeDescription
urlstringHTTPS endpoint to receive events.
event_typesstring[]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_..."