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

# Webhook de Presença

> Configura URL que recebe eventos de presença (digitando, online, offline)

## Descrição

Configura a URL do seu servidor que receberá eventos de presença dos contatos, como quando um contato está digitando, gravando um áudio, ficou online ou offline.

## Request

### Headers

```
Client-Token: SEU_CLIENT_TOKEN
Content-Type: application/json
```

### Body

```json theme={null}
{
  "value": "https://seusite.com/webhook/presence"
}
```

| Campo   | Tipo   | Obrigatório | Descrição                                               |
| ------- | ------ | ----------- | ------------------------------------------------------- |
| `value` | string | Sim         | URL do seu servidor que receberá os eventos de presença |

## Response

### Sucesso (200)

```json theme={null}
{
  "success": true
}
```

## Eventos de Presença

| Evento        | Descrição                   |
| ------------- | --------------------------- |
| `composing`   | Contato está digitando      |
| `recording`   | Contato está gravando áudio |
| `available`   | Contato está online         |
| `unavailable` | Contato ficou offline       |

## Exemplo cURL

```bash theme={null}
curl -X PUT 'https://api.bliper.io/instances/{INSTANCE_ID}/token/{INSTANCE_TOKEN}/update-webhook-chat-presence' \
  -H 'Client-Token: SEU_CLIENT_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"value": "https://seusite.com/webhook/presence"}'
```
