Email templates
The content of each e-mail the platform sends (portal invitation, API key expiring...). duplicate copies a template as a draft, init-defaults create restores the default templates (overwriting yours), and preview get / preview create render a template without sending anything.
| Command | HTTP | Description |
|---|---|---|
email-templates list | GET /v1/email_templates | List email templates |
email-templates create | POST /v1/email_templates | Create email template |
email-templates get | GET /v1/email_templates/{id} | Get email template |
email-templates update | PATCH /v1/email_templates/{id} | Update email template |
email-templates delete | DELETE /v1/email_templates/{id} | Delete email template |
email-templates duplicate | POST /v1/email_templates/{id}/duplicate | Duplicate email template |
email-templates init-defaults create | POST /v1/email_templates/init_defaults | Reset templates to defaults |
email-templates preview get | GET /v1/email_templates/{id}/preview | Preview email template |
email-templates preview create | POST /v1/email_templates/{id}/preview | Render template with variables |
Examples
--params carries query, path and header parameters (id, page, filters, X-Workspace-Id); --json carries the request body; --fields limits which fields come back — worth using on every list/get to save context. See Global flags for the full reference.
# List email templates
kobana dashboards email-templates list --fields "id,name,type,is_active"
# Preview email template
kobana dashboards email-templates preview get --params '{"id": "TEMPLATE_ID"}'
# Render template with variables
kobana dashboards email-templates preview create \
--params '{"id": "TEMPLATE_ID"}' \
--json '{"variables": {"name": "Ana"}}'
# Duplicate email template
kobana dashboards email-templates duplicate \
--params '{"id": "TEMPLATE_ID"}' \
--json '{"new_name": "Convite (versão B)"}'
Next steps
- Email layouts
- Notifications
- Schema introspection — every parameter this resource accepts.