Templates
Templates are pre-designed message formats that businesses use for automated communication with customers.
Note: Templates can be created and managed entirely through the Channel360 frontend.
Using the API is optional and only required if you are building your own frontend or need to automate template creation.
This section can be skipped when getting started.
A template consists of...
1. Meta Data
language
The language the template is in, if the language of the template does not match the language chosen, META will reject the template.
Supported Languages: META Documentation
status
When a template is created, it will be given a PENDING status and then META will either APPROVE or REJECT the template.
PENDING
APPROVED
REJECTED
Reasons for Rejection: META Documentation
2. Components
A templates structure is determined by its components . The request can have up to four objects, either HEADER, BODY, FOOTER or BUTTONS.
AUTHENTICATION Templates have their own rules. See link below.
Optional
Maximum of 1 tag
Must have a format of either TEXT, DOCUMENT, IMAGE, VIDEO
Limited to 60 Characters
The image format will require an example image url from https://www.channel360.co.za/api/templates/upload. The url must then again be used in campaign creation as a tag.
Required
Can have multiple tags
Limited to 1024 characters
Optional
Limited to 60 characters
Optional
Limited to 25 characters
Maximum of 1 tag
Headers don't need an example property, you simply add the parameter and off you go:
Body requires an example:
Button requires an example:
3. Tags
Tags are used in conjunction with the component parameters. They are essentially a means to add dynamic data into the HEADER, BODY and BUTTONS.
Tags can be created for the HEAD, BODY and BUTTONS content types
index should start at 1 and increment up
index of tag should match the order that you want to populate replacement tags for the HEAD / BODY / BUTTONS
Tag Structure
Tag Fields
index
Indexed used to populate replacement tags in template
Head and body
type
Type of Tag (see below)
The head tags cannot be populated with a csv
value
Used to store the value for 'hard-coded/on-campaign-creation' fields
url
Used to specify the url for tag types ( csv | image, video)
The following endpoint should be used to upload any files required by templates: {{url}}/v1.1/templates/upload This endpoint returns a list of the uploaded files along with their public url which must be specified
prompt
Used to populate the prompt when assigning a value to this tag on campaign creation
Used for csv/subscriber fields
fields
Array of fields to be used for tag replacement
Tag Types
csv
CSV Merge file uploaded to s3 and url saved against record
populate fields with the desired field + populate url with the key returned by {url}/v1.1/templates/upload
hard-coded
Hard Coded value (setup at on template creation)
populate value field with string value
on-campaign-creation
On Campaign Creation
populate the value with the text you would like to use when passing the tags object on campaign creation
image
Image uploaded to s3 and url saved against record
populate url field with the location returned by {url}/v1.1/templates/upload
video
Image uploaded to s3 and url saved against record
populate url field with the location returned by {url}/v1.1/templates/upload
subscriber-field
Subscriber field to use for tag replacement
populate fields with the subscriber field you want to replace - currently available fields are as follows: mobileNumber, firstName, lastName
Upload endpoint.
This endpoint allows you to upload a media file for later use in your templates.
POST https://www.channel360.co.za/v1.1/org/:orgId/templates/upload
Body Parameters
file
The file name of the media being uploaded
Ingest Template
This endpoint updates your list of templates with META's list of your templates.
POST https://www.channel360.co.za/v1.1/org/{{orgId}}/whatsapp/templates/refresh
Path Parameters
orgId
The Organization ID
Body Parameters
file
The file name of the media being uploaded
Response Example
Want to get your Template approved?
The link below specifies all that needs to be known about getting your templates approved.
Get your template approved
WhatsApp has rules! We cannot just make any message we want and send them off to millions of people. It must meet the criteria. Only then can we send millions of messages.
Last updated
Was this helpful?