Subscriber Counts API
- Table of Contents
- Get the subscriber count totals for an organization
Get the subscriber count totals for an organization
Get the number of subscribers for an organization. The response includes totals for the entire organization and totals for each individual mailing list within that organization.
URL
GET /ga/api/v2/subscriber_counts
System administrators can also use:
GET /ga/api/v2/organization/:organization_id/subscriber_counts
Response
The response will be a JSON object containing the following keys.
organization hash The current or requested organization.
|
|||||||||
counts hash |
The total number of subscribers with the given status across the organization. All values will be integers.
|
||||||||
mailing_lists array of hashes A list of all mailing lists on the organization.
|
Example Request
Note that the JSON response will not be “pretty formatted” as it is below.
GET /ga/api/v2/subscriber_counts
HTTP/1.1 200 OK
{
"success": true,
"data": {
"organization": {
"id": 3,
"name": "Daily News Service"
},
"counts": {
"active": 536,
"bounced": 614,
"unsubscribed": 566,
"scomp": 592,
"deactivated": 650
},
"mailing_lists": [
{
"mailing_list": {
"id": 1,
"name": "Daily Weather"
},
"counts": {
"active": 205,
"bounced": 241,
"unsubscribed": 219,
"scomp": 231,
"deactivated": 257
}
},
{
"mailing_list": {
"id": 2,
"name": "Breaking News"
},
"counts": {
"active": 331,
"bounced": 373,
"unsubscribed": 347,
"scomp": 361,
"deactivated": 393
}
}
]
},
"error_code": null,
"error_message": null
}