# Consultar fila de envio assíncrono

`GET /message/async`

Pasta: **Mensagem Async**

## Autenticação

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

## Descrição

# Consultar fila de envio assíncrono

Retorna o status da fila interna de mensagens enviadas com `async=true` na instância autenticada. Use para monitorar backlog e se a sessão está pronta.

## Endpoint

`GET {{baseUrl}}/message/async`

## Autenticação

Header obrigatório: `token: {{token}}`.

## Parâmetros

Nenhum. A instância vem do token.

## Exemplo de Requisição

```bash
curl -X GET "{{baseUrl}}/message/async" \
  -H "token: {{token}}"
```

## Resposta de Sucesso

```json
{
  "response": "Async queue status",
  "instanceId": "r183e2ef9597845",
  "queue": {
    "status": "queued",
    "pending": 12,
    "processingNow": true,
    "acceptingNewMessages": true,
    "sessionReady": true,
    "resetting": false
  }
}
```

Status possíveis de `queue.status`: `idle`, `queued`, `processing`, `waiting_connection`, `resetting`.

## Erros comuns

- `401` — token ausente ou inválido
- `500` — fila indisponível (`async queue not accepting`)

## Observações

- Esta fila é só de envio `async=true` da GoZap — não lista webhooks nem filas externas.

## cURL

```bash
curl -X GET "{{baseUrl}}/message/async" \
  -H "token: {{token}}"
```

---

[Índice da pasta](./index.md) · [Índice geral](../index.md) · [UI](https://gozap.dev/docs?op=mensagem-async/consultar-fila-de-envio-assincrono)
