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

# Enviar evento de teste

> Enviar um evento de ping para um webhook

Envia um evento `ping` assinado para um webhook, sejam quais forem os seus `enabled_events`. A chamada responde de imediato.
Acompanha o resultado com [Listar entregas](https://docs.anivahealth.com/pt/api/webhooks/list-deliveries.md).

> [!NOTE]
>
> Requer o âmbito `webhooks_manage`.

## Pedido

### Parâmetros de caminho

**id** `string` *required*

Identificador do webhook (UUID).

## Resposta

Em caso de sucesso, a API devolve `202 Accepted`.

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

Identificador (UUID) da entrega que envia o ping.

## Respostas de erro

| Estado | Descrição |
| - | - |
| `400` | Pedido inválido. Vê a mensagem de `error`. |
| `401` | Chave de API inválida. |
| `403` | Sem chave de API, ou uma chave de API sem o scope `webhooks_manage`. |
| `404` | Webhook não encontrado, ou pertence a outra chave de API. |
| `409` | O webhook está desativado. Ativa-o primeiro. |
| `500` | Erro interno do 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.