Skip to main content
POST
/
createTemplates
Create Templates
curl --request POST \
  --url https://api.bleeprs.com/api/createTemplates \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "body": "My name is {{1}} and i am from {{2}}",
  "indexes": [
    "1",
    "2"
  ],
  "name": "Welcome Message",
  "slug": "WLG",
  "useCase": "business"
}
'
Variables can be used on all templates built with Content Template Builder. There are a few differing rules for variables sent in a user and business initiated sessions.

Some Template Rules

Content variables need to be in sequential order. They can be is non-sequential order within a template, but variable definitions should not skip over integers. Not Allowed: body: Hi {{1}}, Your flight will depart from gate {{3}}. Please reply Stop to unsubscribe. Allowed: body: Hi {{1}}, Your flight will depart from gate {{2}}. Please reply Stop to unsubscribe.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
body
string

The standard body with possible interpolated fields

Example:

"My name is {{1}} and i am from {{2}}"

indexes
string[]

The integers in a format of a string in {{1}} from body

Example:
["1", "2"]
name
string

Template name

Example:

"Welcome Message"

slug
string

Template slug

Example:

"WLG"

useCase
string

Template Use cases seprated by comma

Example:

"business"

Response

200 - undefined