v1.0.0
OpenAPI 3.1.0

List segments

US region

Client Libraries

List segments

​

Retrieve a list of your segments. The list doesn't include archived segments.

Responses
  • application/json
  • application/json
Request Example for get/v1/segments
curl https://api.customer.io/v1/segments \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "segments": [
    {
      "conditions": {
        "and": [
          {
            "event": {
              "filters": {
                "and": [
                  {
                    "field": "to",
                    "inverse": false,
                    "operator": "eq",
                    "value": "premium"
                  },
                  {
                    "field": "from",
                    "inverse": true,
                    "operator": "eq",
                    "value": "premium"
                  }
                ]
              },
              "id": 12,
              "name": "plan",
              "type": "attribute_change"
            },
            "inverse": false,
            "times": 1,
            "within": 0
          },
          {
            "segment": {
              "id": 7,
              "inverse": false
            }
          }
        ]
      },
      "created_at": 1552341937,
      "deduplicate_id": "15:1492548073",
      "description": "My first manual segment",
      "id": 7,
      "name": "Manual Segment 1",
      "progress": null,
      "state": "finished",
      "tags": null,
      "type": "manual",
      "updated_at": 1552341937
    }
  ]
}