/v1/workspaces/{workspace_id}/templates/{name}/variablesAuthVariables auto-detected from the saved template body + subject (Handlebars expressions, dotted paths preserved, dedup'd in first-occurrence order).
Path parameters
workspace_id*string · uuidId of the workspace.
name*stringName of the template.
Response · 200
data*arrayVariables auto-detected from the saved template body + subject (Handlebars expressions, dotted paths preserved).
Example
Request
GET https://api.mail.productcraft.co/v1/workspaces/{workspace_id}/templates/{name}/variables
Authorization: Bearer YOUR_TOKENimport { Mail } from "@productcraft/mail";
// Reads PRODUCTCRAFT_API_KEY from the environment
const mail = new Mail();
const templateVariables = await mail.templates.variables.list("welcome");mail.templates.variables.list(name, options?): Mail.TemplateVariables
Response
{
"data": [
"string"
]
}