SnozeDevelopers
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
/v1/admin/segments

Authorization

apiKey
headerAuthorizationBearer <snoze_sk_…>

Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.

Request Body

application/json
  1. body
name*string
description?string|null
rules?array<string>|null

Response Body

Success

application/json
  1. 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"    ]  }}