Contacts

Create and manage Contacts through the Resend API.

Operations

MethodEndpointDescription
GET/contactsRetrieve a list of contacts
POST/contactsCreate a new contact
GET/contacts/importsRetrieve a list of contact imports
POST/contacts/importsCreate a contact import
GET/contacts/imports/{id}Retrieve a single contact import
GET/contacts/{id}Retrieve a single contact by ID or email
PATCH/contacts/{id}Update a single contact by ID or email
DELETE/contacts/{id}Remove an existing contact by ID or email
GET/contacts/{contact_id}/segmentsRetrieve a list of segments for a contact
POST/contacts/{contact_id}/segments/{segment_id}Add a contact to a segment
DELETE/contacts/{contact_id}/segments/{segment_id}Remove a contact from a segment
GET/contacts/{contact_id}/topicsRetrieve topics for a contact
PATCH/contacts/{contact_id}/topicsUpdate topics for a contact

Example

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

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