Templates

Create and manage Templates through the Resend API.

Operations

MethodEndpointDescription
GET/templatesRetrieve a list of templates
POST/templatesCreate a template
GET/templates/{id}Retrieve a single template
PATCH/templates/{id}Update an existing template
DELETE/templates/{id}Remove an existing template
POST/templates/{id}/publishPublish a template
POST/templates/{id}/duplicateDuplicate a template

Example

Retrieve a list of templates, 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.templates.list();
console.log(result);
Nine more languages

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