Webhooky
Aktualizovať webhook
Zmeniť, vypnúť alebo zapnúť webhook
PATCH
/
api
/
v1
/
webhooks
/
{id}
curl --request PATCH \
--url https://anivahealth.com/api/v1/webhooks/4a6c8e0f-2b4d-4f6a-8c0e-2a4c6e8f0b1d \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"status": "enabled"
}'
{
"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-16T07:30:00.000Z"
}
{
"error": "Webhook not found"
}
{
"error": "Aniva disabled this endpoint. Contact Aniva to enable it."
}
Zmeň webhook. Odošli len polia, ktoré chceš zmeniť. Odošli
status: "enabled", ak chceš
vypnutý webhook znova spustiť. Pozri si Upozornenia na zlyhania.
Vyžaduje scope
webhooks_manage.Požiadavka
Parametre cesty
Parametre tela
Nová HTTPS URL. Rovnaké pravidlá ako pri Vytvorení.
Odpoveď
Pri úspechu API vráti200 OK s aktualizovaným webhookom.
Typy udalostí, ktoré tento webhook prijíma.
* znamená každý typ.Prečo bol webhook vypnutý. Pozri Upozornenia na zlyhania.
null,
kým je zapnutý.Čas v ISO 8601 UTC, kedy sa začala aktuálna séria zlyhaní.
null, keď posledné doručenie uspelo.Čas v ISO 8601 UTC, kedy predchádzajúci tajný kľúč prestane podpisovať.
null, keď neprebieha žiadna rotácia.Chybové odpovede
| Stav | Popis |
|---|---|
400 | Neplatná požiadavka. Pozri správu error. |
401 | Chýbajúci alebo neplatný API kľúč. |
403 | Tvoj API kľúč nemá rozsah webhooks_manage. |
404 | Webhook sa nenašiel alebo patrí inému API kľúču. |
409 | status: "enabled" pri webhooku, ktorý Aniva vypla. Kontaktuj Aniva, aby ho zapla. |
500 | Interná chyba servera. |
curl --request PATCH \
--url https://anivahealth.com/api/v1/webhooks/4a6c8e0f-2b4d-4f6a-8c0e-2a4c6e8f0b1d \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"status": "enabled"
}'
{
"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-16T07:30:00.000Z"
}
{
"error": "Webhook not found"
}
{
"error": "Aniva disabled this endpoint. Contact Aniva to enable it."
}
⌘I
curl --request PATCH \
--url https://anivahealth.com/api/v1/webhooks/4a6c8e0f-2b4d-4f6a-8c0e-2a4c6e8f0b1d \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"status": "enabled"
}'
{
"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-16T07:30:00.000Z"
}
{
"error": "Webhook not found"
}
{
"error": "Aniva disabled this endpoint. Contact Aniva to enable it."
}