Skip to main content
Resend Docs

Search documentation

Type to search this documentation.

On this pageOverview

List Segment Contacts

GET

/

segments

/

:segment_id

/

contacts

Node.js
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.contacts.list({
  segmentId: '78261eea-8f8b-4381-83c6-79fa7120f1cf',
});
PHP
$resend = Resend::client('re_xxxxxxxxx');

$resend->contacts->list([
  'segment_id' => '78261eea-8f8b-4381-83c6-79fa7120f1cf',
]);
Python
import resend

resend.api_key = 're_xxxxxxxxx'

contacts = resend.Contacts.list(segment_id='78261eea-8f8b-4381-83c6-79fa7120f1cf')
Ruby
require 'resend'

Resend.api_key = 're_xxxxxxxxx'

contacts = Resend::Contacts.list(segment_id: '78261eea-8f8b-4381-83c6-79fa7120f1cf')
Go
package main

import (
	"context"
	"fmt"

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

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

	contacts, err := client.Contacts.ListWithContext(ctx, &resend.ListContactsOptions{
		SegmentId: "78261eea-8f8b-4381-83c6-79fa7120f1cf",
	})
	if err != nil {
		panic(err)
	}
	fmt.Println(contacts)
}
Java
import com.resend.Resend;
import com.resend.core.exception.ResendException;
import com.resend.services.contacts.model.ListContactsResponseSuccess;

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

        ListContactsResponseSuccess response = resend.contacts().list("78261eea-8f8b-4381-83c6-79fa7120f1cf");
    }
}
cURL
curl -X GET 'https://api.resend.com/segments/78261eea-8f8b-4381-83c6-79fa7120f1cf/contacts' \
     -H 'Authorization: Bearer re_xxxxxxxxx'
CLI
resend segments contacts 78261eea-8f8b-4381-83c6-79fa7120f1cf
Response
{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "id": "e169aa45-1ecf-4183-9955-b1499d5701d3",
      "email": "steve.wozniak@gmail.com",
      "first_name": "Steve",
      "last_name": "Wozniak",
      "created_at": "2026-10-06 23:47:56.678+00",
      "unsubscribed": false
    }
  ]
}
Node.js
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.contacts.list({
  segmentId: '78261eea-8f8b-4381-83c6-79fa7120f1cf',
});
PHP
$resend = Resend::client('re_xxxxxxxxx');

$resend->contacts->list([
  'segment_id' => '78261eea-8f8b-4381-83c6-79fa7120f1cf',
]);
Python
import resend

resend.api_key = 're_xxxxxxxxx'

contacts = resend.Contacts.list(segment_id='78261eea-8f8b-4381-83c6-79fa7120f1cf')
Ruby
require 'resend'

Resend.api_key = 're_xxxxxxxxx'

contacts = Resend::Contacts.list(segment_id: '78261eea-8f8b-4381-83c6-79fa7120f1cf')
Go
package main

import (
	"context"
	"fmt"

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

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

	contacts, err := client.Contacts.ListWithContext(ctx, &resend.ListContactsOptions{
		SegmentId: "78261eea-8f8b-4381-83c6-79fa7120f1cf",
	})
	if err != nil {
		panic(err)
	}
	fmt.Println(contacts)
}
Java
import com.resend.Resend;
import com.resend.core.exception.ResendException;
import com.resend.services.contacts.model.ListContactsResponseSuccess;

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

        ListContactsResponseSuccess response = resend.contacts().list("78261eea-8f8b-4381-83c6-79fa7120f1cf");
    }
}
cURL
curl -X GET 'https://api.resend.com/segments/78261eea-8f8b-4381-83c6-79fa7120f1cf/contacts' \
     -H 'Authorization: Bearer re_xxxxxxxxx'
CLI
resend segments contacts 78261eea-8f8b-4381-83c6-79fa7120f1cf
JSON
{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "id": "e169aa45-1ecf-4183-9955-b1499d5701d3",
      "email": "steve.wozniak@gmail.com",
      "first_name": "Steve",
      "last_name": "Wozniak",
      "created_at": "2026-10-06 23:47:56.678+00",
      "unsubscribed": false
    }
  ]
}

Was this page helpful?

⌘I

Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu