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

# Início rápido

> Suba o ZapMeow local, crie uma sessão e leia o QR.

## 1. Postgres e serviço

```bash theme={null}
docker run -d --name zapmeow-pg -e POSTGRES_PASSWORD=zapmeow -e POSTGRES_DB=zapmeow -p 127.0.0.1:55432:5432 postgres:16-alpine

export DATABASE_URL='postgres://postgres:zapmeow@127.0.0.1:55432/zapmeow?sslmode=disable'
export ZAPMEOW_API_KEY='troque-por-uma-chave-com-16-ou-mais-caracteres'
go run .
```

O serviço escuta em `:8080` (`PORT`). `GET /health` responde `200` quando o Postgres está de pé.

## 2. Criar uma sessão

```bash theme={null}
curl -X POST localhost:8080/api/sessions \
  -H "X-Api-Key: $ZAPMEOW_API_KEY" -H 'Content-Type: application/json' \
  -d '{"name":"suporte"}'
```

Resposta: `{"name":"suporte","status":"STARTING",...}`. Em segundos o status vira `SCAN_QR_CODE`.

## 3. Ler o QR

Abra `http://localhost:8080/dashboard/`, entre com a chave e leia o QR em **WhatsApp › Aparelhos conectados**. Ou pela API:

```bash theme={null}
curl -H "X-Api-Key: $ZAPMEOW_API_KEY" -H 'Accept: image/png' localhost:8080/api/suporte/auth/qr -o qr.png
```

Depois de ler, o status vira `WORKING`.

## 4. Enviar

```bash theme={null}
curl -X POST localhost:8080/api/sendText \
  -H "X-Api-Key: $ZAPMEOW_API_KEY" -H 'Content-Type: application/json' \
  -d '{"session":"suporte","chatId":"5511999990000@c.us","text":"Olá!"}'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.