Pre-release — content may change.

Segments

List an organization's segments

GET
/organizations/{organization_id}/segments

A paginated list of processed segment filters that the given organization is currently a member of. Returns the same segment_filters resource as the top-level /segment_filters route; the meta.resource_added_at field is populated here.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

organization_id*string

Query Parameters

include?string

Comma-separated list of relationships to include. Allowed values are resource-specific; consult the operation for the allowlist.

sort?string

Comma-separated list of attributes to sort by. Prefix with - for descending order (-created_at,family_name).

page?

Offset pagination parameters.

filter?

Filter predicates on SegmentFilter attributes. Keys take the form filter[<attribute>_<predicate>]=<value>.

fields[segment_filters]?array<>

Sparse-fieldset selection.

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/segments"
{  "data": [    {      "type": "segment_filters",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "attributes": {        "title": "string",        "description": "string",        "state": "draft",        "filters": {},        "entity": "people",        "segment_type": "static",        "access": "only_me",        "records_count": 0,        "has_automations": true,        "category": "string",        "updated_at": "2019-08-24T14:15:22Z"      },      "relationships": {        "created_by": {          "data": null,          "links": {            "self": "/segment_filters/7247ad7d-9275-454b-9e3a-0570e403739e/relationships/created_by"          }        },        "links": {}      },      "meta": {        "resource_added_at": "2019-08-24T14:15:22Z",        "can_manage": true      },      "links": {        "self": "/segment_filters/7247ad7d-9275-454b-9e3a-0570e403739e"      }    }  ],  "meta": {    "page": {      "total_items": 0,      "total_pages": 0,      "number": 0,      "size": 0    }  }}
{  "errors": [    {      "status": 0,      "title": "string",      "source": {        "pointer": "string",        "parameter": "string"      },      "meta": {        "error": "string",        "field": "string"      }    }  ]}
{  "errors": [    {      "status": 0,      "title": "string",      "source": {        "pointer": "string",        "parameter": "string"      },      "meta": {        "error": "string",        "field": "string"      }    }  ]}
{  "errors": [    {      "status": 0,      "title": "string",      "source": {        "pointer": "string",        "parameter": "string"      },      "meta": {        "error": "string",        "field": "string"      }    }  ]}