GET /api/v1/templates
List templates, optionally filtered by category.Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
category | string | No | Filter by category (e.g., email, sms, push, banner) |
Response
POST /api/v1/templates
Create a new template. Editor or Admin.Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Template name (max 255 chars, unique per tenant) |
description | string | No | Template description |
category | string | Yes | Template category (e.g., email, sms, push, banner) |
type | string | Yes | Content type (e.g., html, text, json) |
content | object | Yes | Template content (structure depends on type) |
variables | object | No | Variable definitions with types |
isSystem | boolean | No | Mark as system template (default: false) |
Example
Response (201)
Returns the created template object.GET /api/v1/templates/
Get a single template by ID.PUT /api/v1/templates/
Update a template. Editor or Admin.Request Body
Same fields as POST, all optional.DELETE /api/v1/templates/
Delete a template. System templates cannot be deleted. Admin only.Response
204 No Content on success.