Skip to main content

Get segment information

Description

Retrieves a segment detailed information.

Request URL

Method: POST

https://example.com/api/v1.1/segments/get/

Request parameters

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
formatstring"json"Noresponse data format
By default – json
idint1NoSegment ID

Request example

{
"id": 1,
"token": "abcdefghijklmnqrstuvwxyz"
}

Response example

{
"data": {
"count": 100,
"id": 1,
"name": "Segment A",
"segment": [
{
"condition": "or",
"limit": 0,
"list_id": 1,
"percent_from": 0,
"percent_to": 99,
"queries": [
{
"child": [],
"compo": "domaingroup",
"condition": "",
"name": "email",
"operator": "equal",
"type": "email",
"value": [
{
"name": "domaingroup",
"value": "Yahoo! (US)"
}
]
}
]
}
]
},
"error": 0,
"error_text": "Successful operation"
}

Response parameters

ParameterTypeDescription
errorintError code
error_textstringError text
countintProfiles in the segment
idintSegment ID
namestringSegment name
segmentJSON arraysegment details