SegmentsList segments

List segments

List segments for the resolved location, newest-updated first. Readable with an agency key (ak_) or a viewer key (sk_). Agency keys must pass ?location_id=.

curl -X GET "https://mythic-analytics.gulp.workers.dev/builder/segments?location_id=acme-retail" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "data": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "Active organic (30d)",
      "description": "example_string",
      "definition": {
        "attribution": "first",
        "search": "acme",
        "has_email": true,
        "channel": "organic",
        "utm_source": "google",
        "utm_medium": "cpc",
        "utm_campaign": "example_string",
        "country": "US",
        "device_type": "mobile",
        "min_sessions": 3,
        "min_identities": 2,
        "active_within_days": 30,
        "inactive_days": 90,
        "first_seen_within_days": 7
      },
      "is_favorite": true,
      "created_at": "2024-12-25T10:00:00Z",
      "updated_at": "2024-12-25T10:00:00Z"
    }
  ]
}
GET
/segments
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.
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.

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

dataarray