Skip to content

Message Template ​


Authorization ​

Add this header to every request in this page

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

🔒 Check WhatsApp Phone Status ​

Messages can be sent depending on WhatsApp Phone Number status

GET ​

https://backend.helorobo.com/agent-app/message-template/template/waba-status?channel_id=<channel_id>

Response ​

json
{
  "success": true,
  "data": {
    "status": "<phone_status>",
    "id": "<phone_number_id>",
    "quality_score": "<quality_score>",
    "verified_name": "<phone_display_name>",
    "display_phone_number": "<phone_number>",
    "messaging_limit_tier": "<tier_limit>"
  }
}

Parameter Explanations ​

NameDescription
idThis is Channel Id which you are going to use while creating, getting and sending message templates
statusStatus of the Phone Number. Here is the status list. Check out Meta Documentation
  • CONNECTED: Ready to send messages
  • FLAGGED: Your phone marked as flagged due to low quality ratings.
  • RESTRICTED: You cant send any messages. Due to your quality rating. You have to wait some time before start sending again.
quality_scoreRating of the messages which you have sent to your customers for seven days. Rating is determined by the feedback from your customer. Here is the quality rating lists. Check out Meta Documentation
  • GREEN: High quality
  • YELLOW: Medium Quality
  • RED: Low Quality
messaging_limit_tierMaximum number of the business-initiated conversation of phone number can send in 24h.
  • TIER_50
  • TIER_250
  • TIER_1K
  • TIER_10K
  • TIER_100K
  • TIER_UNLIMITED

CAUTION

status -> When value is FLAGGED, message cannot be sent.

CAUTION

quality_score -> When value is RED, no message can be sent.

WARNING

When your status is FLAGGED You have to be carefull. Your phone number at risk. Check your message templates. Revise the customer list that your sending messages templates to. If your customer marks your messages as spam. First your quality rating decreases and after that your number will be RESTRICTED!!! You wont be able to send messages anymore and your TIER would decrease.

TIP

If you keep your quality rating at GREEN your messaging tier will increase.

🔒 Create (v1) ​

For more information about media upload, check out Media Upload

Creates a new message template.

POST ​

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

Request Body ​

json
{
  "name": "test",
  "category": "MARKETING",
  "components": [
    {
      "type": "BODY",
      "text": "body"
    },
    {
      "type": "FOOTER",
      "text": "footer"
    },
    {
      "type": "BUTTONS",
      "buttons": [
        {
          "type": "URL",
          "text": "Git",
          "url": "https://helorobo.com"
        },
        {
          "type": "PHONE_NUMBER",
          "text": "Ara",
          "phone_number": "905555555555"
        },
        {
          "type": "COPY_CODE"
        },
        {
          "type": "QUICK_REPLY",
          "text": "Yanıtla"
        }
      ]
    },
    {
      "type": "HEADER",
      "format": "TEXT",
      "text": "header"
    }
  ],
  "allow_category_change": true,
  "language": "tr",
  "channel_id": "<channel_id>"
}

🔒 Create (v2) ​

For more information about media upload, check out Media Upload

Creates a new message template.

POST ​

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

Request Body ​

json
{
  "message_template": {
    "name": "test555",
    "category": "MARKETING",
    "language": "tr",
    "components": [
      {
        "type": "body",
        "text": "body"
      },
      {
        "type": "carousel",
        "cards": [
          {
            "components": [
              {
                "type": "header",
                "format": "image",
                "example": {
                  "header_handle": [
                    "4:Y2FjZWMxZDJjNDEyNjliZGFhODE4Njk1ZjMzM2M5NmMuanBn:aW1hZ2UvanBlZw==:ARYCJJ34Nu5iTfMdWNEN5GJUFIj4XtTrHFChW70lk-5dYw7Kjry7qs-yw73H32L2Ou6KztYZS3f_1IkYldU9Ri2puRI1OogMHfEPParkv4sZsQ:e:1770644974:1350673098603823:0:ARZ6lLFPw7t8zrt5A8c"
                  ]
                }
              },
              {
                "type": "body",
                "text": "cart 1"
              },
              {
                "type": "buttons",
                "buttons": [
                  {
                    "type": "quick_reply",
                    "text": "Yanıtla"
                  },
                  {
                    "type": "phone_number",
                    "text": "Ara",
                    "phone_number": "+905555555555"
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "channel_id": "<channel_id>",
  "media_names": {
    "4:Y2FjZWMxZDJjNDEyNjliZGFhODE4Njk1ZjMzM2M5NmMuanBn:aW1hZ2UvanBlZw==:ARYCJJ34Nu5iTfMdWNEN5GJUFIj4XtTrHFChW70lk-5dYw7Kjry7qs-yw73H32L2Ou6KztYZS3f_1IkYldU9Ri2puRI1OogMHfEPParkv4sZsQ:e:1770644974:1350673098603823:0:ARZ6lLFPw7t8zrt5A8c": "cacec1d2c41269bdaa818695f333c96c.jpg"
  }
}

🔒 Create (Library) ​

Creates a message template from a ready-made template in the Meta WhatsApp Template Library. Template content comes from the library template; components is not sent in this request.

See Meta Template Library for available template names.

POST ​

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

Request Body ​

json
{
  "channel_id": "<channel_id>",
  "name": "call_permission_request",
  "category": "UTILITY",
  "language": "en",
  "library_template_name": "call_permission_request_1"
}

Library templates that include buttons also send library_template_button_inputs:

json
{
  "channel_id": "<channel_id>",
  "name": "delivery_update",
  "category": "UTILITY",
  "language": "en",
  "library_template_name": "delivery_update_1",
  "library_template_button_inputs": [
    {
      "type": "URL",
      "url": {
        "base_url": "https://www.example.com/{{1}}",
        "url_suffix_example": "https://www.example.com/demo"
      }
    },
    {
      "type": "PHONE_NUMBER",
      "phone_number": "+905555555555"
    }
  ]
}

Parameter Explanations ​

NameTypeRequiredDescription
channel_idstringYesId of the channel the message template is created on.
namestringYesName of the message template to create.
categorystringYesMust be UTILITY, MARKETING, or AUTHENTICATION.
languagestringYesTemplate language code. Example: tr, en.
library_template_namestringYesExact name of the template in Meta Template Library. Example: call_permission_request_1.
library_template_button_inputsarrayNoButton values for library templates that include buttons. Must be an array when sent. Omit it when the library template has no buttons.

Each item in library_template_button_inputs:

NameTypeDescription
typestringButton type. URL, PHONE_NUMBER, QUICK_REPLY, OTP, FLOW, VOICE_CALL.
phone_numberstringPhone number for a PHONE_NUMBER button.
urlobjectURL button. Contains base_url and url_suffix_example.
url.base_urlstringBase URL of the button. Use 1 for a variable.
url.url_suffix_examplestringExample value of the URL suffix.
otp_typestringFor an OTP button: COPY_CODE, ONE_TAP, or ZERO_TAP.
zero_tap_terms_acceptedbooleanWhether zero-tap terms were accepted.

Response ​

json
{
  "success": true,
  "data": {
    "id": "<message_template_id>",
    "status": "<message_template_status>",
    "category": "<message_template_category>"
  }
}

Parameter Explanations ​

NameTypeDescription
idstringId of the created message template.
statusstringMeta review status. Example: APPROVED, PENDING.
categorystringCategory the template was saved with.

🔒 List ​

Returns message templates.

GET ​

https://backend.helorobo.com/agent-app/message-template/template?channel_id=<channel_id>

Response ​

json
{
  "success": true,
  "items": [
    {
      "name": "helorobo_demo",
      "components": [
        {
          "type": "HEADER",
          "format": "IMAGE",
          "example": {
            "header_handle": ["<image_url>"]
          }
        },
        {
          "type": "BODY",
          "text": "Hello, Dear {{1}}. {{2}} How are you?",
          "example": {
            "body_text": [["example_param_1", "example_param_2"]]
          }
        }
      ],
      "language": "tr",
      "status": "<message_template_status>",
      "category": "<message_template_category>",
      "id": "<messsage_template_id>"
    }
  ]
}

🔒 Detail ​

Returns the previously created message template detail.

https://backend.helorobo.com/agent-app/message-template/template/get-by-id?template_id=<message_template_id>&channel_id=<channel_id>

Response ​

json
{
  "success": true,
  "data": {
    "message_template": {
      "name": "helorobo_demo",
      "components": [
        {
          "type": "HEADER",
          "format": "IMAGE",
          "example": {
            "header_handle": [
              "<image_url>"
            ]
          }
        },
        {
          "type": "BODY",
          "text": "Hello, Dear {{1}}",
          "example": {
            "body_text": [["example_param_1"]]
          }
        }
      ],
      "language": "tr",
      "status": "<message_template_status>",
      "category": "<message_template_category>",
      "id": "<messsage_template_id>"
  }
}

🔒 Delete ​

Deletes the messages template with given id.

DELETE ​

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

Body ​

json
{
  "id": "<message_template_id>"
}

Response ​

json
{
  "success": true
}