API referenceAdmin
Create an audience segment
Registers a named segment with its membership rules so flags and experiments can target it. Platform admins only; an invalid rule set is rejected as a validation error.
Authorization
apiKey AuthorizationBearer <token>
Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/v1/admin/segments" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "data": { "id": "string", "name": "string", "description": "string", "rules": [ "string" ], "matches": 0, "usedBy": [ "string" ] }}{ "_tag": "ApiNotFound", "error": "not_found", "message": "That item does not exist, or this key cannot see it.", "status": 404}{ "_tag": "ApiNotFound", "error": "not_found", "message": "That item does not exist, or this key cannot see it.", "status": 404}List the audience segments
Returns the segments available for feature flag and experiment targeting. Platform admins only.
List recent admin audit events
Returns the platform audit trail — who changed what on the admin surface, including the critical events written by bootstrap and admin invites. Platform admins only.