Featureflip User Segments API

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.

GitHub OpenAPI
Business capability
Feature Flag Management BC-4210.50

Operations 5

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 #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/featureflip:featureflip-user-segments-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

featureflip-user-segments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Management User Segments API
  description: 'Programmatic access to Featureflip — projects, environments, feature flags, variations, targeting, segments, and SDK keys. Authenticate with a Personal Access Token or Service Token via the Authorization: Bearer header.'
  version: v1
servers:
- url: https://api.featureflip.io
  description: Production
security:
- Bearer: []
tags:


# --- truncated at 32 KB (33 KB total) ---
# Full source: https://artifacts.apis.io/featureflip/openapi/featureflip-user-segments-api-openapi.yml