Emails & templates
Send templated transactional email in any enabled locale, batch sends, and inspect the templates your workspace defines.


On this page
Quick example
Type-checked against @medalsocial/sdk v1.3.0 (2026-07-20). A release that changes a signature fails this page's build.
ts
import { Medal } from '@medalsocial/sdk';
const medal = new Medal(process.env.MEDAL_API_KEY as string);
// Send a templated email (locale falls back automatically)
const { data: send } = await medal.emails.send({
template_slug: 'welcome',
to: 'nora@solsticecoffee.no',
name: 'Nora',
locale: 'nb',
variables: { first_name: 'Nora' },
});
// Check delivery status
const { data: status } = await medal.emails.get(send.id);
console.log(status.status);
// List available templates
const { data: templates } = await medal.emails.templates.list();
console.log(templates.map((t) => t.slug));medal.emails.send()
Send a transactional email using a template. Returns a queued job ID (HTTP 202).
ts
send(input: SendEmailInput): Promise<ApiResponse<EmailSendResult>>Added in v1.0.0
medal.emails.get()
Get the delivery status of a sent email.
ts
get(id: string): Promise<ApiResponse<EmailSend>>Added in v1.0.0
medal.emails.batch()
Send the same template to multiple recipients (max 100). Returns HTTP 202.
ts
batch(input: BatchSendInput): Promise<ApiResponse<BatchSendSummary>>Added in v1.0.0
medal.emails.templates.list()
List all active email templates in the workspace.
ts
list(): Promise<ApiResponse<EmailTemplate[]>>Added in v1.0.0
medal.emails.templates.get()
Get a specific email template by slug, optionally with locale resolution.
ts
get(slug: string, options?: GetTemplateOptions): Promise<ApiResponse<EmailTemplateDetail>>Added in v1.0.0