ReferenceWhatsApp Business API
Создать шаблон
POST
Создаёт шаблон WABA (name, category, language, components). После создания Meta проверяет шаблон; список — GET /templates. Примеры запроса включают базовый шаблон и карусель / каталог Cloud API.
JWT tokenquery
token<token>- body
name?stringИмя шаблона
category?TemplateCategoryPropКатегория Шаблона
Value in
"MARKETING""UTILITY""AUTHENTICATION"components?array<>Массив компонентов Шаблона
language?TemplateLanguagePropЯзык шаблона
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"Template created. Provider payload is wrapped in response.
application/json- response
response?Upstream create-template payload (id, status, category, or error details)
[key: string]?anycurl -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" }}