Skip to main content

Get statistics on resource

Description

Get statistics on profile subscriptions in segment.

URL

Method: POST

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

Request parameters

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
db_idint3Yes, for dynamic segmentDatabase ID
resource_idint2YesResource ID
idint1YesSegment ID
formatint"json"NoResponse data format
By default – json

Request example

{
"token": "abcdefghijklmnqrstuvwxyz",
"db_id": 1,
"resource_id": 24,
"id": 7,
"format": "json"
}

Response example

{
"data": [
{
"channel": "email",
"status": {
"subscribed_sendable": 209,
"unconfirmed_sendable": 0
}
},
{
"channel": "push",
"status": {
"subscribed_sendable": 0,
"unconfirmed_sendable": 0
}
},
{
"channel": "sms",
"status": {
"subscribed_sendable": 108,
"unconfirmed_sendable": 0
}
}
],
"error": 0,
"error_text": "Successful operation"
}

Response parameters

ParameterTypeDescription
dataarray of objectsArray of received resource channel data
errorintError code
error_textstringError text