---
updatedAt: 2025-06-08T14:11:29.000Z
agentTools:
  projectIndex: https://developers.kommo.com/llms.txt
---

# Delete a template

The method allows deleting a template in your account. If the file attached to the template has not been used anywhere else, or all entities where it was used have been deleted, then the file will be deleted along with the template, otherwise the file will not be deleted and will be available in Media list.

**Limitations**\
The method is available with administrator rights.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "kommo-api-references",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://{subdomain}.kommo.com",
      "variables": {
        "subdomain": {
          "default": "subdomain"
        }
      }
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "oauth2",
        "flows": {}
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/api/v4/chats/templates/{id}": {
      "delete": {
        "summary": "Delete a template",
        "description": "The method allows deleting a template in your account. If the file attached to the template has not been used anywhere else, or all entities where it was used have been deleted, then the file will be deleted along with the template, otherwise the file will not be deleted and will be available in Media list.",
        "operationId": "delete-template",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Template ID",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Templates were deleted": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid data given. Details are available in the response": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "text/plain": {
                "examples": {
                  "User unauthorized": {
                    "value": ""
                  }
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "text/plain": {
                "examples": {
                  "Not enough rights for this method": {
                    "value": ""
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```