Overview
Templates allow you to save and reuse message configurations. Templates support all message features including embeds and can be shared with collaborators.List All Templates
GET/templates
Retrieve all templates owned by or shared with the authenticated user.
Query Parameters
Filter by category
Search templates by name or description
Filter by ownership:
owned, shared, or allResponse
Array of template objects
Template ID
Template name
Template description
Template category
Message content (same structure as message send)
Whether current user owns this template
User’s permission:
owner, edit, or viewResponse
Create Template
POST/templates
Create a new message template.
Request Body
Template name (max 255 characters)
Template description (max 1000 characters)
Template category (max 50 characters)
Optional webhook ID to associate with template
Whether template is shared
Response
Returns302 redirect to /templates with success message.
Get Template Details
GET/templates/{id}
Retrieve detailed information about a specific template.
Path Parameters
Template ID
Response
Update Template
PUT/PATCH/templates/{id}
Update an existing template. Requires edit or owner permission.
Path Parameters
Template ID
Request Body
Same structure as Create Template.Response
Returns302 redirect to /templates with success message.
Delete Template
DELETE/templates/{id}
Permanently delete a template. Only the owner can delete a template.
Path Parameters
Template ID
Response
Returns302 redirect to /templates with success message.
Duplicate Template
POST/templates/{id}/duplicate
Create a copy of an existing template. The copy will be owned by the current user.
Path Parameters
Template ID to duplicate
Response
Returns302 redirect to edit page of the new template with success message.
The duplicated template:
- Has ” (Copy)” appended to the name
- Is owned by the current user
- Is not shared by default
- Does not copy webhook associations
Template Categories
Common template categories:alerts- Alert and notification templatesreports- Report and summary templatesannouncements- Announcement templatesupdates- Status update templateswelcome- Welcome message templatesreminders- Reminder templatescustom- Custom category
Categories are free-form strings. You can create any category name (max 50 characters).
Using Templates
Templates can be used when sending messages:- Load the template content
- Variables are automatically replaced
- Send through any webhook
Example Flow
Template Collaborators
Templates can be shared with other users. See the Collaborators section for managing template access.Collaborator Endpoints
- GET
/templates/{template}/collaborators- List collaborators - POST
/templates/{template}/collaborators- Add collaborator - PUT
/templates/{template}/collaborators/{user}- Update permission - DELETE
/templates/{template}/collaborators/{user}- Remove collaborator - POST
/templates/{template}/leave- Leave as collaborator
Permission Levels
| Level | Permissions |
|---|---|
view | View template content only |
edit | View and modify template |
owner | Full control (creator only) |
Content Validation
Template content follows the same validation rules as messages:Content Limits
Content Limits
- Plain text: max 2000 characters
- Embeds: max 10 per message
- Embed title: max 256 characters
- Embed description: max 4096 characters
- Embed fields: max 25 per embed
- Field name: max 256 characters
- Field value: max 1024 characters
Embed Structure
Embed Structure
All embed fields are optional, but at least one field must be present for the embed to be valid. Common fields:
- title
- description
- color (decimal integer)
- url
- timestamp
- footer (text, icon_url)
- image (url)
- thumbnail (url)
- author (name, url, icon_url)
- fields (array)
Variables Support
Variables Support
Templates fully support variable replacement:Variables are replaced when the message is sent, not when the template is saved.
Authorization
| Operation | Permission Required |
|---|---|
| List | Any (shows owned + shared) |
| View | view, edit, or owner |
| Create | Authenticated user |
| Update | edit or owner |
| Delete | owner only |
| Duplicate | view, edit, or owner |
