POST
/api/admin/templates/previewAdminPreview a template with custom props
operationId
previewTemplateAdmin: TemplatesAuthentication & permissionsAdmin
Platform administrators only
- Accepted credentials
- Access token (Bearer)
Authorization: Bearer <JWT> - Access token (cookie)
cookie "access_token_schemavaults-mail"
- Access token (Bearer)
- Who may call
- Platform administrators only
Request body
Required
application/json
TemplatePreviewRequestBody
| Property | Type | Description |
|---|---|---|
| template_id* | string | Template to render. |
| props | any | Props (a JSON object) passed to the template component. Non-object values are treated as {}. |
JSONExample
"template_id""mailing-list-confirmation"
"props"null
Responses
text/html
string
Example request
bashcurl
curl -X POST 'https://mail.schemavaults.com/api/admin/templates/preview' \
-H 'Authorization: Bearer <access_token>' \
-H 'Content-Type: application/json' \
-d '{
"template_id": "mailing-list-confirmation",
"props": null
}'