> 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.md). Agents can also search and read this documentation through its [MCP server](https://user.netmera.com/netmera-developer-guide/~gitbook/mcp).

# Segments and Targeting

List and manage segments, read their users, and count how many users a target reaches before you send.

<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">https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/segments-and-targeting/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">https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/segments-and-targeting/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">https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/segments-and-targeting/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">https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/segments-and-targeting/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">https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/segments-and-targeting/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">https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/segments-and-targeting/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">https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/segments-and-targeting/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">https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/segments-and-targeting/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">https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/segments-and-targeting/count-users-with-push-permission</a></td></tr></tbody></table>


---

# 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.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.
