---
title: "Edit templates"
method: PATCH
path: "/api/v4/chats/templates"
---

# Edit templates

`PATCH /api/v4/chats/templates`

The method allows editing templates in a bunch.

## Request body

- object
  - `RAW_BODY` object[]
    - `id` integer, required — Template ID
    - `name` string — Template name
    - `content` string — Template body (the message that is sent to the user). You can use Salesbot markup elements.
    - `is_editable` boolean — It defines whether users can edit the template via Kommo interface.
    - `type` string — Template type (amocrm or waba)
    - `buttons` object[] — Array of button objects
      - `type` string — Button type. Available options are inline (plain text button) and url (link button)
      - `text` string — Text on the button
      - `url` string — URL of the button of the `url` type
    - `attachment` object — Object of the file added to the template
      - `id` string — UUID of the file attached to the template
      - `name` string — File name (it will be passed to a messenger)
      - `type` string — Type of the file (picture, file, document, video)
    - `external_id` string — External template ID. Template ID in your system.
    - `request_id` string — A field that will be returned to you unchanged in the response and will not be saved.
    - `waba_footer` string — Whatsapp template footer
    - `waba_category` string — WhatsApp template category. The following categories are available: UTILITY/AUTHENTICATION/MARKETING
    - `waba_language` string — Language of the Whatsapp template
    - `waba_examples` string, json — An object. Examples of replacing WhatsApp template markup elements. Example "waba_examples":{"{{lead.name}}":"qwerty"}
    - `waba_header` string — WhatsApp template header with a limit of up to 60 characters.
    - `waba_header_type` string — WhatsApp template header type. Available options: text (WhatsApp template with a header), media (WhatsApp template with a media header, there must be a file attached).

## Response `200`

200

- object
  - `_total_items` integer
  - `_embedded` object
    - `chat_templates` object[]
      - `id` integer
      - `account_id` integer
      - `name` string
      - `content` string
      - `created_at` integer
      - `updated_at` integer
      - `buttons` object[]
        - `type` string
        - `text` string
      - `attachment` object
        - `id` string
        - `name` string
        - `type` string
      - `is_editable` boolean
      - `external_id` string
      - `type` string
      - `waba_footer` string
      - `waba_category` string
      - `waba_language` string
      - `waba_examples` unknown[]
        - unknown
      - `waba_header` unknown
      - `waba_header_type` unknown
      - `_links` object
        - `self` object
          - `href` string

## Other responses

- `400` — 400
- `401` — 401

---

[API](https://skmtc.net/kommo/apis/kommo-api-references.md) · [All operations](https://skmtc.net/kommo/apis/kommo-api-references/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kommo/kommo-api-references/revisions/f17af4d23c7c/schema)
