Skip to main content
GET
/
segments
List segments
curl --request GET \
  --url https://api.mailrify.com/segments \
  --header 'Authorization: Bearer <token>'
[
  {
    "id": "<string>",
    "name": "<string>",
    "description": "<string>",
    "condition": {
      "logic": "AND",
      "groups": [
        {
          "filters": [
            {
              "field": "<string>",
              "operator": "equals",
              "value": "<unknown>",
              "unit": "days"
            }
          ],
          "conditions": "<unknown>"
        }
      ]
    },
    "trackMembership": true,
    "memberCount": 123,
    "projectId": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
]

Authorizations

Authorization
string
header
required

API Key authentication. Secret keys (sk_*) are required for all endpoints except /v1/track. Public keys (pk_*) only work with the /v1/track endpoint for client-side event tracking. The project is automatically derived from the key.

Response

200 - application/json

List of segments

id
string
name
string
description
string | null
condition
object

Root segment condition structure using logical groups.

trackMembership
boolean
memberCount
integer
projectId
string
createdAt
string<date-time>
updatedAt
string<date-time>