> ## 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.

# Lähetä testitapahtuma

> Lähetä ping-tapahtuma webhookiin

Lähetä allekirjoitettu `ping`-tapahtuma webhookiin sen `enabled_events`-asetuksesta riippumatta. Kutsu palauttaa vastauksen heti.
Seuraa tulosta kohdassa [Listaa toimitukset](https://docs.anivahealth.com/fi/api/webhooks/list-deliveries.md).

> [!NOTE]
>
> Vaatii `webhooks_manage`-scopen.

## Pyyntö

### Polkuparametrit

**id** `string` *required*

Webhookin tunniste (UUID).

## Vastaus

Onnistuessaan API palauttaa `202 Accepted`.

**delivery\_id** `string` *required*

Ping-tapahtuman lähettävän toimituksen tunniste (UUID).

## Virhevastaukset

| Tilakoodi | Kuvaus |
| - | - |
| `400` | Virheellinen pyyntö. Katso `error`-viesti. |
| `401` | Virheellinen API-avain. |
| `403` | API-avain puuttuu tai sillä ei ole `webhooks_manage`-käyttöoikeutta. |
| `404` | Webhookia ei löytynyt, tai se kuuluu toiselle API-avaimelle. |
| `409` | Webhook on pois käytöstä. Ota se ensin käyttöön. |
| `500` | Palvelimen sisäinen virhe. |

```bash cURL theme={null}
curl --request POST \
  --url https://anivahealth.com/api/v1/webhooks/4a6c8e0f-2b4d-4f6a-8c0e-2a4c6e8f0b1d/ping \
  --header 'x-api-key: YOUR_API_KEY'
```

```json 202 theme={null}
{
  "delivery_id": "7c9e1a3b-5d7f-4b2d-9e4a-6c8e0a2b4d6f"
}
```

```json 409 theme={null}
{
  "error": "The endpoint is disabled. Enable it first."
}
```


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