v1

latestOpenAPI 3.1.02026-07-241630614.2 KB

Add templates

The method allows adding templates in a bunch.

post/api/v4/chats/templates

Request body

Response

200

_total_itemsinteger

Example response

{
  "_total_items": 1,
  "_embedded": {
    "chat_templates": [
      {
        "id": 7351,
        "account_id": 29420107,
        "name": "Hello template",
        "content": "Hello {{contact.name}}",
        "created_at": 1640362536,
        "updated_at": 1640362536,
        "buttons": [
          {
            "type": "inline",
            "text": "button 1"
          }
        ],
        "attachment": {
          "id": "c2b77f70-d0d6-484a-8f6e-583f70a08cce",
          "name": "New image",
          "type": "picture"
        },
        "type": "waba",
        "waba_footer": "my footer",
        "waba_category": "UTILITY",
        "waba_language": "en",
        "waba_examples": {
          "{{contact.name}}": "My contact"
        },
        "waba_header_type": "media",
        "external_id": "my_external_id_for_hello",
        "request_id": "0",
        "_links": {
          "self": {
            "href": "https://example.kommo.com/api/v4/chats/templates/7351"
          }
        }
      }
    ]
  }
}