Whatsapp Webhook

Endpoint para tratar mensagens recebidas pelo webhook do Whatsapp.

Receber mensagens do webhook do Whatsapp

post
/whatsapp/webhook
Autorizações
AuthorizationstringObrigatório
Corpo
messaging_productstringOpcional
Respostas
200

OK

Sem conteúdo

post
/whatsapp/webhook
POST /componentes/v10/whatsapp/webhook HTTP/1.1
Host: localhost
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 1029

{
  "messaging_product": "text",
  "metadata": {
    "display_phone_number": "text",
    "phone_number_id": "text"
  },
  "contacts": [
    {
      "profile": {
        "name": "text"
      },
      "wa_id": "text"
    }
  ],
  "messages": [
    {
      "from": "text",
      "id": "text",
      "timestamp": "text",
      "text": {
        "body": "text"
      },
      "interactive": {
        "list_reply": {
          "id": "text",
          "title": "text",
          "description": "text"
        },
        "button_reply": {
          "id": "text",
          "title": "text"
        },
        "type": "text"
      },
      "reaction": {
        "message_id": "text",
        "emoji": "text"
      },
      "location": {
        "latitude": 1,
        "longitude": 1,
        "name": "text",
        "address": "text"
      },
      "contacts": [
        {
          "addresses": [
            {
              "city": "text",
              "country": "text",
              "country_code": "text",
              "state": "text",
              "street": "text",
              "zip": "text",
              "type": "text"
            }
          ],
          "birthday": "text",
          "emails": [
            {
              "email": "text",
              "type": "text"
            }
          ],
          "name": {
            "formatted_name": "text",
            "first_name": "text",
            "last_name": "text",
            "middle_name": "text",
            "suffix": "text",
            "prefix": "text"
          },
          "org": {
            "company": "text",
            "department": "text",
            "title": "text"
          },
          "phones": [
            {
              "phone": "text",
              "wa_id": "text",
              "type": "text"
            }
          ],
          "urls": [
            {
              "url": "text",
              "type": "text"
            }
          ]
        }
      ],
      "button": {
        "text": "text",
        "payload": "text"
      },
      "type": "text"
    }
  ]
}

Sem conteúdo

Atualizado