---
title: "Update a message template."
url: https://docs.gleap.ai/en/reference/rest-api/put-message-templates-messagetemplateid
method: PUT
path: "/message-templates/{messageTemplateId}"
api: "API Reference"
tag: "Message templates"
operationId: "UpdateTeam"
updatedAt: "2026-11-01T18:40:15.677Z"
language: en
---

# Update a message template.

`PUT https://api.gleap.io/v3/message-templates/{messageTemplateId}`

Update a message template. Callers who may only manage their own macros can update their personal macros only, and those stay private.

## Authorization

- `Authorization` (header, required): `Bearer <token>`

## Path parameters

- `messageTemplateId` (string, required)

## Headers

- `project` (string, required)

## Request body (`application/json`, required)

- `title` (string, required)
- `content` (any, required)
- `lexorank` (string): Ordering rank. Ignored when creating a template; the server appends new templates at the end. Set it when updating a template to reorder.
- `isPublic` (boolean)
- `users` (string[])
- `attachments` (any[])
- `actions` (object[])
  - `data` (any)
  - `type` (string, required)
- `tags` (string[])
- `teams` (string[])
- `ticketTypes` (string[])

## Example request

```bash
curl --request PUT \
  --url 'https://api.gleap.io/v3/message-templates/{messageTemplateId}' \
  --header 'Authorization: Bearer <token>' \
  --header 'project: <project>' \
  --header 'Content-Type: application/json' \
  --data '{
  "title": "<title>",
  "content": null
}'
```

## Responses

### 200 (`application/json`)

Ok
