Skip to main content
GET
/
segments
/
{segmentId}
cURL
curl --request GET \
  --url https://www.greenflash.ai/api/v1/segments/{segmentId} \
  --header 'Authorization: Bearer <token>'
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "Power Users",
  "type": "system",
  "presetId": "power-users",
  "memberCount": 234,
  "isFavorited": true,
  "description": "Users who have had more than 10 conversations and exhibit high engagement patterns.",
  "icon": "zap",
  "filters": {
    "operator": "AND",
    "conditions": [
      {
        "field": "conversationCount",
        "operator": "gte",
        "value": 10
      },
      {
        "field": "avgSentiment",
        "operator": "gte",
        "value": 0.3
      }
    ]
  },
  "createdBy": null,
  "createdAt": "2025-06-01T00:00:00Z",
  "updatedAt": "2025-10-15T12:00:00Z"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

segmentId
string
required

The segment ID (UUID) or preset ID for system segments.

Response

Segment retrieved successfully

id
string<uuid>
required

The segment ID.

name
string
required

The segment name.

type
enum<string>
required

Whether the segment is system-defined or custom.

Available options:
system,
custom
presetId
string | null
required

Preset identifier for system segments.

memberCount
number
required

Number of participants in this segment.

isFavorited
boolean
required

Whether the segment is favorited.

description
string | null
required

A description of the segment.

icon
string | null
required

Icon identifier for the segment.

filters
object
required

The filter/rule configuration for the segment.

createdBy
string<uuid> | null
required

The user ID who created this segment.

createdAt
string<date-time>
required

When the segment was created.

updatedAt
string<date-time>
required

When the segment was last updated.