HSM-сообщения V2

Send HSM template message

POST https://app.hightouch.ai/api/v2/bot/messages/send_waba_template_message/

Отправка HSM сообщения.

Request Body

# в случае успеха
{
    "status": "ok",
    "result": {
        "message_id": 123456
    }
}

# в случае ошибки
{
    "status": "error",
    "errors": {
        ...
        # error details
    }
}
[
    {
        "type" : "header",
        "parameters":
            [
                {
                    "type": "text",
                    "text": "replacement_text"
                }
            ]
    },
    {
        "type" : "body",
        "parameters":
            [
                {
                    "type": "text",
                    "text": "replacement_text"
                },
                {
                    "type": "text",
                    "text": "another_text"
                },
                {
                ...
                # Any additional template parameters
                }
            ]
    },
    {
        "type": "button",
        "sub_type" : "url",
        "index": "0", 
        "parameters":
            [
                {
                    "type": "text",
                    "text": "9rwnB8RbYmPF5t2Mn09x4h"
                }
            ]
    },
    {
        "type": "button",
        "sub_type" : "url",
        "index": "1", 
        "parameters":
            [
                {
                    "type": "text",
                    "text": "login"
                }
            ]
    },
]

Поле index в блоке button это порядковый номер кнопки. Всего в HSM сообщении их может быть 3.

Поле text в параметрах button, это текст, который может быть добавлен к url кнопки.

Última actualización