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

# Envia un esdeveniment de prova

> Envia un esdeveniment de ping a un webhook

Envia un esdeveniment `ping` signat a un webhook, siguin quins siguin els seus `enabled_events`. La crida respon immediatament.
Segueix el resultat amb [Llistar lliuraments](https://docs.anivahealth.com/ca/api/webhooks/list-deliveries.md).

> [!NOTE]
>
> Requereix l'àmbit `webhooks_manage`.

## Sol·licitud

### Paràmetres de ruta

**id** `string` *required*

Identificador del webhook (UUID).

## Resposta

Si té èxit, l'API retorna `202 Accepted`.

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

Identificador (UUID) del lliurament que envia el ping.

## Respostes d'error

| Estat | Descripció |
| - | - |
| `400` | Sol·licitud no vàlida. Consulta el missatge `error`. |
| `401` | Clau d'API no vàlida. |
| `403` | Sense clau d'API, o una clau d'API sense l'abast `webhooks_manage`. |
| `404` | No s'ha trobat el webhook, o pertany a una altra clau d'API. |
| `409` | El webhook està desactivat. Activa'l primer. |
| `500` | Error intern del servidor. |

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