SegmentsCount segment members

Count segment members

Number of people matching the segment. Readable with either key type. Attribute-only segments are computed live against the person graph. Segments with events are served from the materialized run and the response says when it was computed.

curl -X GET "https://mythic-analytics.gulp.workers.dev/builder/segments/123e4567-e89b-12d3-a456-426614174000/count?location_id=acme-retail" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "count": 128,
  "computed_at": "2024-12-25T10:00:00Z",
  "stale": true
}
GET
/segments/{id}/count
GET
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

Builder key as a bearer token. Use an agency key for full CRUD (Bearer ak_...) or a viewer key for read-only access (Bearer sk_...). Scoped keys (mcp_) are accepted too and need segments:read or segments:write. See Using an mcp_ key over HTTP.

Builder key as a bearer token. Use an agency key for full CRUD (Bearer ak_...) or a viewer key for read-only access (Bearer sk_...). Scoped keys (mcp_) are accepted too and need segments:read or segments:write. See Using an mcp_ key over HTTP.
path
idstring
Required

Segment UUID.

Format: uuid
query
location_idstring

Client location to scope the request to. Required when authenticating with an agency key (ak_). Ignored for viewer keys (sk_).

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Builder key as a bearer token. Use an agency key for full CRUD (Bearer ak_...) or a viewer key for read-only access (Bearer sk_...). Scoped keys (mcp_) are accepted too and need segments:read or segments:write. See Using an mcp_ key over HTTP.

Path Parameters

idstring
Required

Segment UUID.

Query Parameters

location_idstring

Client location to scope the request to. Required when authenticating with an agency key (ak_). Ignored for viewer keys (sk_).

Example:
acme-retail

Responses

countinteger
computed_atstring

Segments with events only. When the served membership run was computed.

staleboolean

Segments with events only. true when the run is older than 15 minutes and a recompute was started in the background.