Webhooky
Aktualizovat webhook
Změnit, vypnout nebo zapnout 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."
}
Změň webhook. Pošli jen pole, která chceš změnit. Pokud chceš vypnutý webhook znovu spustit,
pošli
status: "enabled". Viz Upozornění na selhání.
Vyžaduje scope
webhooks_manage.Požadavek
Parametry cesty
Parametry těla
Nová HTTPS URL. Stejná pravidla jako u Vytvoření.
Odpověď
Při úspěchu vrátí API200 OK s aktualizovaným webhookem.
Typy událostí, které tento webhook přijímá.
* znamená všechny typy.Proč byl webhook vypnut. Viz Oznámení o selhání.
null,
dokud je zapnutý.Čas v ISO 8601 UTC, kdy předchozí tajný klíč přestane podepisovat.
null, pokud neprobíhá rotace.Chybové odpovědi
| Status | Popis |
|---|---|
400 | Neplatný požadavek. Viz zpráva error. |
401 | Neplatný API klíč. |
403 | Chybějící API klíč, nebo API klíč bez oprávnění webhooks_manage. |
404 | Webhook nebyl nalezen, nebo patří jinému API klíči. |
409 | status: "enabled" u webhooku, který vypnula Aniva. Pro jeho zapnutí kontaktuj Aniva. |
500 | Interní chyba serveru. |
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."
}