REST API

REST API (cURL)

Documentação completa da REST API com exemplos cURL para todos os endpoints. Use com qualquer linguagem que suporte HTTP.

Base URL e Autenticação

A API usa a chave da instância (key) diretamente na URL. Não é necessário header de autenticação.

Produção: https://us.api-wa.me
Produção: https://server.api-wa.me
Dev: http://0.0.0.0:3002

Formato da URL: https://us.api-wa.me/{key}/{resource}

curl
# Formato base de todas as requisições
curl -X GET "https://us.api-wa.me/{KEY}/instance"

# Com body JSON
curl -X POST "https://us.api-wa.me/{KEY}/message/text" \
  -H "Content-Type: application/json" \
  -d '{"to": "559999999999", "text": "Hello!"}'

Instância

Gerencie conexão, configurações e perfil da instância.

GET/{key}/instance— Informações da instância
curl
curl "https://us.api-wa.me/YOUR_KEY/instance"
200 OKresponse
{
  "status": 200,
  "instance": {
    "receive_status_message": false,
    "save_media": false,
    "receive_presence": false,
    "permission": 1,
    "mark_messages": true,
    "blocked": false,
    "user": {
      "id": "559999999999@s.whatsapp.net",
      "lid": "123456789@lid",
      "name": "My Bot",
      "imageProfile": "https://pps.whatsapp.net/..."
    },
    "phoneConnected": true,
    "webhook": {
      "allowWebhook": true,
      "allowNumber": "all",
      "webhookMessage": "https://your-webhook.com/message",
      "webhookGroup": "",
      "webhookConnection": "",
      "webhookQrCode": "",
      "webhookMessageFromMe": "",
      "webhookHistory": ""
    },
    "businessProfile": {
      "wid": "559999999999@s.whatsapp.net",
      "description": "WhatsApp Bot",
      "website": [
        "https://api-wa.me"
      ],
      "category": "Technology"
    }
  }
}
POST/{key}/instance— Conectar via QR Code
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/instance"
200 OKresponse
{
  "status": 200,
  "phoneConnected": false,
  "qrcode": "2@ABC123...QRCodeData...",
  "image": "data:image/png;base64,iVBORw0KGgo...",
  "user": null
}
POST/{key}/instance/pairing-code— Conectar via Pairing Code
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/instance/pairing-code" \
  -H "Content-Type: application/json" \
  -d '{"phoneNumber": "559999999999"}'
200 OKresponse
{
  "status": 200,
  "code": "A1B2-C3D4"
}
PATCH/{key}/instance— Atualizar configurações
curl
curl -X PATCH "https://us.api-wa.me/YOUR_KEY/instance?markMessageRead=true&saveMedia=false&receiveStatusMessage=false&receivePresence=false"
200 OKresponse
{
  "status": 200,
  "message": "Settings updated"
}
DELETE/{key}/instance— Logout
curl
curl -X DELETE "https://us.api-wa.me/YOUR_KEY/instance"
200 OKresponse
{
  "status": 200,
  "message": "Logged out"
}
POST/{key}/instance/restart— Restart
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/instance/restart"
200 OKresponse
{
  "status": 200,
  "message": "Restarted"
}
POST/{key}/instance/resync— Resync completo
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/instance/resync"

Perfil

curl
# Atualizar nome
curl -X PUT "https://us.api-wa.me/YOUR_KEY/instance/profile/name" \
  -H "Content-Type: application/json" \
  -d '{"name": "My Bot"}'

# Atualizar status
curl -X PUT "https://us.api-wa.me/YOUR_KEY/instance/status" \
  -H "Content-Type: application/json" \
  -d '{"text": "Online 🟢"}'

# Atualizar foto de perfil
curl -X PUT "https://us.api-wa.me/YOUR_KEY/instance/profile/picture" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/avatar.jpg"}'

# Remover foto de perfil
curl -X DELETE "https://us.api-wa.me/YOUR_KEY/instance/profile/picture"

Proxy e MongoDB

curl
# Configurar proxy
curl -X POST "https://us.api-wa.me/YOUR_KEY/instance/proxy" \
  -H "Content-Type: application/json" \
  -d '{"proxy": "http://user:pass@ip:port"}'

# Configurar MongoDB
curl -X POST "https://us.api-wa.me/YOUR_KEY/instance/mongodb" \
  -H "Content-Type: application/json" \
  -d '{"uri": "mongodb+srv://...", "dbName": "mydb"}'

Conexão Mobile

curl
# Passo 1: Preparar
curl -X POST "https://us.api-wa.me/YOUR_KEY/instance/mobile/prepare" \
  -H "Content-Type: application/json" \
  -d '{"phoneNumberCountryCode": "55", "phoneNumberNationalNumber": "11999999999", "phoneNumberMobileNetworkCode": "11"}'

# Passo 2: Solicitar código
curl -X POST "https://us.api-wa.me/YOUR_KEY/instance/mobile/request-code" \
  -H "Content-Type: application/json" \
  -d '{"method": "sms"}'

# Passo 3: Verificar código
curl -X POST "https://us.api-wa.me/YOUR_KEY/instance/mobile/verify" \
  -H "Content-Type: application/json" \
  -d '{"code": "123456"}'

Webhooks

PUT/{key}/instance— Configurar webhooks
curl
curl -X PUT "https://us.api-wa.me/YOUR_KEY/instance" \
  -H "Content-Type: application/json" \
  -d '{
    "allowWebhook": true,
    "allowNumber": "all",
    "webhookMessage": "https://your-webhook.com/message",
    "webhookGroup": "",
    "webhookConnection": "",
    "webhookQrCode": "",
    "webhookMessageFromMe": "",
    "webhookHistory": ""
  }'
GET/{key}/instance/webhook/statistics— Estatísticas
curl
curl "https://us.api-wa.me/YOUR_KEY/instance/webhook/statistics"
200 OKresponse
{
  "status": 200,
  "data": {
    "totalSent": 1250,
    "totalFailed": 3,
    "totalPending": 0,
    "avgResponseTime": 142
  }
}

Enviar Texto

POST/{key}/message/text
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/text" \
  -H "Content-Type: application/json" \
  -d '{"to": "559999999999", "text": "Hello!"}'
200 OKresponse
{
  "status": 200,
  "data": {
    "key": {
      "remoteJid": "559999999999@s.whatsapp.net",
      "fromMe": true,
      "id": "3EB0A0B1C2D3E4F5A6B7C8"
    },
    "message": {
      "extendedTextMessage": {
        "text": "Hello!"
      }
    },
    "messageTimestamp": "1718900000",
    "status": "PENDING"
  }
}

Enviar Mídia

POST/{key}/message/image
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/image" \
  -H "Content-Type: application/json" \
  -d '{"to": "559999999999", "url": "https://example.com/photo.jpg", "caption": "Toronto"}'
200 OKresponse
{
  "status": 200,
  "data": {
    "key": {
      "remoteJid": "559999999999@s.whatsapp.net",
      "fromMe": true,
      "id": "3EB0B1C2D3E4F5A6B7C8D9"
    },
    "message": {
      "imageMessage": {
        "url": "...",
        "caption": "Toronto"
      }
    },
    "messageTimestamp": "1718900000",
    "status": "PENDING"
  }
}
POST/{key}/message/audio
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/audio" \
  -H "Content-Type: application/json" \
  -d '{"to": "559999999999", "url": "https://example.com/audio.mp3"}'
POST/{key}/message/video
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/video" \
  -H "Content-Type: application/json" \
  -d '{"to": "559999999999", "url": "https://example.com/video.mp4", "caption": "Big Buck Bunny"}'
POST/{key}/message/document
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/document" \
  -H "Content-Type: application/json" \
  -d '{"to": "559999999999", "url": "https://example.com/file.pdf", "mimetype": "application/pdf", "fileName": "Resume.pdf"}'
POST/{key}/message/sticker
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/sticker" \
  -H "Content-Type: application/json" \
  -d '{"to": "559999999999", "url": "https://example.com/sticker.webp"}'
POST/{key}/message/video-note
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/video-note" \
  -H "Content-Type: application/json" \
  -d '{"to": "559999999999", "url": "https://example.com/video.mp4"}'

Envio via Base64

curl
# Imagem Base64
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/base64/image" \
  -H "Content-Type: application/json" \
  -d '{"to": "559999999999", "base64": "data:image/png;base64,...", "caption": "Caption"}'

# Áudio Base64
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/base64/audio" \
  -H "Content-Type: application/json" \
  -d '{"to": "559999999999", "base64": "data:audio/mp3;base64,..."}'

# Documento Base64
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/base64/document" \
  -H "Content-Type: application/json" \
  -d '{"to": "559999999999", "base64": "data:application/pdf;base64,...", "mimetype": "application/pdf", "fileName": "file.pdf"}'

Enviar Contato

POST/{key}/message/contact— Contato único
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/contact" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "559999999999",
    "contact": {"fullName": "Raphael", "phoneNumber": "559999999999", "organization": "api-wa.me"}
  }'
POST/{key}/message/contacts— Múltiplos contatos
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/contacts" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "559999999999",
    "displayName": "Meus Contatos",
    "contacts": [
      {"fullName": "Raphael", "phoneNumber": "559999999999"},
      {"fullName": "João", "phoneNumber": "559888888888", "organization": "WAME"}
    ]
  }'

Enviar Localização

POST/{key}/message/location— Localização fixa
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/location" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "559999999999",
    "location": {"latitude": 37.7749, "longitude": -122.4194, "address": "San Francisco, CA"}
  }'
POST/{key}/message/live-location— Tempo real
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/live-location" \
  -H "Content-Type: application/json" \
  -d '{"to": "559999999999", "latitude": -23.5505, "longitude": -46.6333, "caption": "Estou aqui!"}'

Reação e Presença

POST/{key}/message/reaction
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/reaction" \
  -H "Content-Type: application/json" \
  -d '{"text": "👍", "msgId": "MESSAGE_ID"}'
POST/{key}/message/presence
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/presence" \
  -H "Content-Type: application/json" \
  -d '{"to": "559999999999", "status": "composing"}'
# status: unavailable, available, composing, recording, paused

Mensagem com Título

POST/{key}/message/title
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/title" \
  -H "Content-Type: application/json" \
  -d '{"to": "559999999999", "title": "Order #123", "text": "Your order is ready", "footer": "Thank you!"}'

Botões

POST/{key}/message/button_reply— Botões de resposta
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/button_reply" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "559999999999",
    "header": {"title": "Choose an option"},
    "text": "What do you prefer?",
    "footer": "Select one",
    "buttons": [
      {"type": "quick_reply", "id": "1", "text": "Yes"},
      {"type": "quick_reply", "id": "2", "text": "No"}
    ]
  }'
POST/{key}/message/button_action— Botões de ação (URL, Call, Copy)
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/button_action" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "559999999999",
    "header": {"title": "Actions"},
    "text": "Choose an action",
    "footer": "Select one",
    "buttons": [
      {"type": "cta_url", "url": "https://api-wa.me", "text": "Visit website"},
      {"type": "cta_call", "phone_number": "+559999999999", "text": "Call us"},
      {"type": "cta_copy", "copy_code": "PROMO2025", "text": "Copy code"}
    ]
  }'

Lista / Menu

POST/{key}/message/list
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/list" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "559999999999",
    "buttonText": "Ver opções",
    "text": "Selecione uma opção:",
    "title": "Menu Principal",
    "footer": "Wame API",
    "sections": [
      {
        "title": "Serviços",
        "rows": [
          {"title": "Suporte", "description": "Falar com atendente", "rowId": "support"},
          {"title": "Vendas", "description": "Nossos produtos", "rowId": "sales"}
        ]
      }
    ]
  }'

Enquete / Poll

POST/{key}/message/survey
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/survey" \
  -H "Content-Type: application/json" \
  -d '{"to": "559999999999", "name": "Do you like PHP?", "options": ["Yes", "No"]}'
POST/{key}/message/poll
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/poll" \
  -H "Content-Type: application/json" \
  -d '{"to": "559999999999", "name": "Favorite?", "values": ["PHP", "TypeScript", "Go"], "selectableCount": 1}'

Cobrança via Pix

POST/{key}/message/pix
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/pix" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "559999999999",
    "title": "Pizza Order",
    "text": "Your order details",
    "referenceId": "order-123",
    "code": "0020101021226700014br.gov.bcb.pix",
    "key": "23711695000115",
    "merchantName": "MY STORE",
    "keyType": "CNPJ",
    "items": [
      {"id": "1", "name": "Pizza G", "price": 45, "quantity": 2},
      {"id": "2", "name": "Soda", "price": 8, "quantity": 2}
    ],
    "subtotal": 106,
    "totalAmount": 106
  }'

Evento, Pin e Call Link

POST/{key}/message/event
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/event" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "559999999999",
    "name": "Team Meeting",
    "description": "Weekly sync",
    "startTime": "2025-01-15T14:00:00Z",
    "locationName": "Office",
    "locationAddress": "123 Main St"
  }'
POST/{key}/message/pin— Fixar
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/pin" \
  -H "Content-Type: application/json" \
  -d '{"id": "MESSAGE_ID", "duration": 604800}'
POST/{key}/message/unpin— Desfixar
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/unpin" \
  -H "Content-Type: application/json" \
  -d '{"id": "MESSAGE_ID"}'
POST/{key}/message/call-link— Enviar link de chamada
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/call-link" \
  -H "Content-Type: application/json" \
  -d '{"to": "559999999999", "type": "video", "caption": "Join the meeting"}'
POST/{key}/message/create-call-link— Criar link (sem enviar)
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/create-call-link" \
  -H "Content-Type: application/json" \
  -d '{"type": "video"}'

Detalhes, Mídia e Outros

GET/{key}/message/{messageId}— Detalhes
curl
curl "https://us.api-wa.me/YOUR_KEY/message/MESSAGE_ID"
200 OKresponse
{
  "status": 200,
  "data": {
    "key": {
      "remoteJid": "559999999999@s.whatsapp.net",
      "fromMe": true,
      "id": "3EB0A1B2C3"
    },
    "message": {
      "extendedTextMessage": {
        "text": "Hello!"
      }
    },
    "messageTimestamp": "1718900000",
    "status": "READ"
  }
}
GET/{key}/message/{messageId}/media— Download mídia
curl
# JSON com base64
curl "https://us.api-wa.me/YOUR_KEY/message/MESSAGE_ID/media?format=json"

# Download binário
curl "https://us.api-wa.me/YOUR_KEY/message/MESSAGE_ID/media?format=binary" -o media.jpg
200 OKresponse
{
  "status": 200,
  "data": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ..."
}
POST/{key}/message/product— Produto do catálogo
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/product" \
  -H "Content-Type: application/json" \
  -d '{"to": "559999999999", "businessOwnerJid": "559999999999@s.whatsapp.net", "productId": "123", "catalogId": "456"}'
POST/{key}/message/group-invite— Convite de grupo
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/group-invite" \
  -H "Content-Type: application/json" \
  -d '{"to": "559999999999", "groupJid": "123456789@g.us", "groupName": "Devs", "inviteCode": "CODE"}'
POST/{key}/message/request-phone— Solicitar telefone
curl
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/request-phone" \
  -H "Content-Type: application/json" \
  -d '{"to": "559999999999"}'

Responder Mensagem

Use /{key}/message/{id}/{type} para responder. Mesmo body do envio normal.

curl
# Responder com texto
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/ORIGINAL_MSG_ID/text" \
  -H "Content-Type: application/json" \
  -d '{"to": "559999999999", "text": "This is a reply!"}'

# Responder com imagem
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/ORIGINAL_MSG_ID/image" \
  -H "Content-Type: application/json" \
  -d '{"to": "559999999999", "url": "https://example.com/photo.jpg", "caption": "Reply"}'

# Responder com vídeo
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/ORIGINAL_MSG_ID/video" \
  -H "Content-Type: application/json" \
  -d '{"to": "559999999999", "url": "https://example.com/video.mp4"}'

# Responder com documento
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/ORIGINAL_MSG_ID/document" \
  -H "Content-Type: application/json" \
  -d '{"to": "559999999999", "url": "https://example.com/file.pdf", "mimetype": "application/pdf"}'

# Responder com áudio
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/ORIGINAL_MSG_ID/audio" \
  -H "Content-Type: application/json" \
  -d '{"to": "559999999999", "url": "https://example.com/audio.mp3"}'

# Responder com botões, pix, título, contato, localização
# Mesmo padrão: POST /{key}/message/{id}/button_reply
# POST /{key}/message/{id}/button_action
# POST /{key}/message/{id}/pix
# POST /{key}/message/{id}/title
# POST /{key}/message/{id}/contact
# POST /{key}/message/{id}/location

Chat

curl
# Listar chats
curl "https://us.api-wa.me/YOUR_KEY/chat"
200 OKresponse
{
  "status": 200,
  "data": [
    {
      "id": "559999999999@s.whatsapp.net",
      "name": "Raphael",
      "timestamp": 1718900000,
      "unreadCount": 3
    },
    {
      "id": "120363XXXXX@g.us",
      "name": "Developers",
      "timestamp": 1718899000,
      "unreadCount": 0
    }
  ]
}
curl
# Mensagens de um chat (paginado)
curl "https://us.api-wa.me/YOUR_KEY/chat/messages?chatId=559999999999@s.whatsapp.net&page=1&limit=20"
200 OKresponse
{
  "status": 200,
  "data": [
    {
      "key": {
        "remoteJid": "559999999999@s.whatsapp.net",
        "fromMe": false,
        "id": "3EB0A1B2C3"
      },
      "message": {
        "extendedTextMessage": {
          "text": "Hello!"
        }
      },
      "messageTimestamp": "1718900000",
      "status": "READ"
    }
  ],
  "page": 1,
  "limit": 20,
  "total": 150
}
curl
# Marcar como lido
curl -X PATCH "https://us.api-wa.me/YOUR_KEY/chat?id=559999999999@s.whatsapp.net&action=markRead&value=true"

# Fixar chat
curl -X PATCH "https://us.api-wa.me/YOUR_KEY/chat?id=559999999999@s.whatsapp.net&action=pin&value=true"

# Deletar chat
curl -X DELETE "https://us.api-wa.me/YOUR_KEY/chat?chatId=559999999999@s.whatsapp.net"

Presença, Mensagens Temporárias e Privacidade

curl
# Inscrever presença
curl -X POST "https://us.api-wa.me/YOUR_KEY/chat/presence/subscribe" \
  -H "Content-Type: application/json" \
  -d '{"jid": "559999999999@s.whatsapp.net"}'

# Mensagens temporárias (7 dias)
curl -X POST "https://us.api-wa.me/YOUR_KEY/chat/disappearing" \
  -H "Content-Type: application/json" \
  -d '{"jid": "559999999999@s.whatsapp.net", "expiration": 604800}'

# Privacidade
curl "https://us.api-wa.me/YOUR_KEY/chat/privacy"

Chamadas

curl
# Fazer chamada
curl -X POST "https://us.api-wa.me/YOUR_KEY/call" \
  -H "Content-Type: application/json" \
  -d '{"to": "559999999999"}'
200 OKresponse
{
  "status": 200,
  "data": {
    "callId": "A1B2C3D4E5F6",
    "peerJid": "559999999999@s.whatsapp.net"
  }
}
curl
# Aceitar chamada
curl -X POST "https://us.api-wa.me/YOUR_KEY/call/accept" \
  -H "Content-Type: application/json" \
  -d '{"callId": "CALL_ID", "callFrom": "559999999999@s.whatsapp.net"}'

# Rejeitar chamada
curl -X DELETE "https://us.api-wa.me/YOUR_KEY/call/CALL_ID/559999999999@s.whatsapp.net"

# Encerrar chamada
curl -X POST "https://us.api-wa.me/YOUR_KEY/call/end" \
  -H "Content-Type: application/json" \
  -d '{"callId": "CALL_ID", "peerJid": "559999999999@s.whatsapp.net"}'

Etiquetas / Labels

curl
# Listar etiquetas
curl "https://us.api-wa.me/YOUR_KEY/labels"
200 OKresponse
{
  "status": 200,
  "data": [
    {
      "id": "1",
      "name": "New Customer",
      "color": 1
    },
    {
      "id": "2",
      "name": "VIP",
      "color": 2
    },
    {
      "id": "3",
      "name": "Pending Payment",
      "color": 3
    }
  ]
}
curl
# Criar etiqueta
curl -X POST "https://us.api-wa.me/YOUR_KEY/labels" \
  -H "Content-Type: application/json" \
  -d '{"name": "VIP"}'

# Chats com etiqueta
curl "https://us.api-wa.me/YOUR_KEY/labels/LABEL_ID"

# Adicionar etiqueta ao chat
curl -X POST "https://us.api-wa.me/YOUR_KEY/labels/LABEL_ID" \
  -H "Content-Type: application/json" \
  -d '{"to": "559999999999"}'

# Remover etiqueta do chat
curl -X DELETE "https://us.api-wa.me/YOUR_KEY/labels/LABEL_ID/chat/559999999999"

# Deletar etiqueta
curl -X DELETE "https://us.api-wa.me/YOUR_KEY/labels/LABEL_ID"

Ações

curl
# Verificar número registrado
curl "https://us.api-wa.me/YOUR_KEY/actions/registered?number=559999999999"
200 OKresponse
{
  "status": 200,
  "registered": true
}
curl
# Deletar storage
curl -X DELETE "https://us.api-wa.me/YOUR_KEY/actions/storage"
200 OKresponse
{
  "status": 200,
  "message": "Storage deleted"
}

Contatos

curl
# Listar contatos
curl "https://us.api-wa.me/YOUR_KEY/contacts"
200 OKresponse
{
  "status": 200,
  "data": [
    {
      "id": "559999999999@s.whatsapp.net",
      "name": "Raphael",
      "notify": "Raphael S.",
      "imgUrl": "https://pps.whatsapp.net/..."
    },
    {
      "id": "559888888888@s.whatsapp.net",
      "name": "João",
      "notify": "João"
    }
  ]
}
curl
# Perfil do contato
curl "https://us.api-wa.me/YOUR_KEY/contacts/559999999999"
200 OKresponse
{
  "status": 200,
  "data": {
    "id": "559999999999@s.whatsapp.net",
    "name": "Raphael",
    "notify": "Raphael S.",
    "imgUrl": "https://pps.whatsapp.net/..."
  }
}
curl
# Adicionar contato
curl -X POST "https://us.api-wa.me/YOUR_KEY/contacts" \
  -H "Content-Type: application/json" \
  -d '{"number": "559999999999", "name": "João Silva"}'

# Remover contato
curl -X DELETE "https://us.api-wa.me/YOUR_KEY/contacts/559999999999"

# Bloquear / Desbloquear
curl -X PATCH "https://us.api-wa.me/YOUR_KEY/contacts/559999999999?action=block"
curl -X PATCH "https://us.api-wa.me/YOUR_KEY/contacts/559999999999?action=unblock"

# Listar bloqueados
curl "https://us.api-wa.me/YOUR_KEY/contacts/blocked"

# Status do contato
curl "https://us.api-wa.me/YOUR_KEY/contacts/559999999999/status"

# Limpar sessão
curl -X DELETE "https://us.api-wa.me/YOUR_KEY/contacts/559999999999/session"

# Resolver LIDs
curl -X POST "https://us.api-wa.me/YOUR_KEY/contacts/resolve-lids" \
  -H "Content-Type: application/json" \
  -d '{"lids": ["lid1@lid", "lid2@lid"]}'

Grupos

curl
# Listar grupos
curl "https://us.api-wa.me/YOUR_KEY/groups"
200 OKresponse
{
  "status": 200,
  "data": [
    {
      "id": "120363XXXXX@g.us",
      "subject": "Developers",
      "owner": "559999999999@s.whatsapp.net",
      "creation": 1700000000,
      "desc": "Dev team group",
      "participants": [
        {
          "id": "559999999999@s.whatsapp.net",
          "admin": "superadmin"
        },
        {
          "id": "559888888888@s.whatsapp.net",
          "admin": null
        }
      ]
    }
  ]
}
curl
# Detalhes do grupo
curl "https://us.api-wa.me/YOUR_KEY/groups/123456789@g.us"
200 OKresponse
{
  "status": 200,
  "data": {
    "id": "123456789@g.us",
    "subject": "Developers",
    "owner": "559999999999@s.whatsapp.net",
    "creation": 1700000000,
    "desc": "Dev team group",
    "participants": [
      {
        "id": "559999999999@s.whatsapp.net",
        "admin": "superadmin"
      },
      {
        "id": "559888888888@s.whatsapp.net",
        "admin": "admin"
      },
      {
        "id": "559777777777@s.whatsapp.net",
        "admin": null
      }
    ]
  }
}
curl
# Criar grupo
curl -X POST "https://us.api-wa.me/YOUR_KEY/groups" \
  -H "Content-Type: application/json" \
  -d '{"name": "Developers", "participants": ["559999999999"]}'

# Atualizar grupo
curl -X PUT "https://us.api-wa.me/YOUR_KEY/groups/123456789@g.us" \
  -H "Content-Type: application/json" \
  -d '{"name": "New Name", "description": "New description"}'

# Configurações
curl -X PATCH "https://us.api-wa.me/YOUR_KEY/groups/123456789@g.us?setting=announcement"
# setting: announcement, not_announcement, locked, unlocked

# Sair do grupo
curl -X DELETE "https://us.api-wa.me/YOUR_KEY/groups/123456789@g.us"

Participantes

curl
# Membros
curl "https://us.api-wa.me/YOUR_KEY/groups/123456789@g.us/members"

# Adicionar participantes
curl -X POST "https://us.api-wa.me/YOUR_KEY/groups/123456789@g.us/participants" \
  -H "Content-Type: application/json" \
  -d '{"participants": ["559999999999"]}'

# Remover participantes
curl -X DELETE "https://us.api-wa.me/YOUR_KEY/groups/123456789@g.us/participants" \
  -H "Content-Type: application/json" \
  -d '{"participants": ["559999999999"]}'

# Promover / Rebaixar
curl -X PATCH "https://us.api-wa.me/YOUR_KEY/groups/123456789@g.us/role?action=promote" \
  -H "Content-Type: application/json" \
  -d '{"participants": ["559999999999"]}'

# Aprovação de participantes
curl "https://us.api-wa.me/YOUR_KEY/groups/123456789@g.us/request_participants_list"
curl -X PUT "https://us.api-wa.me/YOUR_KEY/groups/123456789@g.us/request_participants_list" \
  -H "Content-Type: application/json" \
  -d '{"participants": ["559999999999"], "action": "approve"}'

Convites e Imagem

curl
# Código de convite
curl "https://us.api-wa.me/YOUR_KEY/groups/123456789@g.us/invite"
200 OKresponse
{
  "status": 200,
  "inviteCode": "AbCdEfGhIjKl"
}
curl
# Info de um convite
curl "https://us.api-wa.me/YOUR_KEY/groups/invite/info?code=INVITE_CODE"

# Atualizar foto do grupo
curl -X PUT "https://us.api-wa.me/YOUR_KEY/groups/123456789@g.us/picture" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/photo.jpg"}'

# Remover foto
curl -X DELETE "https://us.api-wa.me/YOUR_KEY/groups/123456789@g.us/picture"

Comunidade

curl
# Listar comunidades
curl "https://us.api-wa.me/YOUR_KEY/community"
200 OKresponse
{
  "status": 200,
  "data": [
    {
      "id": "120363XXXXX@g.us",
      "name": "My Community",
      "subject": "Tech",
      "description": "Technology community",
      "participants": [
        {
          "id": "559999999999@s.whatsapp.net",
          "admin": "superadmin"
        }
      ]
    }
  ]
}
curl
# Detalhes
curl "https://us.api-wa.me/YOUR_KEY/community/COMMUNITY_ID"

# Criar comunidade
curl -X POST "https://us.api-wa.me/YOUR_KEY/community" \
  -H "Content-Type: application/json" \
  -d '{"name": "My Community", "subject": "Tech"}'

# Atualizar
curl -X PUT "https://us.api-wa.me/YOUR_KEY/community/COMMUNITY_ID" \
  -H "Content-Type: application/json" \
  -d '{"subject": "Updated", "description": "New description"}'

# Sair
curl -X DELETE "https://us.api-wa.me/YOUR_KEY/community/COMMUNITY_ID"

# Foto
curl -X PUT "https://us.api-wa.me/YOUR_KEY/community/COMMUNITY_ID/picture" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/photo.jpg"}'

# Convite
curl -X POST "https://us.api-wa.me/YOUR_KEY/community/COMMUNITY_ID/invite"

# Remover participantes
curl -X DELETE "https://us.api-wa.me/YOUR_KEY/community/COMMUNITY_ID/participants" \
  -H "Content-Type: application/json" \
  -d '{"participants": ["559999999999"]}'

Convites e Aprovação

curl
# Aceitar convite
curl -X POST "https://us.api-wa.me/YOUR_KEY/community/invite/accept" \
  -H "Content-Type: application/json" \
  -d '{"code": "INVITE_CODE"}'

# Info de convite
curl "https://us.api-wa.me/YOUR_KEY/community/invite/info?code=INVITE_CODE"

# Pendentes de aprovação
curl "https://us.api-wa.me/YOUR_KEY/community/COMMUNITY_ID/request_participants_list"
curl -X PUT "https://us.api-wa.me/YOUR_KEY/community/COMMUNITY_ID/request_participants_list" \
  -H "Content-Type: application/json" \
  -d '{"participants": ["559999999999"], "action": "approve"}'

Grupos e Configurações

curl
# Criar grupo na comunidade
curl -X POST "https://us.api-wa.me/YOUR_KEY/community/COMMUNITY_ID/group" \
  -H "Content-Type: application/json" \
  -d '{"subject": "Novo Grupo", "participants": ["559999999999"]}'

# Mensagens temporárias
curl -X POST "https://us.api-wa.me/YOUR_KEY/community/COMMUNITY_ID/ephemeral" \
  -H "Content-Type: application/json" \
  -d '{"expiration": 604800}'

# Configurações
curl -X PATCH "https://us.api-wa.me/YOUR_KEY/community/COMMUNITY_ID/settings" \
  -H "Content-Type: application/json" \
  -d '{"setting": "announcement"}'

# Modo de adição de membros
curl -X PATCH "https://us.api-wa.me/YOUR_KEY/community/COMMUNITY_ID/member-add-mode" \
  -H "Content-Type: application/json" \
  -d '{"mode": "admin_add"}'

# Aprovação de entrada
curl -X PATCH "https://us.api-wa.me/YOUR_KEY/community/COMMUNITY_ID/join-approval" \
  -H "Content-Type: application/json" \
  -d '{"mode": "on"}'

Business / Catálogo

curl
# Listar catálogo
curl "https://us.api-wa.me/YOUR_KEY/business/catalog?limit=10"
200 OKresponse
{
  "status": 200,
  "data": [
    {
      "name": "Premium T-Shirt",
      "description": "100% cotton",
      "currency": "BRL",
      "price": 79.9,
      "images": [
        {
          "url": "https://example.com/photo.jpg"
        }
      ]
    }
  ],
  "cursor": "next_page_token"
}
curl
# Collections
curl "https://us.api-wa.me/YOUR_KEY/business/collections?limit=10"

# Criar produto
curl -X POST "https://us.api-wa.me/YOUR_KEY/business/catalog/product" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Premium T-Shirt",
    "description": "100% cotton",
    "originCountryCode": "BR",
    "currency": "BRL",
    "price": 79.90,
    "images": [{"url": "https://example.com/photo.jpg"}]
  }'

# Atualizar produto
curl -X PUT "https://us.api-wa.me/YOUR_KEY/business/catalog/product/PRODUCT_ID" \
  -H "Content-Type: application/json" \
  -d '{"name": "Premium T-Shirt v2", "price": 89.90}'

# Deletar produto
curl -X DELETE "https://us.api-wa.me/YOUR_KEY/business/catalog/product/PRODUCT_ID"

# Detalhes de um pedido
curl "https://us.api-wa.me/YOUR_KEY/business/order/ORDER_ID?token=ORDER_TOKEN"

Newsletter / Canal

curl
# Criar newsletter
curl -X POST "https://us.api-wa.me/YOUR_KEY/newsletter" \
  -H "Content-Type: application/json" \
  -d '{"name": "Meu Canal", "description": "Descrição"}'
200 OKresponse
{
  "status": 200,
  "message": "Newsletter created"
}
curl
# Metadata
curl "https://us.api-wa.me/YOUR_KEY/newsletter/metadata?type=invite&id=NEWSLETTER_ID"
200 OKresponse
{
  "status": 200,
  "data": {
    "id": "120363XXXXX@newsletter",
    "name": "Meu Canal",
    "description": "Descrição",
    "subscribers": 1250
  }
}
curl
# Subscribers e admins
curl "https://us.api-wa.me/YOUR_KEY/newsletter/NEWSLETTER_ID/subscribers"
curl "https://us.api-wa.me/YOUR_KEY/newsletter/NEWSLETTER_ID/admins"

# Seguir / Deixar de seguir
curl -X POST "https://us.api-wa.me/YOUR_KEY/newsletter/NEWSLETTER_ID/follow"
curl -X POST "https://us.api-wa.me/YOUR_KEY/newsletter/NEWSLETTER_ID/unfollow"

Atualizar Canal

curl
# Nome
curl -X PUT "https://us.api-wa.me/YOUR_KEY/newsletter/NEWSLETTER_ID/name" \
  -H "Content-Type: application/json" \
  -d '{"name": "Novo Nome"}'

# Descrição
curl -X PUT "https://us.api-wa.me/YOUR_KEY/newsletter/NEWSLETTER_ID/description" \
  -H "Content-Type: application/json" \
  -d '{"description": "Nova descrição"}'

# Foto
curl -X PUT "https://us.api-wa.me/YOUR_KEY/newsletter/NEWSLETTER_ID/picture" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/photo.jpg"}'
curl -X DELETE "https://us.api-wa.me/YOUR_KEY/newsletter/NEWSLETTER_ID/picture"

Administração e Mensagens

curl
# Transferir propriedade
curl -X PUT "https://us.api-wa.me/YOUR_KEY/newsletter/NEWSLETTER_ID/owner" \
  -H "Content-Type: application/json" \
  -d '{"newOwnerJid": "559999999999@s.whatsapp.net"}'

# Rebaixar admin
curl -X PUT "https://us.api-wa.me/YOUR_KEY/newsletter/NEWSLETTER_ID/demote" \
  -H "Content-Type: application/json" \
  -d '{"userJid": "559999999999@s.whatsapp.net"}'

# Listar mensagens
curl "https://us.api-wa.me/YOUR_KEY/newsletter/NEWSLETTER_ID/messages?count=10"

# Reagir
curl -X POST "https://us.api-wa.me/YOUR_KEY/newsletter/NEWSLETTER_ID/react" \
  -H "Content-Type: application/json" \
  -d '{"serverId": "SERVER_ID", "reaction": "👍"}'

# Silenciar / Ativar
curl -X POST "https://us.api-wa.me/YOUR_KEY/newsletter/NEWSLETTER_ID/mute"
curl -X POST "https://us.api-wa.me/YOUR_KEY/newsletter/NEWSLETTER_ID/unmute"

# Deletar newsletter
curl -X DELETE "https://us.api-wa.me/YOUR_KEY/newsletter/NEWSLETTER_ID"

Status / Stories

curl
# Status texto
curl -X POST "https://us.api-wa.me/YOUR_KEY/status/text" \
  -H "Content-Type: application/json" \
  -d '{"text": "Hello World!", "statusJidList": []}'

# Status imagem
curl -X POST "https://us.api-wa.me/YOUR_KEY/status/image" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/photo.jpg", "caption": "Minha foto"}'

# Status vídeo
curl -X POST "https://us.api-wa.me/YOUR_KEY/status/video" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/video.mp4", "caption": "Meu vídeo"}'

# Status áudio
curl -X POST "https://us.api-wa.me/YOUR_KEY/status/audio" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/audio.mp3"}'

# Menção
curl -X POST "https://us.api-wa.me/YOUR_KEY/status/mention" \
  -H "Content-Type: application/json" \
  -d '{"jid": "559999999999@s.whatsapp.net", "statusMsgId": "STATUS_MSG_ID"}'

Contexto para AI

Use este arquivo de contexto para que assistentes de AI (Claude, ChatGPT, Copilot, etc.) entendam a REST API e possam te ajudar a programar integrações.

llms.txt

Arquivo com toda a documentação da REST API em formato otimizado para AI. Inclui todos os endpoints, parâmetros e exemplos.

WAME REST API — Documentação

Começar Agora