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

const resend = new Resend('re_xxxxxxxxx');

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

// Get by contact email
const { data, error } = await resend.contacts.topics.list({
  email: 'steve.wozniak@gmail.com',
});
$resend = Resend::client('re_xxxxxxxxx');

// Get by contact id
$resend->contacts->topics->get('e169aa45-1ecf-4183-9955-b1499d5701d3');

// Get by contact email
$resend->contacts->topics->get('steve.wozniak@gmail.com');
import resend

resend.api_key = 're_xxxxxxxxx'

# Get by contact id
topics = resend.Contacts.Topics.list(contact_id='e169aa45-1ecf-4183-9955-b1499d5701d3')

# Get by contact email
topics = resend.Contacts.Topics.list(email='steve.wozniak@gmail.com')
require "resend"

Resend.api_key = "re_xxxxxxxxx"

# Get by contact id
contact_topics = Resend::Contacts::Topics.list(id: "e169aa45-1ecf-4183-9955-b1499d5701d3")

# Get by contact email
contact_topics = Resend::Contacts::Topics.list(id: "steve.wozniak@gmail.com")
package main

import (
	"context"
	"fmt"

	"github.com/resend/resend-go/v3"
)

func main() {
	ctx := context.TODO()
	client := resend.NewClient("re_xxxxxxxxx")

	// Get by contact id
	topics, err := client.Contacts.Topics.ListWithContext(ctx, &resend.ListContactTopicsRequest{
		ContactId: "e169aa45-1ecf-4183-9955-b1499d5701d3",
	})
	if err != nil {
		panic(err)
	}
	fmt.Println(topics)

	// Get by contact email
	topics, err = client.Contacts.Topics.ListWithContext(ctx, &resend.ListContactTopicsRequest{
		Email: "steve.wozniak@gmail.com",
	})
	if err != nil {
		panic(err)
	}
	fmt.Println(topics)
}
use resend_rs::{list_opts::ListOptions, Resend, Result};

#[tokio::main]
async fn main() -> Result<()> {
  let resend = Resend::new("re_xxxxxxxxx");

  let _topics = resend
    .contacts
    .get_contact_topics(
      "e169aa45-1ecf-4183-9955-b1499d5701d3",
      ListOptions::default(),
    )
    .await?;

  Ok(())
}
import com.resend.*;

public class Main {
  public static void main(String[] args) {
    Resend resend = new Resend("re_xxxxxxxxx");

    // Get by contact id
    resend.contacts().topics().list("e169aa45-1ecf-4183-9955-b1499d5701d3");

    // Get by contact email
    resend.contacts().topics().list("steve.wozniak@gmail.com");
  }
}
using Resend;

IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DI

var resp = await resend.ContactListTopicsAsync( new Guid( "e169aa45-1ecf-4183-9955-b1499d5701d3" ));
Console.WriteLine( "Nr Topics={0}", resp.Content.Data.Count );
// Get by contact id
curl -X GET 'https://api.resend.com/contacts/e169aa45-1ecf-4183-9955-b1499d5701d3/topics' \
     -H 'Authorization: Bearer re_xxxxxxxxx'

// Get by contact email
curl -X GET 'https://api.resend.com/contacts/steve.wozniak@gmail.com/topics' \
     -H 'Authorization: Bearer re_xxxxxxxxx'
# Get by contact id
resend contacts topics e169aa45-1ecf-4183-9955-b1499d5701d3

# Get by contact email
resend contacts topics steve.wozniak@gmail.com
{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "id": "b6d24b8e-af0b-4c3c-be0c-359bbd97381e",
      "name": "Product Updates",
      "description": "New features, and latest announcements.",
      "subscription": "opt_in"
    }
  ]
}

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.topics.list({
  id: 'e169aa45-1ecf-4183-9955-b1499d5701d3',
});

// Get by contact email
const { data, error } = await resend.contacts.topics.list({
  email: 'steve.wozniak@gmail.com',
});
$resend = Resend::client('re_xxxxxxxxx');

// Get by contact id
$resend->contacts->topics->get('e169aa45-1ecf-4183-9955-b1499d5701d3');

// Get by contact email
$resend->contacts->topics->get('steve.wozniak@gmail.com');
import resend

resend.api_key = 're_xxxxxxxxx'

# Get by contact id
topics = resend.Contacts.Topics.list(contact_id='e169aa45-1ecf-4183-9955-b1499d5701d3')

# Get by contact email
topics = resend.Contacts.Topics.list(email='steve.wozniak@gmail.com')
require "resend"

Resend.api_key = "re_xxxxxxxxx"

# Get by contact id
contact_topics = Resend::Contacts::Topics.list(id: "e169aa45-1ecf-4183-9955-b1499d5701d3")

# Get by contact email
contact_topics = Resend::Contacts::Topics.list(id: "steve.wozniak@gmail.com")
package main

import (
	"context"
	"fmt"

	"github.com/resend/resend-go/v3"
)

func main() {
	ctx := context.TODO()
	client := resend.NewClient("re_xxxxxxxxx")

	// Get by contact id
	topics, err := client.Contacts.Topics.ListWithContext(ctx, &resend.ListContactTopicsRequest{
		ContactId: "e169aa45-1ecf-4183-9955-b1499d5701d3",
	})
	if err != nil {
		panic(err)
	}
	fmt.Println(topics)

	// Get by contact email
	topics, err = client.Contacts.Topics.ListWithContext(ctx, &resend.ListContactTopicsRequest{
		Email: "steve.wozniak@gmail.com",
	})
	if err != nil {
		panic(err)
	}
	fmt.Println(topics)
}
use resend_rs::{list_opts::ListOptions, Resend, Result};

#[tokio::main]
async fn main() -> Result<()> {
  let resend = Resend::new("re_xxxxxxxxx");

  let _topics = resend
    .contacts
    .get_contact_topics(
      "e169aa45-1ecf-4183-9955-b1499d5701d3",
      ListOptions::default(),
    )
    .await?;

  Ok(())
}
import com.resend.*;

public class Main {
  public static void main(String[] args) {
    Resend resend = new Resend("re_xxxxxxxxx");

    // Get by contact id
    resend.contacts().topics().list("e169aa45-1ecf-4183-9955-b1499d5701d3");

    // Get by contact email
    resend.contacts().topics().list("steve.wozniak@gmail.com");
  }
}
using Resend;

IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DI

var resp = await resend.ContactListTopicsAsync( new Guid( "e169aa45-1ecf-4183-9955-b1499d5701d3" ));
Console.WriteLine( "Nr Topics={0}", resp.Content.Data.Count );
// Get by contact id
curl -X GET 'https://api.resend.com/contacts/e169aa45-1ecf-4183-9955-b1499d5701d3/topics' \
     -H 'Authorization: Bearer re_xxxxxxxxx'

// Get by contact email
curl -X GET 'https://api.resend.com/contacts/steve.wozniak@gmail.com/topics' \
     -H 'Authorization: Bearer re_xxxxxxxxx'
# Get by contact id
resend contacts topics e169aa45-1ecf-4183-9955-b1499d5701d3

# Get by contact email
resend contacts topics steve.wozniak@gmail.com
{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "id": "b6d24b8e-af0b-4c3c-be0c-359bbd97381e",
      "name": "Product Updates",
      "description": "New features, and latest announcements.",
      "subscription": "opt_in"
    }
  ]
}