# segmentMembers

query · in the family [Reading your records](/reference/reading-your-records/)

## What it does

One segment’s member list, in shopper-id order.

One segment's members, consumerId-ordered, born-paginated (limit defaults 50, clamps 1..100; walk until nextToken is null). The segment must exist in YOUR org group. Requires authentication.

## What happens

Read-only.

## Who may call it

Capability area: **Reading your records** — Looking up and listing the records of your organization.

- Owner
- System Administrator
- Manager
- Associate Manager
- Warehouse Associate
- Sales Associate
- An API key whose scope allows `api:segmentMembers`

## Arguments

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `segmentId` | [ID](/types/#scalars) `ID!` | yes | No further notes. |
| `limit` | [Int](/types/#scalars) | no | How many records to answer at most; a page may hold fewer. |
| `nextToken` | [String](/types/#scalars) | no | The cursor from the previous page, passed back exactly as received. |

## Returns

[SegmentMemberPage](/types/SegmentMemberPage/) `SegmentMemberPage!` — One page of a segment's members (consumerId order; walk until nextToken is null).

This is a page: `items` holds the records and `nextToken` the cursor for the next page — pass it back verbatim until it is null. See [paging](/guides/paging-and-the-cursor-grammar/).

## Example request

```graphql
query ExampleSegmentMembers($segmentId: ID!, $limit: Int) {
  segmentMembers(segmentId: $segmentId, limit: $limit) {
    items {
      id
      consumerId
      createdAt
    }
    nextToken
  }
}
```

Variables:

```json
{
  "segmentId": "01900000-0000-7000-8000-243b225b0000",
  "limit": 1
}
```

## Example response

```json
{
  "data": {
    "segmentMembers": {
      "items": [
        {
          "id": "01900000-0000-7000-8000-37386ae00000",
          "consumerId": "01900000-0000-7000-8000-6e8c92ec0000",
          "createdAt": "2027-01-31T00:00:00.000Z"
        }
      ],
      "nextToken": "<the cursor from the previous page>"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```

## Errors this call can answer

- `VALIDATION/INVALID` — Something in the request is not valid. ([VALIDATION](/errors/VALIDATION/))
- `AUTHN/REQUIRED` — Sign in to do this. ([AUTHN](/errors/AUTHN/))
- `AUTHZ/FORBIDDEN` — Your role does not allow this action. ([AUTHZ](/errors/AUTHZ/))
- `RATE_LIMIT/THROTTLED` — Too many requests in a short time. ([RATE_LIMIT](/errors/RATE_LIMIT/))
- `NOT_FOUND/*` — That record could not be found. ([NOT_FOUND](/errors/NOT_FOUND/))
