Skip to content

Single Send Message


Authorization

Add this header to every request in this page

json
{
  "Authorization": "Bearer ${token}"
}

It is used to send a Message Template to a single customer. It can be used to send both single message templates and carousel (scrollable) message templates.

Send Single Message Template

It allows sending message template.

POST

https://backend.helorobo.com/agent-app/message-template/single-message

Body

json
{
  "channel_id": "<channel_id>",
  "phone_number": "<to_phone_number>",
  "message_template_id": "<message_template_id>",
  "full_name": "<name>",
  "url_button_param": "<url_button_param>",
  "url_button_param2": "<url_button_param2>",
  "text_header_param": "<text_header_param>",
  "copy_code_param": "<copy_code_param>",
  "params" : ["<body_param_1>", "body_param_2", "body_param_3","body_param_4"]
}

Parameter Description

İsimTipZorunluAçıklama
channel_idstringYESId of Channel. You can get it from Channel
phone_numberstringYESCustomer phone number. Example: 905449991122
message_template_idstringYESId of the Message Template. You can get it from Message Template
full_namestringYESCustomer Name
url_button_paramstringNOParameter for the 1st website button (URL).
url_button_param2stringNOParameter for the 2nd website button (URL).
text_header_paramstringNOHeader (HEADER) parameter.
copy_code_paramstringNOParameter for the Coupon Code (COPY_CODE) button.
paramsArray<string>NOText (BODY) parameters. A maximum of 4 parameters can be used.

Response

json
{
  "success": true,
  "data": {
    "message_id": "<message_id>"
  }
}

POST

https://backend.helorobo.com/agent-app/message-template/single-messagev2

Body

json
{
  "channel_id": "<channel_id>",
  "phone_number": "<to_phone_number>",
  "message_template_id": "<message_template_id>",
  "full_name": "<isim>",
  "message_template": [
    {
      "type": "BODY",
      "text": "Sizin için tanımlamış olduğumuz indirim kodunu kullanabilirsiniz.\n\nİndirim Kodu: {{1}} \n\nBu indirim kodunu Helorobo sayfasında {{2}} kullanabilirsiniz.\n\nLütfen dikkate almayınız.",
      "example": {
        "body_text": [
          [
            "<body_param_1>",
            "<body_param_2>"
          ]
        ]
      }
    },
    {
      "type": "CAROUSEL",
      "cards": [
        {
          "components": [
            {
              "type": "HEADER",
              "format": "IMAGE",
              "example": {
                "header_handle": [
                  "https://scontent.whatsapp.net/v/t61.29466-34/593614972_1942722253266719_2998156480333260778_n.jpg?ccb=1-7&_nc_sid=a80384&_nc_ohc=RNoq8uKW7gEQ7kNvwHCsucx&_nc_oc=Adn5vw5kMhKaUcfVw1DmVAUlwQOaTdoPVvFrQuiIn8rWFxLNcpHOXT-jf825SAoCw70&_nc_zt=3&_nc_ht=scontent.whatsapp.net&edm=ANHSQoYEAAAA&_nc_gid=wW_CX3YoI7J_rr7schOViQ&oh=01_Q5Aa3gErukWnwXziyMQrs5bHR8Ozj9ORNgfZ1EyH0N9C_JDa2w&oe=698E94AF"
                ]
              }
            },
            {
              "type": "BODY",
              "text": "Yeni İndirim Kodu : {{1}}  Lütfen indirim kodunu kimseyle paylaşmayınız . {{2}} bu linkten indirim kodunu kullanabilir",
              "example": {
                "body_text": [
                  [
                    "<body_param_1>",
                    "<body_param_2>"
                  ]
                ]
              }
            },
            {
              "type": "BUTTONS",
              "buttons": [
                {
                  "type": "URL",
                  "text": "Google",
                  "url": "https://www.google.com/%20{{1}}",
                  "example": [
                    "<url_param_1>"
                  ]
                },
                {
                  "type": "URL",
                  "text": "Helorobo",
                  "url": "https://www.helorobo.com/%20{{1}}",
                  "example": [
                    "<url_param_2>"
                  ]
                }
              ]
            }
          ]
        },
        {
          "components": [
            {
              "type": "HEADER",
              "format": "IMAGE",
              "example": {
                "header_handle": [
                  "https://scontent.whatsapp.net/v/t61.29466-34/539633550_1036750145323923_7896179369653880429_n.jpg?ccb=1-7&_nc_sid=a80384&_nc_ohc=WhZIOgMwqEwQ7kNvwGf5z3a&_nc_oc=AdleGMDFk4gpG904r7hhlxsi0LwSEE7yogikLgdqQI6NqqgI52hBhrjMDf-Lx4kKsjE&_nc_zt=3&_nc_ht=scontent.whatsapp.net&edm=ANHSQoYEAAAA&_nc_gid=wW_CX3YoI7J_rr7schOViQ&oh=01_Q5Aa3gH5lZfrB63q3mGufDOdGlIlBYIzVwdDdW4MvhHz480ayg&oe=698EB0BF"
                ]
              }
            },
            {
              "type": "BODY",
              "text": "Yeni İndirim Kodu : {{1}}  Lütfen indirim kodunu kimseyle paylaşmayınız . {{2}} bu linkten indirim kodunu kullanabilir",
              "example": {
                "body_text": [
                  [
                    "<body_param_1>",
                    "<body_param_2>"
                  ]
                ]
              }
            },
            {
              "type": "BUTTONS",
              "buttons": [
                {
                  "type": "URL",
                  "text": "Google",
                  "url": "https://www.google.com/%20{{1}}",
                  "example": [
                    "<url_param_1>"
                  ]
                },
                {
                  "type": "URL",
                  "text": "Helorobo",
                  "url": "https://www.helorobo.com/%20{{1}}",
                  "example": [
                    "<url_param_2>"
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

Parameter Description

NameTypeRequiredDescription
message_template_idstringtrueId of the Message Template. You can get it from Message Template
full_namestringfalseCustomer Name
phone_numberstringtrueCustomer phone number. Example: 905449991122
channel_idstringtrueId of Channel. You can get it from Channel

IMPORTANT NOTICE

Please pay attention to the following rules when creating and sending Carousel Message Templates:

The Carousel Message Template consists of two main sections: BODY and CARDS.

Rules for the BODY section;

  • A maximum of 4 parameters can be used in the BODY section.

Rules for the Cards section;

  • A maximum of 10 cards can be used.
  • Each card can contain a maximum of 4 parameters in the body section.
  • Each card must contain at least 1 button.
  • Each card can contain a maximum of 2 buttons.
  • Button types can be URL, PHONE_NUMBER, and `QUICK_REPLY.
  • For `URL buttons, a separate parameter can be defined for each button.

Response

json
{
  "success": true,
  "data": {
    "message_id": "<message_id>"
  }
}