Manages message templates with append-only versioning. Templates define the content delivered to campaign recipients.
| Method | Description |
|---|
CreateTemplate | Create a new template |
UpdateTemplate | Update a template (creates new version) |
GetTemplate | Get a template by ID |
ListTemplates | List templates for the organization |
Create a new template (version 1).
Authorization: Requires MANAGE_TEMPLATES permission
| Field | Type | Description |
|---|
name | string | Template name. Max 200 characters. |
body | string | Markdown template content. Max 100,000 characters. |
type | TemplateType | Template type (PUSH, REMINDER, GENERAL). |
variables | TemplateVariable[] | Variable definitions. |
| Field | Type | Description |
|---|
template | Template | The created template (version 1). |
TypeScript (Connect-Web)
const response = await templateClient.createTemplate({
body: "# Security Update\n\nHi {{name}},\n\nPlease review...",
{ name: "name", source: TemplateVariableSource.AUDIENCE },
Go (gRPC)
resp, err := templateClient.CreateTemplate(ctx, &pidgrv1.CreateTemplateRequest{
Body: "# Security Update\n\nHi {{name}},\n\nPlease review...",
Type: pidgrv1.TemplateType_PUSH,
Variables: []*pidgrv1.TemplateVariable{
{Name: "name", Source: pidgrv1.TemplateVariableSource_AUDIENCE},
Update a template. Creates a new version — previous versions are preserved.
Authorization: Requires MANAGE_TEMPLATES permission
| Field | Type | Description |
|---|
id | string | Template ID. |
body | string | Updated Markdown content. |
variables | TemplateVariable[] | Updated variable definitions. |
| Field | Type | Description |
|---|
template | Template | The updated template with incremented version. |
Authorization: Requires VIEW_TEMPLATES permission
| Field | Type | Description |
|---|
id | string | Template ID. |
version | int32 | Specific version to retrieve. 0 returns latest. |
| Field | Type | Description |
|---|
template | Template | The template. |
Authorization: Requires VIEW_TEMPLATES permission
| Field | Type | Description |
|---|
pagination | Pagination | Pagination parameters. |
| Field | Type | Description |
|---|
templates | Template[] | List of templates (latest versions). |
pagination | PaginationMeta | Pagination metadata. |
| Field | Type | Description |
|---|
id | string | Unique identifier. |
name | string | Template name. |
body | string | Markdown content. |
version | int32 | Current version number. |
type | TemplateType | Template type. |
variables | TemplateVariable[] | Variable definitions. |
created_at | Timestamp | Creation timestamp. |
updated_at | Timestamp | Last update timestamp. |
| Field | Type | Description |
|---|
name | string | Variable name (used in {{name}} syntax). |
source | TemplateVariableSource | Where the variable value comes from. |
| Value | Description |
|---|
PUSH | Push notification template |
REMINDER | Reminder template |
GENERAL | General-purpose template |
| Value | Description |
|---|
AUDIENCE | Per-user value from campaign audience |
CUSTOM | Step-level value from workflow config |