Noketa Docs

Emails API

Send emails with Noketa

Use client.emails.send to send an email through Noketa.

Method Signature

client.emails.send(payload: SendEmailRequest): Promise<SendEmailResponse>

Request Shape

type SendEmailRequest = {
  from: string;
  to: string;
  subject: string;
  html: string;
};

Example

import { Noketa } from "noketa";

const client = new Noketa(process.env.NOKETA_API_KEY!);

const response = await client.emails.send({
  from: "noreply@yourdomain.com",
  to: "person@example.com",
  subject: "Welcome to Noketa",
  html: "<h1>Welcome</h1><p>Thanks for signing up.</p>",
});

Notes

  • html should be a complete or partial HTML email body string.
  • API errors are surfaced as thrown Error instances.