Daybook DocsDaybook Docs
Browse

Create a webhook endpoint

POST/v1/webhook-endpoints

Register an HTTPS URL to receive events.

Call this with AIA brief with this endpoint's request, response and auth, ready for a typed client in your language.

Body

  • urlstringrequired
    HTTPS only.
  • eventsstring[]required
    Event types, or ["*"] for all. See Event types.
  • descriptionstring
Try itEdit the fields and copy the request. Nothing is sent from this page.
curl -X POST https://api.daybookhealthcare.com/v1/webhook-endpoints \
  -H "Authorization: Bearer $DAYBOOK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "url": "https://example.com/daybook/webhooks",
    "events": [
      "*"
    ]
  }'

Response

  • idstring
    Unique id, prefixed whe_.
  • urlstring
  • eventsstring[]
  • secretstring
    Signing secret, prefixed whsec_. Returned only on create.
  • statusstring
    enabled or disabled.
curl -X POST https://api.daybookhealthcare.com/v1/webhook-endpoints \
  -H "Authorization: Bearer $DAYBOOK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "url": "https://example.com/daybook/webhooks",
    "events": [
      "*"
    ]
  }'
Response 200
{
  "id": "whe_01JBXK4R7T2M9P5W3Y6A8C0D1E",
  "object": "webhook_endpoint",
  "url": "https://example.com/daybook/webhooks",
  "events": [
    "*"
  ],
  "secret": "whsec_...",
  "status": "enabled"
}