Skip to main content
GET

Quick Answer

How do I get the members of a segment? Use this endpoint to retrieve the list of people in a segment, including their Minerva PIDs and when they were added.Common questions this endpoint answers:
  • How do I get all members in a segment?
  • How do I export a segment’s member list?
  • How do I see who’s in my segment?
  • How can I retrieve the people I added to a segment?
  • How do I list all contacts in a group?
  • How can I paginate through a large segment?
What you get back: List of Minerva PIDs with timestamps showing when each person was added to the segment. Results are paginated with 5,000 members per page.Common use cases:
  • Export segment membership for reporting or processing
  • Sync segment data to CRM or marketing platforms
  • Feed PIDs into enrichment or other workflows
  • Audit segment composition

Overview

The Segments Members endpoint retrieves the complete list of people in a segment with their membership metadata. Results are paginated with a fixed page size of 5,000 members per page, making it efficient to export large segments or process members in batches. What You Get:
  • Complete list of Minerva PIDs for all segment members
  • first_added_at timestamp showing when each person initially joined the segment
  • Pagination metadata to traverse large segments
  • Total member count across all pages

Headers

string
required
Your API key for authentication

Query Parameters

string
required
The UUID of the segment to retrieve members from (obtained from the segments/create endpoint). The segment must exist and belong to your organization.
integer
Page number for pagination, starting from 1 (not 0). Default is 1 if not specified. Each page returns up to 5,000 members (fixed limit).

Request Example

Response

Success Response

The API returns a paginated list of segment members with metadata.
string
Unique identifier for this API request, useful for debugging and support
object
Paginated results object containing the member list and pagination metadata
string
ISO 8601 timestamp (YYYY-MM-DDTHH:MM:SS.ffffffZ format) when the request completed

Results Object Structure

array
Array of member objects for the current page. Maximum 5,000 items per page. Empty array if the segment has no members or you’ve requested a page beyond the last one.
integer
Total number of members in the segment across all pages. This is the segment’s current_size and represents the complete membership count.
integer
The current page number being returned (1-indexed). Matches the page query parameter you provided.
boolean
Indicates whether more pages exist. true means you should request the next page to get additional members. false means this is the last page (or the only page).

Member Object Structure

Each item in the items array contains:
string
The Minerva person identifier for this segment member, in the format “p-”. Use this PID to enrich the person, retrieve their data, or remove them from the segment.
string
ISO 8601 timestamp showing when this person was first added to the segment. This timestamp is preserved even if the person is removed and re-added later, providing historical continuity.
Interpreting the Example:
  • Page 1 of 3 (12,500 total members ÷ 5,000 per page = 3 pages)
  • 3 members shown (truncated for readability; actual response would have up to 5,000)
  • list_continues: true indicates more pages exist (pages 2 and 3)
  • Members are ordered by first_added_at descending (most recent additions first)
Empty Segment Response:
Last Page Response:
  • Page 3 contains only 1 member (10,001 total = 5,000 + 5,000 + 1)
  • list_continues: false indicates this is the final page
Error responses include statusCode and body fields for backward compatibility with existing integrations. These are deprecated — prefer the HTTP status code and the top-level code / message / api_request_id fields directly. (The deprecated nested body still carries the legacy error_message.)

Pagination Guide

The endpoint uses a fixed page size of 5,000 members per page. To retrieve all members from a large segment: Algorithm:
  1. Start with page=1
  2. Process the items in the response
  3. Check the list_continues field
  4. If true, increment page and repeat; if false, you’re done
Python Example:
Pagination Calculation:
  • Total pages = ceil(total_count / 5000)
  • Current page range = [(page-1) * 5000 + 1, min(page * 5000, total_count)]
  • More pages exist = page * 5000 < total_count

Error Responses

The API returns standard HTTP status codes with descriptive error messages:
  • 400 - Bad Request: Missing segment_id query parameter
  • 401 - Unauthorized: Invalid or missing API key in x-api-key header
  • 404 - Not Found: Segment with the provided segment_id does not exist in your organization
  • 422 - Unprocessable Entity: Missing segment_id query parameter OR invalid page parameter (must be ≥ 1)
  • 429 - Too Many Requests: Rate limit exceeded
  • 500 - Internal Server Error: Unexpected server error occurred

Error Examples

Segment not found:
Missing segment_id:
Invalid page number:

Implementation Notes

  • API Version: Only v2 is supported. Using /v1/segments/members returns a 404 error.
  • HTTP Method: Only GET requests are accepted.
  • Page Size: Fixed at 5,000 members per page. This cannot be customized.
  • Page Indexing: Pages are 1-indexed (first page is page=1, not page=0).
  • Ordering: Members are sorted by first_added_at in descending order (most recent additions first).
  • Historical Timestamps: The first_added_at timestamp is preserved across remove/re-add cycles, maintaining historical accuracy.
  • Empty Segments: If a segment has no members, you’ll get items: [], total_count: 0, and list_continues: false.
  • Out-of-Range Pages: Requesting a page beyond the last page returns empty items with list_continues: false.

Performance Characteristics

  • Response Time: Typically 100-300ms per page
  • Consistency: The total_count is computed from the segment metadata table (current_size field), so it’s always accurate
  • Concurrency: Safe to paginate while other operations (add/remove members) are happening; you might see slightly inconsistent results across pages if the segment is being modified during pagination
  • Rate Limiting: Standard API rate limits apply

Common Integration Patterns

Pattern 1: Export to CSV