# Featureflip User Segments API

**Canonical:** https://apis.io/apis/featureflip/featureflip-user-segments-api/  
**Provider:** Featureflip — https://apis.io/providers/featureflip/  
**Base URL:** https://api.featureflip.io  
**Documentation:** https://featureflip.io/docs/management-api/overview/

Featureflip User Segments API is one of 10 APIs that [Featureflip](https://apis.io/providers/featureflip/) publishes on the [APIs.io](https://apis.io/) network, described by a machine-readable OpenAPI specification. Tagged areas include User Segments. The published artifact set on APIs.io includes an OpenAPI specification, an API reference, and API documentation.

User segments within a resolved organization + project — mirrors EnvironmentsController's resolve-then-dispatch shape one level deeper. `{project}` is resolved key-or-guid, scoped to the resolved org (with the service-token project allowlist forwarded), via ResolveProjectIdAsync for every action. `{segment}` (get/update/delete) is then resolved key-or-guid, scoped to the resolved project, via ResolveSegmentIdAsync. Dispatched commands/queries always use the resolved GUIDs, never the raw route strings. Writes (create/update/delete) require at least Member (RequireRole); a Viewer attempting one gets a 403 `forbidden` envelope. There is no `GetUserSegmentQuery` — Get resolves `{segment}` then dispatches ListUserSegmentsQuery and finds the match in-memory, throwing NotFoundException if absent. This keeps the task scoped to the public layer with no new Application handler: the resolver has already validated the id exists within the project, and a project's segment set is bounded (unlike flags/environments' own list, this never needs true server-side pagination for the lookup). Operator is a bare string on the wire; write actions parse it to OperatorType via TryParse``1(ReadOnlySpan{Char},Boolean,``0@) (case-insensitive). An unrecognized value throws the custom ValidationException BEFORE any command is dispatched — mapped to a 400 `validation_failed` envelope by PublicApiExceptionFilterAttribute, same as every other handler-thrown validation failure on this surface.

## Operations (5)

| Method | Path | Summary |
|---|---|---|
| POST | `/api/v1/orgs/{org}/projects/{project}/segments` | Creates a user segment in the resolved project |
| GET | `/api/v1/orgs/{org}/projects/{project}/segments` | Lists user segments in the resolved project, cursor-paginated |
| GET | `/api/v1/orgs/{org}/projects/{project}/segments/{segment}` | Gets a user segment in the resolved project by key or id |
| PUT | `/api/v1/orgs/{org}/projects/{project}/segments/{segment}` | Updates a segment's name/description/conditions |
| DELETE | `/api/v1/orgs/{org}/projects/{project}/segments/{segment}` | Deletes a user segment |

## Machine-readable artifacts (7)

- **OpenAPI** — https://raw.githubusercontent.com/api-evangelist/featureflip/refs/heads/main/openapi/featureflip-user-segments-api-openapi.yml
- **APIReference** — https://featureflip.io/docs/management-api/reference/
- **Documentation** — https://featureflip.io/docs/management-api/reference/
- **Documentation** — https://featureflip.io/docs/management-api/authentication/
- **LLMsTxt** — https://featureflip.io/llms.txt
- **APIReference** — https://featureflip.io/docs/api/reference/
- **Documentation** — https://featureflip.io/docs/api/reference/

## Other Featureflip APIs (9)

- [MCP Server (local)](https://apis.io/apis/featureflip/mcp-server-local/)
- [Featureflip Client SDK API](https://apis.io/apis/featureflip/featureflip-client-sdk-api/)
- [Featureflip Environments API](https://apis.io/apis/featureflip/featureflip-environments-api/)
- [Featureflip Feature Flags API](https://apis.io/apis/featureflip/featureflip-feature-flags-api/)
- [Featureflip Me API](https://apis.io/apis/featureflip/featureflip-me-api/)
- [Featureflip Organizations API](https://apis.io/apis/featureflip/featureflip-organizations-api/)
- [Featureflip Projects API](https://apis.io/apis/featureflip/featureflip-projects-api/)
- [Featureflip SDK Keys API](https://apis.io/apis/featureflip/featureflip-sdk-keys-api/)
- [Featureflip Server SDK API](https://apis.io/apis/featureflip/featureflip-server-sdk-api/)

## Tags

User Segments

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/featureflip/featureflip-user-segments-api/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/featureflip/.
