> ## 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.

# POST Prévisualiser un template

> Rend un template avec le contexte fourni sans envoyer de message.

## Endpoint

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

## Paramètres path

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

## Body

| Champ        | Type   | Requis | Description           |
| ------------ | ------ | ------ | --------------------- |
| `instanceId` | UUID   | non    | Contexte `instance.*` |
| `contactId`  | UUID   | non    | Contexte `contact.*`  |
| `variables`  | object | non    | Valeurs `custom.*`    |

## Réponse succès `200`

```json theme={null}
{
  "data": {
    "rendered": "Bonjour Awa, utilisez PROMO10.",
    "variables": ["contact.firstName", "custom.code"],
    "missingVariables": [],
    "valid": true
  }
}
```
