Skip to main content
GET
/
users
/
{userId}
/
segments
cURL
curl --request GET \
  --url https://www.greenflash.ai/api/v1/users/{userId}/segments \
  --header 'Authorization: Bearer <token>'
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "Power Users",
    "type": "system",
    "presetId": "power-users"
  },
  {
    "id": "123e4567-e89b-12d3-a456-426614174001",
    "name": "Enterprise Customers",
    "type": "custom",
    "presetId": null
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

userId
string<uuid>
required

The user ID to get segment memberships for

Response

User segments retrieved successfully

id
string<uuid>
required

The segment ID.

name
string
required

The segment name.

type
string
required

The segment type (system or custom).

presetId
string | null
required

The preset identifier for system segments, or null for custom segments.