GreenArrow Email Software Documentation

Subscriber Counts API

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.

id

integer

Internal identifier

name

string

This organization’s name

counts

hash

The total number of subscribers with the given status across the organization.

All values will be integers.

  • Counted statuses include: active, bounced, unsubscribed, scomp, and deactivated
mailing_lists

array of hashes



A list of all mailing lists on the organization.

mailing_list

hash


id

integer

Internal identifier for the mailing list.

name

string

This mailing list’s descriptive name.

counts

hash

The total number of subscribers with the given status in the mailing list.

All values will be integers.

  • Counted statuses include: active, bounced, unsubscribed, scomp, and deactivated

Example

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
}


Copyright © 2012–2024 GreenArrow Email