Envio de mensagens.

INTRODUÇÃO

Use este endpoint para realizar o disparo de mensagens.

Para mais informações relacionadas ao disparo de mensagens, saiba mais em Meta

ENVIAR MENSAGENS

Sintaxe da solicitação

POST api/Messages

Corpo da solicitação

Detalhado nos exemplos de solicitação abaixo.

Resposta

Sintaxe

{
  "messaging_product": "whatsapp",
  "contacts": [
    {
      "input": "<INPUT>",
      "wa_id": "<WA_ID>"
    }
  ],
  "messages": [
    {
      "id": "<ID>"
    }
  ]
}

Propriedades

Espaço reservadoDescriçãoValor de exemplo
<INPUT>O número de telefone do cliente para quem a mensagem foi enviada. Talvez esse valor não corresponda a wa_id.5511999999999
<WA_ID>O ID do cliente para quem a mensagem foi enviada. Talvez esse valor não corresponda a input.5511999999999
<ID>O ID da mensagem do WhatsApp. Use o ID listado depois de "wamid." para acompanhar o status da mensagem.wamid.HBgLMTY1MDM4Nzk0MzkVAgARGBI3N0EyQUJDMjFEQzZCQUMzODMA

Enviar mensagens de texto

Exemplo de solicitação

curl --request POST \
--url https://api-cerberus-kong.socialminer.tech/api/Messages \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKEY}' \
--header 'version: 6.0' \
--data '{
    "text": {
        "body": "Olá, tudo bem?!"
    },
    "messaging_product": "whatsapp",
    "to": "5511999999999",
    "type": "text",
    "recipient_type": "individual"
}'

Enviar mensagem interativa com botões

Exemplo de solicitação

curl --request POST \
--url https://api-cerberus-kong.socialminer.tech/api/Messages \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKEY}' \
--header 'version: 6.0' \
--data '{
        "interactive": {
            "type": "button",
            "body": {
                "text": "Olá, o que você gostaria de fazer?"
            },
            "footer": null,
            "action": {
                "buttons": [
                    {
                        "type": "reply",
                        "reply": {
                            "id": "#SUBSCRIBE.",
                            "title": "Cadastrar"
                        }
                    },
                    {
                        "type": "reply",
                        "reply": {
                            "id": "#UNSUBSCRIBE",
                            "title": "Descadastrar"
                        }
                    }
                ]
            }
    },
    "messaging_product": "whatsapp",
    "to": "5511999999999",
    "type": "interactive",
    "recipient_type": "individual"
}'

Enviar mensagem interativa com seções

Exemplo de solicitação

curl --request POST \
--url https://api-cerberus-kong.socialminer.tech/api/Messages \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKEY}' \
--header 'version: 6.0' \
--data '{
    "messaging_product": "whatsapp",
    "to": "5511999999999",
    "type": "interactive",
    "recipient_type": "individual",
    "interactive": {
        "type": "list",
        "header": {
            "type": "text",
            "text": "HEADER_TEXT"
        },
        "body": {
            "text": "BODY_TEXT"
        },
        "footer": {
            "text": "FOOTER_TEXT"
        },
        "action": {
            "button": "BUTTON_TEXT",
            "sections": [
                {
                    "title": "SECTION_1_TITLE",
                    "rows": [
                        {
                            "id": "SECTION_1_ROW_1_ID",
                            "title": "SECTION_1_ROW_1_TITLE",
                            "description": "SECTION_1_ROW_1_DESCRIPTION"
                        },
                        {
                            "id": "SECTION_1_ROW_2_ID",
                            "title": "SECTION_1_ROW_2_TITLE",
                            "description": "SECTION_1_ROW_2_DESCRIPTION"
                        }
                    ]
                },
                {
                    "title": "SECTION_2_TITLE",
                    "rows": [
                        {
                            "id": "SECTION_2_ROW_1_ID",
                            "title": "SECTION_2_ROW_1_TITLE",
                            "description": "SECTION_2_ROW_1_DESCRIPTION"
                        },
                        {
                            "id": "SECTION_2_ROW_2_ID",
                            "title": "SECTION_2_ROW_2_TITLE",
                            "description": "SECTION_2_ROW_2_DESCRIPTION"
                        }
                    ]
                }
            ]
        }
    }
}'

Enviar mensagem de contatos

Exemplo de solicitação

curl --request POST \
--url https://api-cerberus-kong.socialminer.tech/api/Messages \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKEY}' \
--header 'version: 6.0' \
--data '{
    "messaging_product": "whatsapp",
    "to": "5511999999999",
    "type": "contacts",
    "recipient_type": "individual",
    "contacts": [
        {
            "addresses": [
                {
                    "street": "STREET",
                    "city": "CITY",
                    "state": "STATE",
                    "zip": "ZIP",
                    "country": "COUNTRY",
                    "country_code": "COUNTRY_CODE",
                    "type": "HOME"
                },
                {
                    "street": "STREET",
                    "city": "CITY",
                    "state": "STATE",
                    "zip": "ZIP",
                    "country": "COUNTRY",
                    "country_code": "COUNTRY_CODE",
                    "type": "WORK"
                }
            ],
            "birthday": "1985-02-25",
            "emails": [
                {
                    "email": "EMAIL",
                    "type": "WORK"
                },
                {
                    "email": "EMAIL",
                    "type": "HOME"
                }
            ],
            "name": {
                "formatted_name": "NAME",
                "first_name": "FIRST_NAME",
                "last_name": "LAST_NAME",
                "middle_name": "MIDDLE_NAME",
                "suffix": "SUFFIX",
                "prefix": "PREFIX"
            },
            "org": {
                "company": "COMPANY",
                "department": "DEPARTMENT",
                "title": "TITLE"
            },
            "phones": [
                {
                    "phone": "PHONE_NUMBER",
                    "type": "HOME"
                },
                {
                    "phone": "PHONE_NUMBER",
                    "type": "WORK",
                    "wa_id": "PHONE_OR_WA_ID"
                }
            ],
            "urls": [
                {
                    "url": "URL",
                    "type": "WORK"
                },
                {
                    "url": "URL",
                    "type": "HOME"
                }
            ]
        }
    ]
}'

Enviar mensagem de localização

Exemplo de solicitação

curl --request POST \
--url https://api-cerberus-kong.socialminer.tech/api/Messages \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKEY}' \
--header 'version: 6.0' \
--data '{
    "messaging_product": "whatsapp",
    "to": "5511999999999",
    "type": "location",
    "recipient_type": "individual",
    "location": {
        "latitude": -23.641352698712492,
        "longitude": -46.72879151326942,
        "name": "Wake",
        "address": "R. Itapaiúna, 2434 - Parque do Morumbi, São Paulo - SP, 05707-001"
    }
}'

Enviar mensagem de imagem

Exemplo de solicitação

Exemplo de envio com ID

curl --request POST \
--url https://api-cerberus-kong.socialminer.tech/api/Messages \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKEY}' \
--header 'version: 6.0' \
--data '{
    "messaging_product": "whatsapp",
    "to": "5511999999999",
    "type": "image",
    "recipient_type": "individual",
    "image": {
        "id": "515056594160172"
    }
}'

Exemplo de envio com link

curl --request POST \
--url https://api-cerberus-kong.socialminer.tech/api/Messages \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKEY}' \
--header 'version: 6.0' \
--data '{
    "messaging_product": "whatsapp",
    "to": "5511999999999",
    "type": "image",
    "recipient_type": "individual",
    "image": {
    "link" : "https://wake.tech/wp-content/uploads/2023/07/Wake-Experience-Logo-300x135.png"
    }
}'

Enviar mensagem de audio

Exemplo de solicitação

Exemplo de envio com ID

curl --request POST \
--url https://api-cerberus-kong.socialminer.tech/api/Messages \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKEY}' \
--header 'version: 6.0' \
--data '{
    "messaging_product": "whatsapp",
    "to": "5511999999999",
    "type": "audio",
    "recipient_type": "individual",
    "audio": {
        "id" : "894058205630562"
    }
}'

Exemplo de envio com link

curl --request POST \
--url https://api-cerberus-kong.socialminer.tech/api/Messages \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKEY}' \
--header 'version: 6.0' \
--data '{
    "messaging_product": "whatsapp",
    "to": "5511999999999",
    "type": "audio",
    "recipient_type": "individual",
    "audio": {
        "link": "https://www.zapsplat.com/wp-content/uploads/2015/sound-effects-100509/zapsplat_multimedia_prompt_orchestral_short_software_complete_finish_107279.mp3"
    }
}'

Enviar mensagem de video

Exemplo de solicitação

Exemplo de envio com link

curl --request POST \
--url https://api-cerberus-kong.socialminer.tech/api/Messages \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKEY}' \
--header 'version: 6.0' \
--data '{
    "messaging_product": "whatsapp",
    "to": "5511999999999",
    "type": "video",
    "recipient_type": "individual",
    "video": {
        "id": "515056594160172"
    }
}'

Exemplo de envio com link

curl --request POST \
--url https://api-cerberus-kong.socialminer.tech/api/Messages \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKEY}' \
--header 'version: 6.0' \
--data '{
    "messaging_product": "whatsapp",
    "to": "5511999999999",
    "type": "video",
    "recipient_type": "individual",
    "video": {
        "link": "https://www.pexels.com/download/video/15462305/?fps=30.0&h=240&w=426"
    }
}'

Enviar mensagem de documento

Exemplo de solicitação

Exemplo de envio com ID

curl --request POST \
--url https://api-cerberus-kong.socialminer.tech/api/Messages \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKEY}' \
--header 'version: 6.0' \
--data '{
    "messaging_product": "whatsapp",
    "to": "5511999999999",
    "type": "document",
    "recipient_type": "individual",
    "document": {
        "caption": "Documento de Exemplo!",
        "id": "314879241369976",
        "filename": "Documento.pdf"
    }
}'

Exemplo de envio com link

curl --request POST \
--url https://api-cerberus-kong.socialminer.tech/api/Messages \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKEY}' \
--header 'version: 6.0' \
--data '{
    "messaging_product": "whatsapp",
    "to": "5511999999999",
    "type": "document",
    "recipient_type": "individual",
    "document": {
        "caption": "Documento de Exemplo!",
        "link": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
        "filename": "Documento.pdf"
    }
}'

Enviar mensagem de sticker

Exemplo de solicitação

Exemplo de envio com ID

curl --request POST \
--url https://api-cerberus-kong.socialminer.tech/api/Messages \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKEY}' \
--header 'version: 6.0' \
--data '{
    "messaging_product": "whatsapp",
    "to": "5511999999999",
    "type": "sticker",
    "recipient_type": "individual",
    "sticker": {
        "id" : "194259150349328"
    }
}'

Exemplo de envio com link

curl --request POST \
--url https://api-cerberus-kong.socialminer.tech/api/Messages \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKEY}' \
--header 'version: 6.0' \
--data '{
    "messaging_product": "whatsapp",
    "to": "5511999999999",
    "type": "sticker",
    "recipient_type": "individual",
    "sticker": {
        "link" : "https://www.example.com/image.webp"
    }
}'

Reagir à mensagens

Exemplo de solicitação

curl --request POST \
--url https://api-cerberus-kong.socialminer.tech/api/Messages \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKEY}' \
--header 'version: 6.0' \
--data '{
    "messaging_product": "whatsapp",
    "to": "5511999999999",
    "type": "reaction",
    "recipient_type": "individual",
    "reaction": {
        "message_id": "wamid.wM...",
        "emoji": "\uD83D\uDE00"
    }
}'

Marcar mensagem como lida

Exemplo de solicitação

curl --request POST \
--url https://api-cerberus-kong.socialminer.tech/api/Messages \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKEY}' \
--header 'version: 6.0' \
--data '{
    "messaging_product": "whatsapp",
    "status": "read",
    "message_id": "wamid.wM..."
}'

Enviar modelos

Saiba mais na documentação da Meta.

Modelo de componentes

Exemplo de solicitação

curl --request POST \
--url https://api-cerberus-kong.socialminer.tech/api/Messages \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKEY}' \
--header 'version: 6.0' \
--data '{
    "template": {
        "name": "beta_abandoncart_link_v1_3",
        "language": {
            "policy": "deterministic",
            "code": "pt_BR"
        },
        "components": [
            {
                "type": "body",
                "parameters": [
                    {
                        "type": "text",
                        "text": " Maria"
                    }
                ]
            },
            {
                "type": "button",
                "sub_type": "url",
                "index": "0",
                "parameters": [
                    {
                        "type": "text",
                        "text": "999"
                    }
                ]
            }
        ]
    },
    "messaging_product": "whatsapp",
    "to": "5511999999999",
    "type": "template",
    "recipient_type": "individual"
}'

Modelos de autenticação

Saiba mais na documentação da Meta.

Preenchimento automático com um toque

Exemplo de solicitação
curl --request POST \
--url https://api-cerberus-kong.socialminer.tech/api/Messages \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKEY}' \
--header 'version: 6.0' \
--data '{
    "messaging_product": "whatsapp",
    "recipient_type": "individual",
    "to": "5511999999999",
    "type": "template",
    "template": {
        "name": "beta_onetap_authentication_v1_0",
        "language": {
            "code": "pt_BR"
        },
        "components": [
            {
                "type": "body",
                "parameters": [
                    {
                        "type": "text",
                        "text": "CODE100"
                    }
                ]
            },
            {
                "type": "button",
                "sub_type": "url",
                "index": "0",
                "parameters": [
                    {
                        "type": "text",
                        "text": "CODE100"
                    }
                ]
            }
        ]
    }
}'

Zero-Tap

Exemplo de solicitação
curl --request POST \
--url https://api-cerberus-kong.socialminer.tech/api/Messages \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKEY}' \
--header 'version: 6.0' \
--data '{
    "messaging_product": "whatsapp",
    "recipient_type": "individual",
    "to": "5511999999999",
    "type": "template",
    "template": {
        "name": "beta_zerotap_authentication_v1_0",
        "language": {
            "code": "pt_BR"
        },
        "components": [
            {
                "type": "body",
                "parameters": [
                    {
                        "type": "text",
                        "text": "CODE100"
                    }
                ]
            },
            {
                "type": "button",
                "sub_type": "url",
                "index": "0",
                "parameters": [
                    {
                        "type": "text",
                        "text": "CODE100"
                    }
                ]
            }
        ]
    }
}'

Copy Code

Exemplo de solicitação
curl --request POST \
--url https://api-cerberus-kong.socialminer.tech/api/Messages \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKEY}' \
--header 'version: 6.0' \
--data '{
    "messaging_product": "whatsapp",
    "recipient_type": "individual",
    "to": "5511999999999",
    "type": "template",
    "template": {
        "name": "beta_zerotap_authentication_v1_0",
        "language": {
            "code": "pt_BR"
        },
        "components": [
            {
                "type": "body",
                "parameters": [
                    {
                        "type": "text",
                        "text": "CODE100"
                    }
                ]
            },
            {
                "type": "button",
                "sub_type": "url",
                "index": "0",
                "parameters": [
                    {
                        "type": "text",
                        "text": "CODE100"
                    }
                ]
            }
        ]
    }
}'

Modelos de catálogo

Saiba mais na documentação da Meta.

Exemplo de solicitação

curl --request POST \
--url https://api-cerberus-kong.socialminer.tech/api/Messages \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKEY}' \
--header 'version: 6.0' \
--data '{
    "messaging_product": "whatsapp",
    "recipient_type": "individual",
    "to": "5511999999999",
    "type": "template",
    "template": {
        "name": "beta_test_catalog_v1_0",
        "language": {
            "code": "pt_BR"
        },
        "components": [
            {
                "type": "body",
                "parameters": [
                    {
                        "type": "text",
                        "text": "20%"
                    },
                    {
                        "type": "text",
                        "text": "100"
                    }
                ]
            },
            {
                "type": "button",
                "sub_type": "CATALOG",
                "index": 0,
                "parameters": [
                    {
                        "type": "action",
                        "action": {
                            "thumbnail_product_retailer_id": "2lc20305pt"
                        }
                    }
                ]
            }
        ]
    }
}'

Modelos carrossel

Saiba mais na documentação da Meta.

Exemplo de solicitação

Exemplo de envio com ID
curl --request POST \
--url https://api-cerberus-kong.socialminer.tech/api/Messages \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKEY}' \
--header 'version: 6.0' \
--data '{
    "messaging_product": "whatsapp",
    "recipient_type": "individual",
    "to": "{{to_phone_number_lucas}}",
    "type": "template",
    "template": {
        "name": "beta_test_carousel_v1_0",
        "language": {
            "code": "pt_BR"
        },
        "components": [
            {
                "type": "BODY",
                "parameters": [
                    {
                        "type": "TEXT",
                        "text": "20OFF"
                    },
                    {
                        "type": "TEXT",
                        "text": "20%"
                    }
                ]
            },
            {
                "type": "CAROUSEL",
                "cards": [
                    {
                        "card_index": 0,
                        "components": [
                            {
                                "type": "HEADER",
                                "parameters": [
                                    {
                                        "type": "IMAGE",
                                        "image": {
                                            "id": "200361203129965"
                                        }
                                    }
                                ]
                            },
                            {
                                "type": "BODY",
                                "parameters": [
                                    {
                                        "type": "TEXT",
                                        "text": "10OFF"
                                    },
                                    {
                                        "type": "TEXT",
                                        "text": "10%"
                                    }
                                ]
                            },
                            {
                                "type": "BUTTON",
                                "sub_type": "QUICK_REPLY",
                                "index": "0",
                                "parameters": [
                                    {
                                        "type": "PAYLOAD",
                                        "payload": "CODE10"
                                    }
                                ]
                            },
                            {
                                "type": "button",
                                "sub_type": "URL",
                                "index": "1",
                                "parameters": [
                                    {
                                        "type": "payload",
                                        "payload": "last_chance_2023"
                                    }
                                ]
                            }
                        ]
                    },
                    {
                        "card_index": 1,
                        "components": [
                            {
                                "type": "HEADER",
                                "parameters": [
                                    {
                                        "type": "IMAGE",
                                        "image": {
                                            "id": "200361203129965"
                                        }
                                    }
                                ]
                            },
                            {
                                "type": "BODY",
                                "parameters": [
                                    {
                                        "type": "TEXT",
                                        "text": "20OFF"
                                    },
                                    {
                                        "type": "TEXT",
                                        "text": "20%"
                                    }
                                ]
                            },
                            {
                                "type": "BUTTON",
                                "sub_type": "QUICK_REPLY",
                                "index": "0",
                                "parameters": [
                                    {
                                        "type": "PAYLOAD",
                                        "payload": "CODE20"
                                    }
                                ]
                            },
                            {
                                "type": "BUTTON",
                                "sub_type": "URL",
                                "index": "1",
                                "parameters": [
                                    {
                                        "type": "payload",
                                        "payload": "summer_blues_2023"
                                    }
                                ]
                            }
                        ]
                    }
                ]
            }
        ]
    }
}'
Exemplo de envio com link
curl --request POST \
--url https://api-cerberus-kong.socialminer.tech/api/Messages \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKEY}' \
--header 'version: 6.0' \
--data '{
    "messaging_product": "whatsapp",
    "recipient_type": "individual",
    "to": "{{to_phone_number_lucas}}",
    "type": "template",
    "template": {
        "name": "beta_test_carousel_v1_0",
        "language": {
            "code": "pt_BR"
        },
        "components": [
            {
                "type": "BODY",
                "parameters": [
                    {
                        "type": "TEXT",
                        "text": "20OFF"
                    },
                    {
                        "type": "TEXT",
                        "text": "20%"
                    }
                ]
            },
            {
                "type": "CAROUSEL",
                "cards": [
                    {
                        "card_index": 0,
                        "components": [
                            {
                                "type": "HEADER",
                                "parameters": [
                                    {
                                        "type": "IMAGE",
                                        "image": {
                                            "link": "https://wake.tech/wp-content/uploads/2023/07/Wake-Experience-Logo-300x135.png"
                                        }
                                    }
                                ]
                            },
                            {
                                "type": "BODY",
                                "parameters": [
                                    {
                                        "type": "TEXT",
                                        "text": "10OFF"
                                    },
                                    {
                                        "type": "TEXT",
                                        "text": "10%"
                                    }
                                ]
                            },
                            {
                                "type": "BUTTON",
                                "sub_type": "QUICK_REPLY",
                                "index": "0",
                                "parameters": [
                                    {
                                        "type": "PAYLOAD",
                                        "payload": "CODE10"
                                    }
                                ]
                            },
                            {
                                "type": "button",
                                "sub_type": "URL",
                                "index": "1",
                                "parameters": [
                                    {
                                        "type": "payload",
                                        "payload": "last_chance_2023"
                                    }
                                ]
                            }
                        ]
                    },
                    {
                        "card_index": 1,
                        "components": [
                            {
                                "type": "HEADER",
                                "parameters": [
                                    {
                                        "type": "IMAGE",
                                        "image": {
                                            "link": "https://wake.tech/wp-content/uploads/2023/07/Wake-Experience-Logo-300x135.png"
                                        }
                                    }
                                ]
                            },
                            {
                                "type": "BODY",
                                "parameters": [
                                    {
                                        "type": "TEXT",
                                        "text": "20OFF"
                                    },
                                    {
                                        "type": "TEXT",
                                        "text": "20%"
                                    }
                                ]
                            },
                            {
                                "type": "BUTTON",
                                "sub_type": "QUICK_REPLY",
                                "index": "0",
                                "parameters": [
                                    {
                                        "type": "PAYLOAD",
                                        "payload": "CODE20"
                                    }
                                ]
                            },
                            {
                                "type": "BUTTON",
                                "sub_type": "URL",
                                "index": "1",
                                "parameters": [
                                    {
                                        "type": "payload",
                                        "payload": "summer_blues_2023"
                                    }
                                ]
                            }
                        ]
                    }
                ]
            }
        ]
    }
}'

Modelos de cupom

Saiba mais na documentação da Meta.

Exemplo de solicitação

curl --request POST \
--url https://api-cerberus-kong.socialminer.tech/api/Messages \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKEY}' \
--header 'version: 6.0' \
--data '{
    "messaging_product": "whatsapp",
    "to": "5511999999999",
    "type": "template",
    "template": {
        "name": "beta_test_coupon_v1_0",
        "language": {
            "code": "pt_BR"
        },
        "components": [
            {
                "type": "body",
                "parameters": [
                    {
                        "type": "text",
                        "text": "25OFF"
                    },
                    {
                        "type": "text",
                        "text": "25%"
                    }
                ]
            },
            {
                "type": "button",
                "sub_type": "COPY_CODE",
                "index": 1,
                "parameters": [
                    {
                        "type": "coupon_code",
                        "coupon_code": "25OFF"
                    }
                ]
            }
        ]
    }
}'

Modelos de oferta por tempo limitado (Limited-Time Offer, ou LTO)

Saiba mais na documentação da Meta.

Exemplo de solicitação

curl --request POST \
--url https://api-cerberus-kong.socialminer.tech/api/Messages \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKEY}' \
--header 'version: 6.0' \
--data '{
    "messaging_product": "whatsapp",
    "recipient_type": "individual",
    "to": "5511999999999",
    "type": "template",
    "template": {
        "name": "beta_teste_limitedtimeoffer_v1_0",
        "language": {
            "code": "pt_BR"
        },
        "components": [
            {
                "type": "header",
                "parameters": [
                    {
                        "type": "image",
                        "image": {
                            "link": "https://wake.tech/wp-content/uploads/2023/07/Wake-Experience-Logo-300x135.png"
                        }
                    }
                ]
            },
            {
                "type": "body",
                "parameters": [
                    {
                        "type": "text",
                        "text": "Pablo"
                    },
                    {
                        "type": "text",
                        "text": "CARIBE25"
                    }
                ]
            },
            {
                "type": "limited_time_offer",
                "parameters": [
                    {
                        "type": "limited_time_offer",
                        "limited_time_offer": {
                            "expiration_time_ms": 1700772000000
                        }
                    }
                ]
            },
            {
                "type": "button",
                "sub_type": "copy_code",
                "index": 0,
                "parameters": [
                    {
                        "type": "coupon_code",
                        "coupon_code": "CARIBE25"
                    }
                ]
            },
            {
                "type": "button",
                "sub_type": "url",
                "index": 1,
                "parameters": [
                    {
                        "type": "text",
                        "text": "n3mtql"
                    }
                ]
            }
        ]
    }
}'

Modelos Multi-Product Message (MPM)

Saiba mais na documentação da Meta.

Exemplo de solicitação

curl --request POST \
--url https://api-cerberus-kong.socialminer.tech/api/Messages \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKEY}' \
--header 'version: 6.0' \
--data '{
    "messaging_product": "whatsapp",
    "recipient_type": "individual",
    "to": "{{to_phone_number_lucas}}",
    "type": "template",
    "template": {
        "name": "beta_test_mpm_v1_0",
        "language": {
            "code": "pt_BR"
        },
        "components": [
            {
                "type": "header",
                "parameters": [
                    {
                        "type": "text",
                        "text": "Pablo"
                    }
                ]
            },
            {
                "type": "body",
                "parameters": [
                    {
                        "type": "text",
                        "text": "10OFF"
                    }
                ]
            },
            {
                "type": "button",
                "sub_type": "mpm",
                "index": 0,
                "parameters": [
                    {
                        "type": "action",
                        "action": {
                            "thumbnail_product_retailer_id": "2lc20305pt",
                            "sections": [
                                {
                                    "title": "Popular Bundles",
                                    "product_items": [
                                        {
                                            "product_retailer_id": "2lc20305pt"
                                        },
                                        {
                                            "product_retailer_id": "nseiw1x3ch"
                                        }
                                    ]
                                },
                                {
                                    "title": "Premium Packages",
                                    "product_items": [
                                        {
                                            "product_retailer_id": "n6k6x0y7oe"
                                        }
                                    ]
                                }
                            ]
                        }
                    }
                ]
            }
        ]
    }
}'

Modelos de Flow

Saiba mais na documentação da Meta.

Exemplo de solicitação para mensagem interativa

curl --request POST \
--url https://api-cerberus-kong.socialminer.tech/api/Messages \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKEY}' \
--header 'version: 6.0' \
--data '{
    "recipient_type": "individual",
    "messaging_product": "whatsapp",
    "to": "5511999999999",
    "type": "interactive",
    "interactive": {
        "type": "flow",
        "header": {
            "type": "text",
            "text": "Flow message header"
        },
        "body": {
            "text": "Flow message body"
        },
        "footer": {
            "text": "Flow message footer"
        },
        "action": {
            "name": "flow",
            "parameters": {
                "flow_message_version": "3",
                "flow_token": "AQAAAAACS5FpgQ_cAAAAAD0QI3s.",
                "flow_id": "1",
                "flow_cta": "Book!",
                "flow_action": "navigate",
                "flow_action_payload": {
                    "screen": "<SCREEN_NAME>",
                    "data": {
                        "product_name": "name",
                        "product_description": "description",
                        "product_price": 100
                    }
                }
            }
        }
    }
}'

Exemplo de solicitação para template

curl --request POST \
--url https://api-cerberus-kong.socialminer.tech/api/Messages \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKEY}' \
--header 'version: 6.0' \
--data '{
    "messaging_product": "whatsapp",
    "recipient_type": "individual",
    "to": "5511999999999",
    "type": "template",
    "template": {
        "name": "beta_test_flow_v1_0",
        "language": {
            "code": "pt_BR"
        },
        "components": [
            {
                "type": "button",
                "sub_type": "flow",
                "index": "0",
                "parameters": [
                    {
                        "type": "action",
                        "action": {
                            "flow_token": "AQAAAAACS5FpgQ_cAAAAAD0QI3s.", // opcional, o padrão é "unused"
                            "flow_action_data": {} // opcional, objeto JSON com os dados do payload para a primeira tela.
                        }
                    }
                ]
            }
        ]
    }
}'
Language
Click Try It! to start a request and see the response here!