Manage email templates, senders, domains, and track delivery events.
Templates
| Operation | GraphQL |
|---|---|
| List templates | email_templates(where: {organization_id: {_eq: $orgId}, application_id: {_eq: $appId}, is_active: {_eq: true}}, order_by: {created_at: desc}) |
| Get template | email_templates_by_pk(id: $templateId) |
| Create template | BuilderEmailTemplateCreate(input: {applicationId, name, subject, body_html, body_text, variables, is_active}) — applicationId is required in the input. HTML is sanitized server-side. |
| Update template | BuilderEmailTemplateUpdate(input: {applicationId, templateId, name, subject, body_html, ...}) — HTML is sanitized server-side. |
| Delete template | delete_email_templates_by_pk(id: $templateId) |
| Template stats | email_template_stats(where: {organization_id: {_eq: $orgId}}, order_by: {total_sent: desc}) (view) |
Senders
| Operation | GraphQL |
|---|---|
| List senders | email_senders(where: {organization_id: {_eq: $orgId}}, order_by: {created_at: desc}) |
| Get sender | email_senders_by_pk(id: $senderId) |
| Create sender | insert_email_senders_one(object: {organization_id, name, from_email, from_name, reply_to_email, provider, provider_config, ...}) |
| Update sender | update_email_senders_by_pk(pk_columns: {id: $senderId}, _set: {name, from_email, ...}) |
| Delete sender | delete_email_senders_by_pk(id: $senderId) |
Domains
| Operation | GraphQL |
|---|---|
| List domains | email_domains(where: {organization_id: {_eq: $orgId}}, order_by: {created_at: desc}) |
| Create domain | insert_email_domains_one(object: {organization_id, domain, mode, ses_region, applies_to_all_apps, ...}) |
| Update domain | update_email_domains_by_pk(pk_columns: {id: $id}, _set: {applies_to_all_apps, notes, ...}) |
| Delete domain | delete_email_domains_by_pk(id: $id) |
| Add domain apps | insert_email_domain_applications(objects: [{domain_id, application_id}, ...]) |
| Remove domain apps | delete_email_domain_applications(where: {domain_id: {_eq: $domainId}, application_id: {_in: $appIds}}) |
Events
| Operation | GraphQL |
|---|---|
| List events | email_events(where: {organization_id: {_eq: $orgId}}, limit: $limit, offset: $offset, order_by: {created_at: desc}) |
| Create event | insert_email_events_one(object: {organization_id, template_id, to_email, from_email, subject, status, provider, ...}) |
| Update event status | update_email_events_by_pk(pk_columns: {id: $eventId}, _set: {status, delivered_at, opened_at, ...}) |
Last updated on