GET /api/list.php?id=…
Endpoint returns detailed information for a given segment.
Request parameters
Parameter | Value |
id | Segment ID. |
Note: id parameter is not required. When missing, a list of segments is returned (https://smaily.com/help/api/segments/list-segments/).
Response parameters
Parameter | Value |
id | Segment ID. |
name | Segment name. |
filter_type | Inclusion conditions. ALL - subscriber data must conform to all the segmentation rules; ANY - subscriber data must conform with at least one of the specified segmentation rules. |
filter_data | List of segmentation rules. See "Structure of a segmentation rule" for more information. |
subscribers_count | Number of subscribers in the segment. |
Example
$ curl -X GET -u "${USERNAME}:${PASSWORD}" \ "https://${SUBDOMAIN}.sendsmaily.net/api/list.php?id=2"
(JavaScript/JSON)
{ "id": 2, "name": "Example segment", "filter_type": "ALL", "subscribers_count": 250, "filter_data": [ ["is_unsubscribed", ["Equal", "1"]] ] }