Webhooks
Oħloq webhook
Irreġistra URL li jirċievi avvenimenti ta’ webhook
POST
/
api
/
v1
/
webhooks
curl --request POST \
--url https://anivahealth.com/api/v1/webhooks \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"url": "https://partner.example.com/webhooks/aniva",
"enabled_events": [
"appointment.confirmed",
"appointment.results.completed",
"home_kit_order.results.completed"
],
"alert_emails": [
"ops@partner.example.com"
],
"description": "Production"
}'
{
"secret": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw8L0qsE2bkS4=",
"id": "4a6c8e0f-2b4d-4f6a-8c0e-2a4c6e8f0b1d",
"url": "https://partner.example.com/webhooks/aniva",
"description": "Production",
"enabled_events": [
"appointment.confirmed",
"appointment.results.completed",
"home_kit_order.results.completed"
],
"alert_emails": ["ops@partner.example.com"],
"status": "enabled",
"disabled_at": null,
"disabled_reason": null,
"failing_since": null,
"previous_secret_expires_at": null,
"created_at": "2026-10-15T08:00:00.000Z",
"updated_at": "2026-10-15T08:00:00.000Z"
}
{
"error": "url must use https"
}
{
"error": "An API key can own at most 5 webhooks"
}
Irreġistra URL HTTPS li jirċievi avvenimenti ta’ webhook. Iċ-ċavetta tal-API tiegħek hija s-sid
tal-webhook. Dan jirċievi avveniment biss għal oġġetti li ċ-ċavetta tiegħek tista’ taqra. Ċavetta tal-API jista’ jkollha sa massimu ta’ 5
webhooks.
Jeħtieġ is-scope
webhooks_manage.Talba
Parametri tal-body
URL HTTPS fuq port 443 b’host pubbliku u mingħajr kredenzjali. Aniva ma ssegwix redirects.
Tipi ta’ avvenimenti li għandhom jiġu rċevuti, mill-inqas wieħed.
["*"] tfisser kull tip.
ping ma jistax jiġi elenkat.Risposta
Meta tirnexxi, l-API tirritorna201 Created bil-webhook u s-sigriet tiegħu.
Is-sigriet tal-iffirmar,
whsec_ flimkien ma’ base64. Aniva turih biss f’din ir-risposta. Ara Ivverifika
l-firma.Tipi ta’ avvenimenti li jirċievi dan il-webhook.
* tfisser kull tip.Għaliex il-webhook ġie diżattivat. Ara Avviżi ta’ falliment.
null
waqt li jkun attivat.Mument ISO 8601 UTC meta bdiet is-sensiela attwali ta’ fallimenti.
null meta l-aħħar kunsinna tkun irnexxiet.Mument ISO 8601 UTC meta s-sigriet ta’ qabel ma jibqax jiffirma.
null meta ma jkun hemm l-ebda rotazzjoni għaddejja.Risposti ta’ żball
| Status | Deskrizzjoni |
|---|---|
400 | Talba mhux valida, pereżempju URL ħażin, tip ta’ avveniment mhux magħruf, alert_emails mhux validi, jew ċavetta tal-API li ma jistax ikollha webhook. |
401 | L-ebda ċavetta tal-API, jew ċavetta tal-API mhux valida. |
403 | Iċ-ċavetta tal-API tiegħek m’għandhiex is-scope webhooks_manage. |
409 | Iċ-ċavetta tal-API tiegħek diġà għandha 5 webhooks. |
500 | Żball intern tas-server. |
curl --request POST \
--url https://anivahealth.com/api/v1/webhooks \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"url": "https://partner.example.com/webhooks/aniva",
"enabled_events": [
"appointment.confirmed",
"appointment.results.completed",
"home_kit_order.results.completed"
],
"alert_emails": [
"ops@partner.example.com"
],
"description": "Production"
}'
{
"secret": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw8L0qsE2bkS4=",
"id": "4a6c8e0f-2b4d-4f6a-8c0e-2a4c6e8f0b1d",
"url": "https://partner.example.com/webhooks/aniva",
"description": "Production",
"enabled_events": [
"appointment.confirmed",
"appointment.results.completed",
"home_kit_order.results.completed"
],
"alert_emails": ["ops@partner.example.com"],
"status": "enabled",
"disabled_at": null,
"disabled_reason": null,
"failing_since": null,
"previous_secret_expires_at": null,
"created_at": "2026-10-15T08:00:00.000Z",
"updated_at": "2026-10-15T08:00:00.000Z"
}
{
"error": "url must use https"
}
{
"error": "An API key can own at most 5 webhooks"
}
⌘I
curl --request POST \
--url https://anivahealth.com/api/v1/webhooks \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"url": "https://partner.example.com/webhooks/aniva",
"enabled_events": [
"appointment.confirmed",
"appointment.results.completed",
"home_kit_order.results.completed"
],
"alert_emails": [
"ops@partner.example.com"
],
"description": "Production"
}'
{
"secret": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw8L0qsE2bkS4=",
"id": "4a6c8e0f-2b4d-4f6a-8c0e-2a4c6e8f0b1d",
"url": "https://partner.example.com/webhooks/aniva",
"description": "Production",
"enabled_events": [
"appointment.confirmed",
"appointment.results.completed",
"home_kit_order.results.completed"
],
"alert_emails": ["ops@partner.example.com"],
"status": "enabled",
"disabled_at": null,
"disabled_reason": null,
"failing_since": null,
"previous_secret_expires_at": null,
"created_at": "2026-10-15T08:00:00.000Z",
"updated_at": "2026-10-15T08:00:00.000Z"
}
{
"error": "url must use https"
}
{
"error": "An API key can own at most 5 webhooks"
}