Authenticate by adding a header Authorization: Klaviyo-API-Key YOUR_KEY and a revision header matching the current API version to every request.
Send GET /api/segments/{segment_id}/profiles/ to retrieve the first page of profiles; the default page size is 20 and the maximum is 100 — set page[size]=100 to minimize round trips.
Inspect the response for a links.next value; if present, follow that cursor URL to retrieve the next page.
Continue following links.next until it is absent, collecting profiles from each page's data array.
If you need full profile attributes (e.g., email, custom properties), use the fields[profile] query parameter to specify which fields to include and avoid over-fetching.
Known gotchas
The page[size] parameter maximum is 100; requests above this ceiling will be rejected with a 400 error.
Segment membership is computed asynchronously — profiles added very recently may not appear immediately in the API response.
The segment ID in the path is the Klaviyo internal UUID, not the segment name; retrieve it first from GET /api/segments/.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp