SendMenuRequest

Estrutura de dados do contrato OpenAPI.

Estrutura de dados do contrato OpenAPI.

Campos

CampoTipoPresençaDescrição
numberstringobrigatórioDígitos com DDI (8–15) ou identificador @s.whatsapp.net, @g.us ou @lid. Nunca inferir telefone de um LID. Comprimento mínimo: 1
replyidstringopcionalID de mensagem guardada para citação; desconhecida retorna 422 reply_not_found.
delayinteger / stringopcionalEspera de digitação em milissegundos; o manager limita a 15000 ms.
forwardboolean / string / integer / nullopcional
typestringobrigatórioValores: "button", "buttons", "list", "poll"
textstringobrigatórioAté 4096 bytes. Comprimento mínimo: 1. Comprimento máximo: 4096
choicesarray<string>obrigatórioMínimo de itens: 1
footerTextstringopcional
listButtonstringopcional
selectableCountinteger / stringopcionalSó em type=poll; padrão 1.
renderModestringopcionalValores: "auto", "native", "poll", "text". Padrão: "auto"

Definição OpenAPI

json
{
  "type": "object",
  "properties": {
    "number": {
      "type": "string",
      "description": "Dígitos com DDI (8–15) ou identificador @s.whatsapp.net, @g.us ou @lid. Nunca inferir telefone de um LID.",
      "minLength": 1
    },
    "replyid": {
      "type": "string",
      "description": "ID de mensagem guardada para citação; desconhecida retorna 422 reply_not_found."
    },
    "delay": {
      "oneOf": [
        {
          "type": "integer",
          "minimum": 0
        },
        {
          "type": "string",
          "description": "Inteiro em formato decimal.",
          "pattern": "^\\d+$"
        }
      ],
      "description": "Espera de digitação em milissegundos; o manager limita a 15000 ms."
    },
    "forward": {
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string",
          "enum": [
            "true",
            "false",
            "1",
            "0",
            ""
          ]
        },
        {
          "type": "integer",
          "enum": [
            0,
            1
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "type": {
      "type": "string",
      "enum": [
        "button",
        "buttons",
        "list",
        "poll"
      ]
    },
    "text": {
      "type": "string",
      "description": "Até 4096 bytes.",
      "minLength": 1,
      "maxLength": 4096
    },
    "choices": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "label|id|descrição, label\nid ou label; [Seção] nas listas; url:/copy: em botões. call: não suportado."
      },
      "minItems": 1
    },
    "footerText": {
      "type": "string"
    },
    "listButton": {
      "type": "string"
    },
    "selectableCount": {
      "oneOf": [
        {
          "type": "integer",
          "minimum": 0
        },
        {
          "type": "string",
          "description": "Inteiro em formato decimal.",
          "pattern": "^\\d+$"
        }
      ],
      "description": "Só em type=poll; padrão 1."
    },
    "renderMode": {
      "type": "string",
      "enum": [
        "auto",
        "native",
        "poll",
        "text"
      ],
      "default": "auto"
    }
  },
  "required": [
    "number",
    "type",
    "text",
    "choices"
  ]
}