> ## 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 Mettre à jour un template

> Met à jour un template existant et recalcule ses variables.

## Endpoint

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

## Paramètres path

| Nom  | Type | Requis | Description    |
| ---- | ---- | ------ | -------------- |
| `id` | UUID | oui    | ID du template |

## Body

| Champ      | Type   | Requis | Description        |
| ---------- | ------ | ------ | ------------------ |
| `name`     | string | non    | Nouveau nom        |
| `body`     | string | non    | Nouveau body       |
| `mediaUrl` | string | non    | Nouvelle URL media |

## Réponse succès `200`

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