Skip to main content

Get resource statistics

Description

Get the statistics of subscriptions on resource.

URL

Method: POST

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

Request parameters

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
list_idint1YesDatabase ID
idint1YesResource ID
formatJSON object"json"NoResponse data format
By default – json

Request example

{
"token": "abcdefghijklmnqrstuvwxyz",
"list_id": 24,
"id": 5,
"format": "json"
}

Response example

{
"data": [
{
"channel": "email",
"status": {
"all": 1336,
"subscribed": 925,
"unsubscribed": 0,
"complained": 0,
"hardbounced": 411,
"unconfirmed": 0,
"suspended": 0,
"invalid": 0,
"subscribed_sendable": 925,
"unconfirmed_sendable": 0
}
},
{
"channel": "sms",
"status": {
"all": 1336,
"subscribed": 0,
"unsubscribed": 0,
"complained": 0,
"hardbounced": 0,
"unconfirmed": 0,
"suspended": 0,
"invalid": 0,
"subscribed_sendable": 0,
"unconfirmed_sendable": 0
}
},
{
"channel": "push",
"status": {
"all": 1336,
"subscribed": 0,
"unsubscribed": 0,
"complained": 0,
"hardbounced": 0,
"unconfirmed": 0,
"suspended": 0,
"invalid": 0,
"subscribed_sendable": 0,
"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