Endpoint and Authentication

Please refer to the API overview section to get the API endpoint, query format and authentication process.

List all segments

GET /api/segments?app=app_identifier

Query parameters

Property Type Description Default
app_identifier string The app for which you are requesting the list of segments. If omitted, the API returns all segments for all allowed apps -

Response

Status: 200 OK

{
  "success": true,
  "result": [
    {
      "identifier": "FASEGMT_ABCDEF",
      "name": "My Segment",
      "description": "",
      "app": "FAAPPLI_123456",
      "filters": {
        "operator": "AND",
        "blocks": [{
          "operator": "OR",
          "filters": [{
            "value": "activity",
            "options": [{
              "value": "last_app_usage",
              "options": [{
                "value": "happened"
              }, {
                "value": 9
              }]
            }]
          }]
        }]
      },
      "filters_subs": {},
      "eligible_for_ab_testing": true,
      "snapshot_at": "2017-04-27T20:58:23.374Z",
      "reach": {
        "count": 0, 
        "optin": 0, 
        "token": 0, 
        "total": 43
      },
      "preview": {
        "people_number": 645,
        "people_percent": 0.42857,
        "push_percent": 0.5
      },
      "labels": [],
      "analytics_enabled": true,
      "state": "active",
      "last_used_at": "2020-02-14T20:53:15.068Z",
      "created_at": "2017-03-14T20:53:15.068Z"
    }
  ]
}

Status: 404 not found

{
    "status": "not_found",
    "success": false,
    "error_message": "Couldn't find App"
}