1MSG

Create message template

POST
/addTemplate

Create a WABA message template (name, category, language, components). After create, Meta reviews the template; list it with GET /templates. See the request examples for a basic template and Cloud API carousel / catalogue templates.

Authorization

JWT token
querytoken<token>

Request Body

  1. body
name?string

Name of template

category?TemplateCategoryProp

Template category

Value in"MARKETING""UTILITY""AUTHENTICATION"
components?array<>

Array of template components

language?TemplateLanguageProp

Template language

Value in"af""sq""ar""az""bn""bg""ca""zh_CN""zh_HK""zh_TW""hr""cs""da""nl""en""en_GB""en_US""et""fil""fi""fr""de""el""gu""he""hi""hu""id""ga""it""ja""kn""kk""ko""lo""lv""lt""mk""ms""mr""nb""fa""pl""pt_BR""pt_PT""pa""ro""ru""sr""sk""sl""es""es_AR""es_ES""es_MX""sw""sv""ta""te""th""tr""uk""ur""uz""vi"

Response Body

Template created. Provider payload is wrapped in response.

application/json
  1. response
response?

Upstream create-template payload (id, status, category, or error details)

[key: string]?any
curl -X POST 'https://api.1msg.io/123/addTemplate' \  -H 'Content-Type: application/json' \  -d '{  "name": "basic_template_demo",  "category": "MARKETING",  "language": "en_US",  "components": [    {      "type": "HEADER",      "format": "IMAGE",      "example": {        "header_handle": [          "https://test.net/v.jpg"        ]      }    },    {      "text": "We remind you that you have an appointment at {{1}} with the dentist tomorrow. Are you confirming your appointment with the doctor?",      "type": "BODY",      "example": {        "body_text": [          [            "9:00"          ]        ]      }    },    {      "text": "white",      "type": "FOOTER"    },    {      "type": "BUTTONS",      "buttons": [        {          "text": "Yes",          "type": "QUICK_REPLY"        },        {          "text": "No",          "type": "QUICK_REPLY"        }      ]    }  ]}'
{  "response": {    "id": "123456789",    "status": "PENDING",    "category": "MARKETING"  }}