Creating a Template

POST https://gateway.lipachat.com/api/v1/template/PHONE_NUMBERarrow-up-right

circle-info

Pass your WABA number or Sandbox phone number as the value of PHONE_NUMBER

Headers

Name
Value

Content-Type

application/json

apiKey

Get apiKey from App portal settings tabhttps://app.lipachat.com/app/settingsarrow-up-right

Body

Name
Type
Description

name

string

Name of template. Can only contain lowercase alphanumeric characters and underscores ( _ ). No other characters or white space are allowed.

language

string

Language code e.g en

category

string

Accepted values are: MARKETING, UTILITY or AUTHENTICATION.

component.header.format

string

Accepted values are: TEXT, IMAGE, VIDEO, DOCUMENT

component.header.text

string

Text to be sent on header

component.header.example

string

Should be present if text above has a variable.

component.body.text

string

Body text, accepts variables e.g Hello {{1}}, your balance is {{2}}

component.body.examples

array

Should match number of variables passed in text. For the example above it should be ['John', '2000']

component.footer.text

string

Optional footer text.

component.buttons[0].type

string

Accepted values are: PHONE_NUMBER, URL or QUICK_REPLY.

component.buttons[0].text

string

Text on button above.

component.buttons[0].phoneNumber

string

Should be passed if button type passed is PHONE_NUMBER.

component.buttons[0].url

string

Should be passed if button type passed is URL.

component.buttons[0].example

string

Applies for PHONE_NUMBER and URL.

component.header, component.footer, component.buttons objects are optional.

Sample Requests:

chevron-rightRequest to create a template with header and body.hashtag
chevron-rightRequest to create a template with header, body and quick replyhashtag

chevron-rightRequest to create a template with quick reply buttonshashtag
chevron-rightRequest to create a template with a media headerhashtag
chevron-rightRequest to create an authentication templatehashtag

Response

Uploading Template media

When creating a template with media on the header, you should first call the endpoint below to upload media then use the id returned to create the message template.

POST https://gateway.lipachat.com/api/v1/template/upload/file

Headers

Name
Value

Content-Type

multipart/form-data

apiKey

Get apiKey from App portal settings tabhttps://app.lipachat.com/app/settingsarrow-up-right

Body

Name
Type
Description

file

file

Image, video or document.

Response

circle-info

use the value of data while calling create template endpoint, for templates with media in the header.

circle-info

Try out from Postman here Run In Postmanarrow-up-right

Last updated