List Customers by Segment
GET/api/crm/segments/customers
Paginated list of the customers you can see with their segment, scores and order stats.
customers:readGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Authentication: Requires Bearer token with the customers scope.
The CRM activities feature must be switched on for the account; otherwise every CRM endpoint returns 404.
Customers covered: the active (not archived) customers you can see. Without permission to view all customers, that is only the customers whose default sales rep is your own sales rep (plus the reps in the sales rep groups you manage, with team access).
How segments are worked out: every active customer with at least one qualifying order (not a draft, not cancelled, at least one product line) gets three scores from 1 to 5, recalculated every night: recency (date of the last order), frequency (orders in the lookback window, 24 months by default, set in CRM Settings as rfm_lookback_months) and monetary (product-line revenue less discounts and credits in that window, base currency, excluding tax and shipping). Scores are quintiles across every customer in the account who has ordered, so customers with the same value share a score. The segment comes from the recency score and the rounded average of the frequency and monetary scores. Segment keys: champions, loyal, potential_loyalists, new_customers, promising, needs_attention, about_to_sleep, at_risk, cant_lose, hibernating, lost. A customer with no qualifying order has no segment.
Filters: filter[segment] (comma-separated segment keys), filter[sales_rep_id] (comma-separated ids, none = no rep), filter[moved_within_days] (only customers whose segment changed in the last N days), filter[search] (name, company, email, or exact id). Advanced filters with operator suffixes (for example filter[window_revenue.greater_than]=1000): customer, sales_rep, first_order_at, last_order_at, lifetime_orders, window_orders, window_revenue, average_order_value, recency_score, frequency_score, monetary_score.
Allowed sorts (prefix with - for descending): customer, sales_rep, segment, first_order_at, last_order_at, lifetime_orders, window_orders, window_revenue, average_order_value, recency_score, average_order_interval_days, segment_changed_on. Default: -window_revenue.
Pagination: page, per_page (1-200, default 25). An unknown filter or sort returns 400.
Requires the customers.index permission.
Request
Responses
- 200
- 400
- 401
- 403
- 429
OK
Response Headers
Bad Request
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.