> ## Documentation Index
> Fetch the complete documentation index at: https://docs.msgflash.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PUT Update a template

> Update an existing template and recalculate its variables.

## Endpoint

```txt theme={null}
PUT /api/v1/templates/{id}
```

## Parameters path

| Nom | Type | Required | Description |
| - | - | - | - |
| `id` | UUID | yes | ID du template |

## Body

| Field | Type | Required | Description |
| - | - | - | - |
| `name` | string | no | Nouveau nom |
| `body` | string | no | Nouveau body |
| `mediaUrl` | string | no | Nouvelle URL media |

## Success response `200`

```json theme={null}
{
  "data": {
    "id": "tmpl_uuid",
    "variables": ["contact.firstName"]
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.