API / Templates
POST
/templates/{id}/preview
Render a preview of a template
Authentification : clé API Bearer requise.
Paramètres
| Nom | Dans | Type | Description |
|---|---|---|---|
| id* | path | string | Template ID |
Corps JSON
Locale and variables
| Nom | Type | Description |
|---|---|---|
| identityId | string | — |
| locale | string | — |
| variables | record<string, string> | — |
Exemple curl
curl -X POST https://api.sporee.fr/templates/<id>/preview \
-H "Authorization: Bearer $SPORE_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Réponses
| Statut | Description | Type |
|---|---|---|
| 200 | OK | preview_template.Response |
| 400 | Bad Request | echo.HTTPError |
| 401 | Unauthorized | echo.HTTPError |
Source machine : openapi.json · opération previewTemplate