> For the complete documentation index, see [llms.txt](https://user.netmera.com/netmera-developer-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/segments-and-targeting/list-segment-users.md). Agents can also search and read this documentation through its [MCP server](https://user.netmera.com/netmera-developer-guide/~gitbook/mcp).

# List Segment Users

Returns the users in a segment, one page at a time. Pass the segment ID in the `id` query parameter.

#### How it works

Set the page size with `max`: at least and by default 100, at most 1000. When more users are available, the response carries a `nextPage` URL whose `offset` is an opaque token. Call that URL to fetch the next page.

<details>

<summary>Notes</summary>

* Works for `STANDARD` segments.
* For `CONNECTORS_SEGMENT` segments (created by connector integrations such as Mixpanel), the call returns HTTP 400, code `2001`, "An unexpected error occurred. Retry later.".
* The `X-netmera-os` header is not read by the server and has no effect.

</details>

```json
{"openapi":"3.1.0","info":{"title":"Netmera REST API","version":"3.0"},"tags":[{"name":"Segments and Targeting","description":"List and manage segments, read their users, and count how many users a target reaches before you\nsend.\n\n<table data-view=\"cards\"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type=\"content-ref\"></th></tr></thead><tbody><tr><td><strong>List Segments</strong></td><td><code>GET</code> Lists the segments defined in the panel.</td><td><a href=\"https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/segments-and-targeting/list-segments\">List Segments</a></td></tr><tr><td><strong>Get Segment</strong></td><td><code>GET</code> Returns the status and the user count of a segment.</td><td><a href=\"https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/segments-and-targeting/get-segment\">Get Segment</a></td></tr><tr><td><strong>List Segment Users</strong></td><td><code>GET</code> Returns the users in a segment, one page at a time.</td><td><a href=\"https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/segments-and-targeting/list-segment-users\">List Segment Users</a></td></tr><tr><td><strong>Create Segment</strong></td><td><code>POST</code> Creates a standard (condition-based) segment.</td><td><a href=\"https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/segments-and-targeting/create-segment\">Create Segment</a></td></tr><tr><td><strong>Update Segment</strong></td><td><code>POST</code> Replaces the conditions of a segment and calculates it again.</td><td><a href=\"https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/segments-and-targeting/update-segment\">Update Segment</a></td></tr><tr><td><strong>Change Segment Status</strong></td><td><code>POST</code> Deletes a segment, or reopens a deleted one.</td><td><a href=\"https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/segments-and-targeting/change-segment-status\">Change Segment Status</a></td></tr><tr><td><strong>Count Targeted Users</strong></td><td><code>POST</code> Returns the number of unique users who match a targeting query.</td><td><a href=\"https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/segments-and-targeting/count-targeted-users\">Count Targeted Users</a></td></tr><tr><td><strong>Count Users per Attribute Value</strong></td><td><code>POST</code> Returns the distinct user count for every value of one profile or installation attribute in a single request.</td><td><a href=\"https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/segments-and-targeting/count-users-per-attribute-value\">Count Users per Attribute Value</a></td></tr><tr><td><strong>Count Users with Push Permission</strong></td><td><code>GET</code> Returns the number of users in your application who currently have push permission.</td><td><a href=\"https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/segments-and-targeting/count-users-with-push-permission\">Count Users with Push Permission</a></td></tr></tbody></table>\n"}],"servers":[{"url":"https://restapi.netmera.com","description":"Netmera REST API"}],"security":[{"REST-API-key":[]}],"components":{"securitySchemes":{"REST-API-key":{"type":"apiKey","in":"header","name":"X-netmera-api-key","description":"REST API key. Available in the Netmera Panel under Developers > API.\n"}},"schemas":{"NetmeraError":{"type":"object","description":"Standard Netmera error body.","required":["code","error"],"properties":{"code":{"type":"integer","description":"Netmera error code. See the error table in the API description."},"error":{"type":"string","description":"Human readable error message."}}},"ProblemDetail":{"type":"object","description":"RFC 7807 error body returned by the framework instead of the Netmera error body when a\nrequired query parameter is missing or a parameter cannot be converted to its type.\n","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}}}},"responses":{"InvalidApiKey":{"description":"The `X-netmera-api-key` header is missing or the key is not valid.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetmeraError"}}}},"IpNotAllowed":{"description":"The application restricts REST calls to a list of allowed IP addresses and the caller's\nIP is not on it. The check runs after the API key is validated and before the request\nbody and parameters are validated, so a restricted application returns this error even\nfor a malformed request.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetmeraError"}}}}}},"paths":{"/rest/3.0/getSegmentUsers":{"get":{"operationId":"getSegmentUsers","tags":["Segments and Targeting"],"summary":"List Segment Users","description":"Returns the users in a segment, one page at a time. Pass the segment ID in the `id` query parameter.\n\n### How it works\n\nSet the page size with `max`: at least and by default 100, at most 1000. When more users are\navailable, the response carries a `nextPage` URL whose `offset` is an opaque token. Call that URL to\nfetch the next page.\n\n<details>\n\n<summary>Notes</summary>\n\n- Works for `STANDARD` segments.\n- For `CONNECTORS_SEGMENT` segments (created by connector integrations such as Mixpanel), the call\n  returns HTTP 400, code `2001`, \"An unexpected error occurred. Retry later.\".\n- The `X-netmera-os` header is not read by the server and has no effect.\n\n</details>\n","parameters":[{"name":"id","in":"query","required":true,"description":"Segment ID (integer). An unknown ID returns HTTP 400 with code `5042`.","schema":{"type":"integer"}},{"name":"X-netmera-os","in":"header","required":false,"description":"Platform header (IOS or ANDROID). Not read by the server for this endpoint (only\nlogged); it can be omitted.\n","schema":{"type":"string"}},{"name":"max","in":"query","required":false,"description":"Page size: default and minimum 100, at most 1000. A value above 1000 returns HTTP 400, code\n`2009`.\n","schema":{"type":"integer","default":100,"maximum":1000}},{"name":"offset","in":"query","required":false,"description":"Opaque paging token taken from the `nextPage` URL of the previous response. Do not\nbuild it yourself; an invalid token returns HTTP 400 with code `2001`.\n","schema":{"type":"string"}}],"responses":{"200":{"description":"The users in the segment.","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Segment name."},"nextPage":{"type":"string","description":"URL of the next page, present only when more users may be available.\n"},"list":{"type":"array","items":{"type":"object","properties":{"externalId":{"type":"string"},"msisdn":{"type":"string"},"email":{"type":"string"}}}}}}}}},"400":{"description":"Unknown segment, unsupported segment type or missing id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetmeraError"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"$ref":"#/components/responses/InvalidApiKey"},"403":{"$ref":"#/components/responses/IpNotAllowed"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/segments-and-targeting/list-segment-users.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
