Skip to main content
POST
/
api
/
sendButtons
Enviar botões (mensagem interativa) (Send buttons (interactive message))
curl --request POST \
  --url https://{host}/api/sendButtons \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '
{
  "chatId": "5511999999999@c.us",
  "header": "How are you?",
  "body": "Tell us how are you please 🙏",
  "footer": "If you have any questions, please send it in the chat",
  "buttons": [
    {
      "type": "reply",
      "text": "I am good!"
    },
    {
      "type": "call",
      "text": "Call us",
      "phoneNumber": "+1234567890"
    },
    {
      "type": "copy",
      "text": "Copy code",
      "copyCode": "4321"
    },
    {
      "type": "url",
      "text": "How did you do that?",
      "url": "https://wappfy.com.br"
    }
  ],
  "session": "my-session",
  "headerImage": {
    "mimetype": "image/jpeg",
    "url": "https://github.com/stgcompany/wappfy/raw/core/examples/wappfy.jpg",
    "filename": "filename.jpg"
  }
}
'
{
  "success": true,
  "messageId": "3EB0XXXXXX"
}

Documentation Index

Fetch the complete documentation index at: https://docs.wappfy.com.br/llms.txt

Use this file to discover all available pages before exploring further.

Descrição

Este endpoint permite enviar mensagens interativas com botões organizados em listas para contatos individuais ou grupos no WhatsApp. As listas podem conter múltiplas seções com várias opções cada.

Body

{
  "sessionId": "my-session",
  "jid": "5511999999999@s.whatsapp.net",
  "list": {
    "title": "Menu de Opções",
    "description": "Selecione uma das opções abaixo",
    "button": "Ver Opções",
    "sections": [
      {
        "title": "Produtos",
        "rows": [
          {
            "title": "Plano Basic",
            "description": "R$ 29,90/mês",
            "rowId": "plan_basic"
          }
        ]
      }
    ]
  }
}

Parâmetros do Body

PropriedadeTipoObrigatórioDescrição
sessionIdstring✅ SimID da sessão autenticada que enviará a mensagem
jidstring✅ SimIdentificador do destinatário (JID do WhatsApp). Formato: 5511999999999@s.whatsapp.net para contatos ou 120363XXXXX@g.us para grupos
listobject✅ SimObjeto contendo as informações da lista de botões
list.titlestring✅ SimTítulo da mensagem
list.descriptionstring❌ NãoDescrição ou corpo da mensagem
list.buttonstring✅ SimTexto do botão que abre a lista (exemplo: “Ver opções”)
list.sectionsarray✅ SimArray de seções da lista
list.sections[].titlestring✅ SimTítulo da seção
list.sections[].rowsarray✅ SimArray de linhas (opções) da seção
list.sections[].rows[].titlestring✅ SimTítulo da opção
list.sections[].rows[].descriptionstring❌ NãoDescrição da opção
list.sections[].rows[].rowIdstring✅ SimID único da opção (usado para identificar a resposta)
{
  "success": true,
  "messageId": "3EB0XXXXXX"
}

Códigos de Status

  • 200 - Mensagem com botões enviada com sucesso
  • 400 - Parâmetros inválidos
  • 401 - Sessão não autorizada
  • 404 - Sessão não encontrada

Exemplo de Uso

curl -X POST https://api.wappfy.com.br/api/sendButtons \
  -H "Content-Type: application/json" \
  -d '{
    "sessionId": "my-session",
    "jid": "5511999999999@s.whatsapp.net",
    "list": {
      "title": "Menu de Opções",
      "description": "Selecione uma das opções abaixo:",
      "button": "Ver Menu",
      "sections": [
        {
          "title": "Produtos",
          "rows": [
            {
              "title": "Plano Basic",
              "description": "R$ 29,90/mês",
              "rowId": "plan_basic"
            },
            {
              "title": "Plano Pro",
              "description": "R$ 59,90/mês",
              "rowId": "plan_pro"
            }
          ]
        },
        {
          "title": "Suporte",
          "rows": [
            {
              "title": "Falar com atendente",
              "rowId": "support_human"
            }
          ]
        }
      ]
    }
  }'

Authorizations

apikey
string
header
required

Sua chave de API do Wappfy (obtenha em dash.wappfy.com.br)

Body

application/json
chatId
string
required
Example:

"5511999999999@c.us"

header
string
required
Example:

"How are you?"

body
string
required
Example:

"Tell us how are you please 🙏"

Example:

"If you have any questions, please send it in the chat"

buttons
object[]
required
Example:
[
{ "type": "reply", "text": "I am good!" },
{
"type": "call",
"text": "Call us",
"phoneNumber": "+1234567890"
},
{
"type": "copy",
"text": "Copy code",
"copyCode": "4321"
},
{
"type": "url",
"text": "How did you do that?",
"url": "https://wappfy.com.br"
}
]
session
string
required

Nome da sessão (instanceName)

Example:

"my-session"

headerImage
object

Response

201 - undefined