Webhookovi
Ažuriraj webhook
Promijeni, onemogući ili omogući 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."
}
Izmijeni webhook. Pošalji samo polja koja želiš promijeniti. Pošalji
status: "enabled" da
ponovno pokreneš onemogućeni webhook. Pogledaj Obavijesti o neuspjesima.
Zahtijeva scope
webhooks_manage.Zahtjev
Parametri putanje
Parametri tijela
Novi HTTPS URL. Ista pravila kao kod Izradi.
Odgovor
U slučaju uspjeha, API vraća200 OK s ažuriranim webhookom.
Vrste događaja koje ovaj webhook prima.
* označava svaku vrstu.Razlog zašto je webhook onemogućen. Pogledaj Obavijesti o neuspjehu.
null
dok je omogućen.ISO 8601 UTC trenutak kada je započeo trenutni niz neuspjeha.
null kada je zadnja isporuka uspjela.ISO 8601 UTC trenutak kada prethodna tajna prestaje potpisivati.
null kada rotacija nije u tijeku.Odgovori s pogreškama
| Status | Opis |
|---|---|
400 | Neispravan zahtjev. Pogledaj poruku error. |
401 | Nema API ključa ili je API ključ neispravan. |
403 | Tvoj API ključ nema opseg webhooks_manage. |
404 | Webhook nije pronađen ili pripada drugom API ključu. |
409 | status: "enabled" na webhooku koji je Aniva onemogućila. Kontaktiraj Anivu da ga omogući. |
500 | Interna pogreška poslužitelja. |
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."
}