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.
Formato da URL: https://us.api-wa.me/{key}/{resource}
# 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.
/{key}/instance— Informações da instânciacurl "https://us.api-wa.me/YOUR_KEY/instance"{
"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"
}
}
}/{key}/instance— Conectar via QR Codecurl -X POST "https://us.api-wa.me/YOUR_KEY/instance"{
"status": 200,
"phoneConnected": false,
"qrcode": "2@ABC123...QRCodeData...",
"image": "data:image/png;base64,iVBORw0KGgo...",
"user": null
}/{key}/instance/pairing-code— Conectar via Pairing Codecurl -X POST "https://us.api-wa.me/YOUR_KEY/instance/pairing-code" \
-H "Content-Type: application/json" \
-d '{"phoneNumber": "559999999999"}'{
"status": 200,
"code": "A1B2-C3D4"
}/{key}/instance— Atualizar configuraçõescurl -X PATCH "https://us.api-wa.me/YOUR_KEY/instance?markMessageRead=true&saveMedia=false&receiveStatusMessage=false&receivePresence=false"{
"status": 200,
"message": "Settings updated"
}/{key}/instance— Logoutcurl -X DELETE "https://us.api-wa.me/YOUR_KEY/instance"{
"status": 200,
"message": "Logged out"
}/{key}/instance/restart— Restartcurl -X POST "https://us.api-wa.me/YOUR_KEY/instance/restart"{
"status": 200,
"message": "Restarted"
}/{key}/instance/resync— Resync completocurl -X POST "https://us.api-wa.me/YOUR_KEY/instance/resync"Perfil
# 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
# 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
# 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
/{key}/instance— Configurar webhookscurl -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": ""
}'/{key}/instance/webhook/statistics— Estatísticascurl "https://us.api-wa.me/YOUR_KEY/instance/webhook/statistics"{
"status": 200,
"data": {
"totalSent": 1250,
"totalFailed": 3,
"totalPending": 0,
"avgResponseTime": 142
}
}Enviar Texto
/{key}/message/textO campo opcional provider (whatsapp padrão, instagram, messenger) seleciona o canal oficial no mesmo endpoint — mesmo corpo, só muda o provider.
curl -X POST "https://us.api-wa.me/YOUR_KEY/message/text" \
-H "Content-Type: application/json" \
-d '{"to": "559999999999", "text": "Hello!", "provider": "whatsapp"}'{
"status": 200,
"data": {
"key": {
"remoteJid": "559999999999@s.whatsapp.net",
"fromMe": true,
"id": "3EB0A0B1C2D3E4F5A6B7C8"
},
"message": {
"extendedTextMessage": {
"text": "Hello!"
}
},
"messageTimestamp": "1718900000",
"status": "PENDING"
}
}Enviar Mídia
/{key}/message/imagecurl -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", "provider": "whatsapp"}'{
"status": 200,
"data": {
"key": {
"remoteJid": "559999999999@s.whatsapp.net",
"fromMe": true,
"id": "3EB0B1C2D3E4F5A6B7C8D9"
},
"message": {
"imageMessage": {
"url": "...",
"caption": "Toronto"
}
},
"messageTimestamp": "1718900000",
"status": "PENDING"
}
}/{key}/message/audiocurl -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", "provider": "whatsapp"}'/{key}/message/videocurl -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", "provider": "whatsapp"}'/{key}/message/documentcurl -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", "provider": "whatsapp"}'/{key}/message/stickercurl -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"}'/{key}/message/video-notecurl -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
# 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
/{key}/message/contact— Contato únicocurl -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"}
}'/{key}/message/contacts— Múltiplos contatoscurl -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
/{key}/message/location— Localização fixacurl -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"}
}'/{key}/message/live-location— Tempo realcurl -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!"}'Link Preview
/{key}/message/linkcurl -X POST "https://us.api-wa.me/YOUR_KEY/message/link" \
-H "Content-Type: application/json" \
-d '{
"to": "559999999999",
"title": "API WhatsApp",
"text": "Check out our API",
"description": "Powerful WhatsApp integration",
"thumbnailUrl": "https://example.com/thumb.jpg",
"sourceUrl": "https://api-wa.me"
}'Reação e Presença
/{key}/message/reactioncurl -X POST "https://us.api-wa.me/YOUR_KEY/message/reaction" \
-H "Content-Type: application/json" \
-d '{"text": "👍", "msgId": "MESSAGE_ID"}'/{key}/message/presencecurl -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, pausedMensagem com Título
/{key}/message/titlecurl -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
/{key}/message/button_reply— Botões de respostacurl -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"}
]
}'/{key}/message/button_action— Botões de ação (URL, Call, Copy)curl -X POST "https://us.api-wa.me/YOUR_KEY/message/button_action" \
-H "Content-Type: application/json" \
-d '{
"to": "559999999999",
"provider": "whatsapp",
"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"}
]
}'Enquete / Poll
/{key}/message/surveycurl -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"]}'/{key}/message/pollcurl -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
/{key}/message/pixcurl -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
/{key}/message/eventcurl -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"
}'/{key}/message/pin— Fixarcurl -X POST "https://us.api-wa.me/YOUR_KEY/message/pin" \
-H "Content-Type: application/json" \
-d '{"id": "MESSAGE_ID", "duration": 604800}'/{key}/message/unpin— Desfixarcurl -X POST "https://us.api-wa.me/YOUR_KEY/message/unpin" \
-H "Content-Type: application/json" \
-d '{"id": "MESSAGE_ID"}'/{key}/message/call-link— Enviar link de chamadacurl -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"}'/{key}/message/create-call-link— Criar link (sem enviar)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
/{key}/message/{messageId}— Detalhescurl "https://us.api-wa.me/YOUR_KEY/message/MESSAGE_ID"{
"status": 200,
"data": {
"key": {
"remoteJid": "559999999999@s.whatsapp.net",
"fromMe": true,
"id": "3EB0A1B2C3"
},
"message": {
"extendedTextMessage": {
"text": "Hello!"
}
},
"messageTimestamp": "1718900000",
"status": "READ"
}
}/{key}/message/{messageId}/media— Download mídia# 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{
"status": 200,
"data": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ..."
}/{key}/message/product— Produto do catálogocurl -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"}'/{key}/message/group-invite— Convite de grupocurl -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"}'/{key}/message/request-phone— Solicitar telefonecurl -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.
# 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}/locationChat
# Listar chats
curl "https://us.api-wa.me/YOUR_KEY/chat"{
"status": 200,
"data": [
{
"id": "559999999999@s.whatsapp.net",
"name": "Raphael",
"timestamp": 1718900000,
"unreadCount": 3
},
{
"id": "120363XXXXX@g.us",
"name": "Developers",
"timestamp": 1718899000,
"unreadCount": 0
}
]
}# Mensagens de um chat (paginado)
curl "https://us.api-wa.me/YOUR_KEY/chat/messages?chatId=559999999999@s.whatsapp.net&page=1&limit=20"{
"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
}# 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
# 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
# Fazer chamada
curl -X POST "https://us.api-wa.me/YOUR_KEY/call" \
-H "Content-Type: application/json" \
-d '{"to": "559999999999"}'{
"status": 200,
"data": {
"callId": "A1B2C3D4E5F6",
"peerJid": "559999999999@s.whatsapp.net"
}
}# 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
# Listar etiquetas
curl "https://us.api-wa.me/YOUR_KEY/labels"{
"status": 200,
"data": [
{
"id": "1",
"name": "New Customer",
"color": 1
},
{
"id": "2",
"name": "VIP",
"color": 2
},
{
"id": "3",
"name": "Pending Payment",
"color": 3
}
]
}# 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
# Verificar número registrado
curl "https://us.api-wa.me/YOUR_KEY/actions/registered?number=559999999999"{
"status": 200,
"registered": true
}# Deletar storage
curl -X DELETE "https://us.api-wa.me/YOUR_KEY/actions/storage"{
"status": 200,
"message": "Storage deleted"
}Contatos
# Listar contatos
curl "https://us.api-wa.me/YOUR_KEY/contacts"{
"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"
}
]
}# Perfil do contato
curl "https://us.api-wa.me/YOUR_KEY/contacts/559999999999"{
"status": 200,
"data": {
"id": "559999999999@s.whatsapp.net",
"name": "Raphael",
"notify": "Raphael S.",
"imgUrl": "https://pps.whatsapp.net/..."
}
}# 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
# Listar grupos
curl "https://us.api-wa.me/YOUR_KEY/groups"{
"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
}
]
}
]
}# Detalhes do grupo
curl "https://us.api-wa.me/YOUR_KEY/groups/123456789@g.us"{
"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
}
]
}
}# 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
# 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
# Código de convite
curl "https://us.api-wa.me/YOUR_KEY/groups/123456789@g.us/invite"{
"status": 200,
"inviteCode": "AbCdEfGhIjKl"
}# 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
# Listar comunidades
curl "https://us.api-wa.me/YOUR_KEY/community"{
"status": 200,
"data": [
{
"id": "120363XXXXX@g.us",
"name": "My Community",
"subject": "Tech",
"description": "Technology community",
"participants": [
{
"id": "559999999999@s.whatsapp.net",
"admin": "superadmin"
}
]
}
]
}# 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
# 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
# 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
# Listar catálogo
curl "https://us.api-wa.me/YOUR_KEY/business/catalog?limit=10"{
"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"
}# 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"Status / Stories
# 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