Listing Message Templates

Request https://apigw.wavy.global/api/v1/whatsapp_message_templates?page=1&page_size=999 The request can contain the following parameters in the query string

Field

Required

Description

page

no

Page index beginning at 1

page_size

no

Page results. 10 by default

element_name

no

Search for templates containing element_name as part of their name

Response Example

{
 "data" : [
 {
 "message_type" : "RESERVATION_UPDATE",
 "customer_id" : 6364,
 "messages" : [
 {
 "buttons_type" : null,
 "id" : 33732,
 "buttons" : {
 "payload" : null
 },
 "language" : "EN",
 "last_modified" : "2020-06-04T14:52:39.674403",
 "placeholders" : ["data"],
 "header" : "",
 "text" : "Hello, you have an appointment with us for *{{1}}*.\nReply *YES* to confirm or *NO* to cancel.",
 "header_type" : "none",
 "status" : "approved",
 "footer" : ""
 }
 ],
 "sub_account_id" : 11486,
 "last_modified" : "2020-06-04T14:52:39.665449",
 "id" : 22045,
 "element_name" : "appointment_reminder_datetime",
 "namespace" : "whatsapp:hsm:ecommerce:movile",
 "template_type" : "header_footer",
 "languages" : ["EN"]
 },
 {
 "messages" : [
 {
 "status" : "approved",
 "footer" : "",
 "text" : "You have an appointment with us!",
 "header_type" : "none",
 "header" : "",
 "language" : "EN",
 "placeholders" : [],
 "last_modified" : "2020-06-02T18:46:01.386517",
 "buttons" : {
 "payload" : null
 },
 "id" : 33649,
 "buttons_type" : null
 }
 ],
 "sub_account_id" : 11486,
 "customer_id" : 6364,
 "message_type" : "RESERVATION_UPDATE",
 "template_type" : "header_footer",
 "languages" : ["EN"],
 "namespace" : "whatsapp:hsm:ecommerce:movile",
 "id" : 21964,
 "element_name" : "appointment_reminder",
 "last_modified" : "2020-06-02T18:46:01.384862"
 }
 ]
}
​

The response returns a list of message templates with the following fields

Field

Details

Tipo

languages

Languages this template is available in

[String]

namespace

Template namespace. Must be used in the messaging API

String

element_name

Template name. Must be used in the messaging API

String

message_type

Template category type. Possible values are

ACCOUNT_UPDATE, PAYMENT_UPDATE, PERSONAL_FINANCE_UPDATE, SHIPPING_UPDATE, RESERVATION_UPDATE, ISSUE_RESOLUTION, APPOINTMENT_UPDATE, TRANSPORTATION_UPDATE, TICKET_UPDATE, ALERT_UPDATE, AUTO_REPLY

String

template_type

Template type. Possible values are

header_footer or body_only

String

messages[]

List containing information on each template translation. The size of this list is equivalent to the number of supported languages in languages

[Object]

messages[].status

Template status. Possible values are:

in_analysis, approved, disapproved, error

In order for a template to be approved, its content must follow Facebook’s guidelines.

String

messages[].header_type

Header type. Possible values are

video, location, text, document, image or none

String

messages[].header

Text contained in the text header. Only used when header_type = text

String

messages[].text

Text contained in the body

String

messages[].footer

Text contained in the footer

String

messages[].buttons_type

Button type. Possible values are

quick_reply or call_to_action

String

messages[].placeholders

Description of placeholders present in the body text, represented as {{1}}, {{2}}, etc. in the text field

[String]

messages[].buttons.payload

Button content in JSON format serialized as a string.

Quick reply buttons will be in {"payload": [{"text": "button text"}]} format

Call-to-action buttons will be in

{"payload": [{"url": "https:wavy.global/en", "text": "Access our website", "type": "url"}, {"text": "Call us", "type": "phone_number", "country_code": "55", "phone_number": "11900000000"}]} format

String

Message Template Examples

Template with a text header, body and footer:

Template with an image header, body and no footer:

Template with 2 parameters:

Last updated