statsig Segments API

Manage user segments for targeting rules across gates, configs, and experiments.

Operations 20

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /segments List user segments · List all segments #
Ask an LLM
“Which user segments exist in my Statsig project?”
“Can I page through all our targeting segments?”
Tell an agent
List all segments in my project.
Show page {page} of segments, {limit} per page.
POST /segments Create a user segment · Create a segment #
Ask an LLM
“How do I create a reusable user segment for targeting?”
“What segment type do I need to pick when creating a segment?”
Tell an agent
Create a segment named {name} of type {type}.
Create segment {name} of type {type} with membership rules {rules}.
GET /segments/{id} Get a segment's configuration · Get a segment #
Ask an LLM
“What rules define membership in a specific segment?”
“Can I look up one segment's full configuration by name?”
Tell an agent
Show the configuration of segment {id}.
Get segment {id} and its membership rules.
PATCH /segments/{id} Update an existing user segment · Partially update a segment #
Ask an LLM
“Can I change the membership rules of an existing segment?”
“Is it possible to rename a segment that already exists?”
Tell an agent
Update segment {id}: name {name}, type {type}, rules {rules}.
Rename existing segment {id} to {name}, keeping type {type}.
DELETE /segments/{id} Delete a user segment · Delete a segment #
Ask an LLM
“How do I permanently remove a segment we no longer target?”
“Is deleting a user segment permanent?”
Tell an agent destructive · confirm first
Delete segment {id}.
Permanently remove user segment {id}.
GET /console/v1/segments List segments via the Console API v1 · List Segments #
Ask an LLM
“Can the Console API v1 list every segment in the project?”
“Which segments does the v1 console endpoint return on each page?”
Tell an agent
List segments from the v1 console.
Fetch segments page {page} from Console API v1 at {limit} per page.
POST /console/v1/segments Create a segment with an ID type and tags · Create Segment #
Ask an LLM
“Can I set a custom ID for a new segment instead of using its name?”
“Can I assign a new segment to a team and tag it when creating it?”
Tell an agent
Create segment {name} of type {type} with ID type {idType} through the v1 console.
Create segment {name} of type {type}, ID {id}, owned by team {teamID}.
GET /console/v1/segments/{id} Get a segment via the Console API v1 · Get Segment #
Ask an LLM
“Can the Console API v1 return one segment's details?”
“Who created a given segment and what ID type does it use?”
Tell an agent
Fetch segment {id} from the v1 console.
Look up the creator and ID type of segment {id}.
DELETE /console/v1/segments/{id} Delete a segment via the Console API v1 · Delete Segment #
Ask an LLM
“Can I delete a segment through the Console API v1?”
“Which v1 console call removes a segment entirely rather than archiving it?”
Tell an agent destructive · confirm first
Delete segment {id} with the v1 console endpoint.
Remove segment {id} for good via Console API v1.
PATCH /console/v1/segments/{id}/add_ids Add IDs to a User Store ID list segment · Add IDs to User Store ID List #
Ask an LLM
“Can I add IDs to a segment backed by the User Store ID list?”
“How many IDs can one User Store add request include?”
Tell an agent
Add IDs {ids} to the User Store ID list of segment {id}.
Append {ids} to User Store segment {id} at version {version}.
PUT /console/v1/segments/{id}/archive Archive a segment · Archive Segment #
Ask an LLM
“Can I archive a segment instead of deleting it?”
“Is there a way to retire a segment we no longer target without losing it?”
Tell an agent
Archive segment {id}.
Retire segment {id} by archiving it.
POST /console/v1/segments/{id}/conditional Update a segment's conditional rules · Update Segment Rules #
Ask an LLM
“Can I replace the conditional rules on a rule-based segment?”
“Is there an endpoint for just the rules of a conditional segment?”
Tell an agent
Update the conditional rules on segment {id}.
Rewrite the targeting conditions of segment {id}.
GET /console/v1/segments/{id}/id_list List the IDs in an ID list segment · Get IDs in a Segment #
Ask an LLM
“Which user IDs are in a particular ID list segment?”
“Is reading a segment's IDs rate limited?”
Tell an agent
List the IDs in segment {id}.
Show page {page} of IDs in segment {id}, {limit} per page.
PATCH /console/v1/segments/{id}/id_list Add IDs to an ID list segment · Add IDs to Segment #
Ask an LLM
“Can I add more user IDs to an existing ID list segment?”
“How often can I call the endpoint that adds IDs to a segment?”
Tell an agent
Add IDs {ids} to ID list segment {id}.
Put {ids} into segment {id}'s ID list.
DELETE /console/v1/segments/{id}/id_list Remove IDs from an ID list segment · Remove IDs from Segment #
Ask an LLM
“Can I remove specific users from an ID list segment?”
“What is the rate limit for removing IDs from a segment?”
Tell an agent destructive · confirm first
Remove IDs {ids} from segment {id}.
Take {ids} out of ID list segment {id}.
POST /console/v1/segments/{id}/id_list/reset Replace all IDs in an ID list segment · Reset ID List Segment #
Ask an LLM
“Can I overwrite a segment's entire ID list with a new set?”
“Is resetting a large ID list atomic?”
Tell an agent destructive · confirm first
Reset segment {id} so its ID list is exactly {ids}.
Replace every ID in segment {id} with {ids}.
GET /console/v1/segments/{id}/idlist_metadata Get an ID list segment's metadata · Get ID List Metadata #
Ask an LLM
“What metadata is stored about a segment's ID list?”
“Can I check an ID list's metadata without downloading the IDs?”
Tell an agent
Get ID list metadata for segment {id}.
Show the metadata of segment {id}'s ID list.
PATCH /console/v1/segments/{id}/remove_ids Remove IDs from a User Store ID list segment · Remove IDs from User Store ID List #
Ask an LLM
“Can I remove IDs from a segment stored in the User Store?”
“What is the per-request ID limit when removing from a User Store list?”
Tell an agent
Remove IDs {ids} from the User Store ID list of segment {id}.
Drop {ids} from User Store segment {id} at version {version}.
DELETE /console/v1/segments/{id}/reviews/{reviewID} Cancel a segment review · Cancel Segment Review #
Ask an LLM
“Can I withdraw a pending change review on a segment?”
“Is there a way to cancel a segment review nobody needs anymore?”
Tell an agent destructive · confirm first
Cancel review {reviewID} on segment {id}.
Withdraw pending review {reviewID} for segment {id}.
PUT /console/v1/segments/{id}/reviews/{reviewID}/commit Commit an approved segment review · Commit Segment Review #
Ask an LLM
“Can I apply an approved review so the segment change takes effect?”
“What call commits a reviewed change to a segment?”
Tell an agent
Commit review {reviewID} on segment {id}.
Apply the approved change from review {reviewID} to segment {id}.

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/statsig:statsig-segments-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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

statsig-segments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Statsig Segments API
  version: '1.0'
  description: 'Operations tagged Segments across 2 of this provider''s published API definitions: statsig-console-api-openapi.yml, statsig-segments-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://statsigapi.net/console/v1
  description: Statsig Console API Server
- url: https://statsigapi.net
tags:


# --- truncated at 32 KB (67 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/statsig/refs/heads/main/openapi/statsig-segments-api-openapi.yml