Skip to Content

Email

Manage email templates, senders, domains, and track delivery events.

Templates

OperationGraphQL
List templatesemail_templates(where: {organization_id: {_eq: $orgId}, application_id: {_eq: $appId}, is_active: {_eq: true}}, order_by: {created_at: desc})
Get templateemail_templates_by_pk(id: $templateId)
Create templateBuilderEmailTemplateCreate(input: {applicationId, name, subject, body_html, body_text, variables, is_active}) — applicationId is required in the input. HTML is sanitized server-side.
Update templateBuilderEmailTemplateUpdate(input: {applicationId, templateId, name, subject, body_html, ...}) — HTML is sanitized server-side.
Delete templatedelete_email_templates_by_pk(id: $templateId)
Template statsemail_template_stats(where: {organization_id: {_eq: $orgId}}, order_by: {total_sent: desc}) (view)

Senders

OperationGraphQL
List sendersemail_senders(where: {organization_id: {_eq: $orgId}}, order_by: {created_at: desc})
Get senderemail_senders_by_pk(id: $senderId)
Create senderinsert_email_senders_one(object: {organization_id, name, from_email, from_name, reply_to_email, provider, provider_config, ...})
Update senderupdate_email_senders_by_pk(pk_columns: {id: $senderId}, _set: {name, from_email, ...})
Delete senderdelete_email_senders_by_pk(id: $senderId)

Domains

OperationGraphQL
List domainsemail_domains(where: {organization_id: {_eq: $orgId}}, order_by: {created_at: desc})
Create domaininsert_email_domains_one(object: {organization_id, domain, mode, ses_region, applies_to_all_apps, ...})
Update domainupdate_email_domains_by_pk(pk_columns: {id: $id}, _set: {applies_to_all_apps, notes, ...})
Delete domaindelete_email_domains_by_pk(id: $id)
Add domain appsinsert_email_domain_applications(objects: [{domain_id, application_id}, ...])
Remove domain appsdelete_email_domain_applications(where: {domain_id: {_eq: $domainId}, application_id: {_in: $appIds}})

Events

OperationGraphQL
List eventsemail_events(where: {organization_id: {_eq: $orgId}}, limit: $limit, offset: $offset, order_by: {created_at: desc})
Create eventinsert_email_events_one(object: {organization_id, template_id, to_email, from_email, subject, status, provider, ...})
Update event statusupdate_email_events_by_pk(pk_columns: {id: $eventId}, _set: {status, delivered_at, opened_at, ...})
Last updated on