A EmailTemplate Resource
| Property | Value |
|---|---|
| Product | Services (pco.services, API version 2018-11-01) |
| Resource type | EmailTemplate |
| TypeScript | Services.EmailTemplate, attributes Services.EmailTemplateAttributes, schema Services.EmailTemplateSchema |
| Planning Center path | /services/v2/email_templates |
| Planning Center docs | EmailTemplate |
How to reach it
| Client path | Returns | Filters | Create |
|---|---|---|---|
pco.services.email_templates |
Collection | Yes |
From a collection, .id(emailTemplateId) addresses one EmailTemplate: pco.services.email_templates.id(emailTemplateId). Collections support where, include, order, and pagination; single resources have get().
Attributes
On Services.EmailTemplateAttributes. Every resource also has id and type ('EmailTemplate') next to its attributes.
| Name | Type | Description |
|---|---|---|
created_at |
string | null |
|
html_body |
string | null |
|
kind |
string | null |
|
subject |
string | null |
|
updated_at |
string | null |
Relationships and includes
Planning Center documents no includes for this resource.
| Relationship | Type | To | Includable |
|---|---|---|---|
template_owner |
To one | Organization | No |
Querying
No documented where fields.
No documented order fields.
Edges
This resource has no documented edges.
Writing
| Property | Value |
|---|---|
| Create | Yes, create() on pco.services.email_templates |
| Update | Yes, update() on a reference |
| Delete | Yes, delete() on a reference |
Create attributes
Typed as Services.EmailTemplateSchema['create'].
| Attribute | Type |
|---|---|
html_body |
string | null |
kind |
string | null |
shared |
unknown |
subject |
string | null |
Update attributes
Typed as Services.EmailTemplateSchema['update'].
| Attribute | Type |
|---|---|
html_body |
string | null |
subject |
string | null |
See Writing data.
Actions
Run with ref.action(name, body?). Bodies are untyped: see Planning Center’s docs for each action.
| Action | Path | Description |
|---|---|---|
render |
POST /services/v2/email_templates/{email_template_id}/render |
Render an email template and fill in the persons details |
Example
import type { Services } from '@mackenly/planningcenterkit';
const page = await pco.services.email_templates.perPage(25).list();
const items: Services.EmailTemplate[] = page.data;