Skip to main content
GET
/
contacts
/
:id
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

// Get by contact id
const { data, error } = await resend.contacts.get({
  id: 'e169aa45-1ecf-4183-9955-b1499d5701d3',
});

// Get by contact email
const { data, error } = await resend.contacts.get({
  email: 'steve.wozniak@gmail.com',
});
{
  "object": "contact",
  "id": "e169aa45-1ecf-4183-9955-b1499d5701d3",
  "email": "steve.wozniak@gmail.com",
  "first_name": "Steve",
  "last_name": "Wozniak",
  "created_at": "2023-10-06T23:47:56.678Z",
  "unsubscribed": false,
  "properties": {
    "company_name": "Acme Corp",
    "department": "Engineering"
  }
}

Path Parameters

Either id or email must be provided.
id
string
The Contact ID.
email
string
The Contact Email.
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

// Get by contact id
const { data, error } = await resend.contacts.get({
  id: 'e169aa45-1ecf-4183-9955-b1499d5701d3',
});

// Get by contact email
const { data, error } = await resend.contacts.get({
  email: 'steve.wozniak@gmail.com',
});
{
  "object": "contact",
  "id": "e169aa45-1ecf-4183-9955-b1499d5701d3",
  "email": "steve.wozniak@gmail.com",
  "first_name": "Steve",
  "last_name": "Wozniak",
  "created_at": "2023-10-06T23:47:56.678Z",
  "unsubscribed": false,
  "properties": {
    "company_name": "Acme Corp",
    "department": "Engineering"
  }
}