Segments

Return information about a segment.

get/v1/segments/{segment_id}

Request

  • Base URL
    https://api.customer.io
  • URL
    https://api.customer.io/v1/segments/{segment_id}
  • Auth
    HTTP bearer

Response

Returns the information about the segment.

Example response

{
  "segment": {
    "id": 7,
    "deduplicate_id": "15:1492548073",
    "name": "Manual Segment 1",
    "description": "My first manual segment",
    "state": "finished",
    "type": "manual",
    "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,
    "updated_at": 1552341937
  }
}

Changes

    • warning

      added the new snapshot enum value to the / response property for the response status

    • breaking

      the / response's property type changed from integer null to number null for status

    • info

      added the optional property / to the response with the status

    • info

      removed the build_queued enum value from the / response property for the response status

    • info

      removed the events enum value from the / response property for the response status

    • info

      removed the events_queued enum value from the / response property for the response status