> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anivahealth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Atjaunināt tīmekļa aizķeri

> Mainīt, atspējot vai iespējot tīmekļa aizķeri

Maini tīmekļa aizķeri. Nosūti tikai tos laukus, kurus vēlies mainīt. Nosūti `status: "enabled"`, lai
atkal palaistu atspējotu tīmekļa aizķeri. Skati [Kļūmju paziņojumus](https://docs.anivahealth.com/lv/concepts/webhooks.md#pazinojumi-par-klumem).

> [!NOTE]
>
> Nepieciešams `webhooks_manage` tvērums.

## Pieprasījums

### Ceļa parametri

**id** `string` *required*

Tīmekļa aizķeres identifikators (UUID).

### Pieprasījuma satura parametri

**url** `string`

Jauns HTTPS URL. Tie paši noteikumi kā sadaļā [Izveide](https://docs.anivahealth.com/lv/api/webhooks/create-webhook.md).

**enabled\_events** `string[]`

Jauns notikumu veidu saraksts. Aizstāj veco sarakstu.

**alert\_emails** `string[]`

Jauns saraksts ar 1 līdz 5 adresēm. Aizstāj veco sarakstu.

**description** `string`

Jauns apraksts, ne vairāk kā 500 rakstzīmes. `null` to notīra.

**status** `string`

`enabled` vai `disabled`. Atspējošana atceļ gaidošās piegādes.

## Atbilde

Ja pieprasījums izdodas, API atgriež `200 OK` ar atjaunināto tīmekļa aizķeri.

**id** `string` *required*

Tīmekļa aizķeres identifikators (UUID).

**url** `string` *required*

HTTPS URL, uz kuru Aniva sūta notikumus.

**description** `string`

Brīvs teksts tavai uzziņai. Var būt `null`.

**enabled\_events** `string[]` *required*

[Notikumu veidi](https://docs.anivahealth.com/lv/concepts/webhooks.md#notikumi), ko saņem šī tīmekļa aizķere. `*` nozīmē visus veidus.

**alert\_emails** `string[]` *required*

Adreses, uz kurām Aniva sūta e-pastus, ja piegādes atkārtoti neizdodas.

**status** `string` *required*

`enabled` vai `disabled`.

**disabled\_at** `string`

ISO 8601 UTC laika brīdis, kad tīmekļa aizķere tika atspējota. `null`, kamēr tā ir iespējota.

**disabled\_reason** `string`

Kāpēc tīmekļa aizķere tika atspējota. Skati [Kļūmju paziņojumi](https://docs.anivahealth.com/lv/concepts/webhooks.md#pazinojumi-par-klumem). `null`,
kamēr tā ir iespējota.

**failing\_since** `string`

ISO 8601 UTC laika brīdis, kad sākās pašreizējā kļūmju sērija. `null`, ja pēdējā piegāde izdevās.

**previous\_secret\_expires\_at** `string`

ISO 8601 UTC laika brīdis, kad iepriekšējā slepenā atslēga pārstāj parakstīt. `null`, ja nenotiek rotācija.

**created\_at** `string` *required*

ISO 8601 UTC laika brīdis, kad tīmekļa aizķere tika izveidota.

**updated\_at** `string` *required*

Pēdējo izmaiņu ISO 8601 UTC laika brīdis.

## Kļūdu atbildes

| Statuss | Apraksts |
| - | - |
| `400` | Nederīgs pieprasījums. Skati `error` ziņojumu. |
| `401` | Nederīga API atslēga. |
| `403` | Nav API atslēgas vai API atslēgai nav `webhooks_manage` tvēruma. |
| `404` | Tīmekļa aizķere nav atrasta vai pieder citai API atslēgai. |
| `409` | `status: "enabled"` tīmekļa aizķerei, ko atspējoja Aniva. Sazinies ar Aniva, lai to iespējotu. |
| `500` | Iekšēja servera kļūda. |

```bash cURL theme={null}
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"
  }'
```

```json 200 theme={null}
{
  "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"
}
```

```json 404 theme={null}
{
  "error": "Webhook not found"
}
```

```json 409 theme={null}
{
  "error": "Aniva disabled this endpoint. Contact Aniva to enable it."
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.