List Contact Segments

List all segments that a contact belongs to, with cursor-based pagination.

GET/contacts/{contact_id_or_email}/segments

Requires a full_access API key.

Path Parameters

contact_id_or_emailstringrequired

The contact ID (UUID) or email address.

Query Parameters

limitnumber

Maximum number of results to return. Min 1, max 100. Default 100.

afterstring

Cursor for forward pagination (segment ID).

beforestring

Cursor for backward pagination (segment ID).

Response Fields

objectstring

Always "list".

has_moreboolean

Whether there are more results available.

dataarray

Array of segment objects. Each item contains id, name, and created_at.

curl -X GET 'https://api.postflare.app/contacts/e169aa45-1ecf-4183-9955-b1499d5701d3/segments' \
  -H 'Authorization: Bearer re_xxxxxxxxx'
const response = await fetch(
  'https://api.postflare.app/contacts/e169aa45-1ecf-4183-9955-b1499d5701d3/segments',
  {
    headers: {
      'Authorization': 'Bearer re_xxxxxxxxx',
    },
  }
);

const data = await response.json();

Response

Response
{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "name": "Newsletter Subscribers",
      "created_at": "2026-01-01T00:00:00.000Z"
    }
  ]
}