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.
POST
apiKeyheader
AuthorizationBearer <snoze_sk_…>Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.
application/json- body
name*stringdescription?string|nullrules?array<string>|nullSuccess
application/json- response
data*Example Request
curl -X POST 'https://api.snoze.dev/v1/admin/segments' \ -H 'Content-Type: application/json' \ -d '{ "name": "string"}'Example Response
{ "data": { "id": "string", "name": "string", "description": "string", "rules": [ "string" ], "matches": 0, "usedBy": [ "string" ] }}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.