Template

Sending template messages

All examples below must be sent within the template field of a message as shown below

{
 "receiver": {
   "contacts": [
     {
       "identifierValue": "+31612345678"
     }
   ]
 },
 "template": {...}
}

Text template with variable

Studio template

Template body

{
 "projectId": "ce6a2fd6-b2fa-4f5a-a2cd-f3bd15883318",
 "version": "latest",
 "locale": "en",
 "variables": {
   "name": "Robert"
 }
}

Image template with variable

Studio template

Template body

{
 "projectId": "7b492653-450b-4e97-b5e4-3827868e7438",
 "version": "latest",
 "locale": "en",
 "variables": {
   "imageURL": "https://www.messagebird.com/images/logo.png",
   "name": "Robert"
 }
}

Image with a variable in a button

Studio template

Template body

{
    "projectId": "6449eb42-dffb-41c2-81a1-7fd956d2e7a6",
    "version": "e0e9190c-c3e7-4026-8fc3-d28a77aa1a52",
    "locale": "en",
    "variables": {
      "name": "Robert",
      "recommend": "123456"
    }
 }

Last updated