# Verificar números no WhatsApp

`POST /chat/check`

Pasta: **Contatos**

## Autenticação

```http
token: {{token}}
```

## Descrição

# Verificar números no WhatsApp

Consulta se telefones estão registrados no WhatsApp. Use antes de campanhas ou importações para filtrar números inválidos.

## Endpoint

`POST {{baseUrl}}/chat/check`

## Autenticação

Envie o token da instância no header `token: {{token}}`.

## Corpo da requisição

| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
| `numbers` | array[string] | Condicional | Lista de telefones. Informe `numbers` e/ou `number`. |
| `number` | string | Condicional | Atalho para um único telefone (é acrescentado à lista). |

## Exemplo de Requisição

```bash
curl --request POST '{{baseUrl}}/chat/check' \
  --header 'token: {{token}}' \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "numbers": [
    "5511999999999",
    "5511888888888"
  ]
}'
```

## Resposta de Sucesso

```json
{
  "success": true,
  "contacts": [
    {
      "Query": "5511999999999",
      "JID": "5511999999999@s.whatsapp.net",
      "IsIn": true,
      "PhoneNumber": "5511999999999@s.whatsapp.net",
      "VerifiedName": null
    },
    {
      "Query": "5511888888888",
      "JID": "5511888888888@s.whatsapp.net",
      "IsIn": false,
      "PhoneNumber": "5511888888888@s.whatsapp.net",
      "VerifiedName": null
    }
  ]
}
```

## Erros comuns

- `401 Unauthorized`: token inválido.
- `500 Internal Server Error`: instância desconectada ou falha na consulta ao WhatsApp.

## Observações

- A chave da lista na resposta é `contacts` (não `results`).
- `IsIn: true` significa que o número existe no WhatsApp.

## Corpo (exemplo)

```json
{
  "numbers": [
    "5511999999999",
    "5511888888888"
  ]
}
```

## cURL

```bash
curl -X POST "{{baseUrl}}/chat/check" \
  -H "token: {{token}}" \
  -H "Content-Type: application/json" \
  -d '{
  "numbers": [
    "5511999999999",
    "5511888888888"
  ]
}'
```

---

[Índice da pasta](./index.md) · [Índice geral](../index.md) · [UI](https://gozap.dev/docs?op=contatos/verificar-numeros-no-whatsapp)
