Emails

Start sending emails through the Resend API.

Operations

MethodEndpointDescription
GET/emailsRetrieve a list of emails
POST/emailsSend an email
GET/emails/{email_id}Retrieve a single email
PATCH/emails/{email_id}Update a single email
POST/emails/{email_id}/cancelCancel the schedule of the e-mail.
POST/emails/{email_id}/shareCreate a shareable link for a sent or received email.
POST/emails/batchTrigger up to 100 batch emails at once.
GET/emails/{email_id}/attachmentsRetrieve a list of attachments for a sent email
GET/emails/{email_id}/attachments/{attachment_id}Retrieve a single attachment for a sent email
GET/emails/metricsRetrieve account-level email metrics

Example

Retrieve a list of emails, with the TypeScript SDK:

ts
import { Resend } from "@octridev/resend";

const client = new Resend({
  // Optional: replaces the default server and any server an operation declares.
  baseUrl: "https://api.resend.com",
  auth: { bearerAuth: process.env.API_TOKEN! },
});

const result = await client.emails.list();
console.log(result);
Nine more languages

The same call exists in every SDK. See SDKs for the other nine.