Get Customer Analytics Summary
Reports the shape of the authenticated creator’s customer base: how their subscriptions split between active, inactive and revoked, which country most of them come from, how many were imported rather than bought, and how many products a typical customer buys.
Use this to render a customer overview. It answers "what does this creator's customer base look like?" — for "how is it changing?", use Get Customer Analytics Growth instead. This operation returns aggregates only; it never exposes an individual customer, subscription or payment.
Subscriptions, not people. subscriptions, importedSubscriptions and topCountry.subscriptions count subscription records, so a customer who bought three of the creator’s products contributes three. The one exception is purchaseBehaviour, which counts people — that contrast is the point of the field, and it is why the two sets of numbers will not add up to each other.
Choosing the window. Send no dates at all for the all-time snapshot; that is the default and there is no implicit "last 30 days". To narrow it, send both bounds for a closed window, or either one alone for a one-sided window — startDate by itself means everything from that instant onwards, endDate by itself everything up to it. The window is inclusive at both ends — unlike the revenue analytics window, which excludes its end — and is matched against each customer’s most recent subscription activity, not against when they first bought, so a long-standing customer who renewed yesterday falls inside a window covering yesterday. Customers with no recorded activity fall outside any window you specify and appear only in the all-time snapshot. Bounds are absolute instants, so convert your local day boundaries yourself, and a closed window may span at most 90 days; a one-sided window is not capped. Note that allTimePaidSubscriptions ignores the window entirely — it is always the lifetime figure.
What is in scope. Except for allTimePaidSubscriptions, every field covers subscriptions to the creator’s own products, including products they have since hidden or removed from sale. allTimePaidSubscriptions is counted over a slightly wider set, so treat it as a lifetime headline rather than a total the other fields roll up into.
Country values are not normalised. topCountry.country is whatever the customer’s profile holds. That is usually an ISO 3166-1 alpha-2 code such as IN, but a full name such as India also occurs, and TagMango counts the two as separate values — so the country returned is the most common value, which on a mixed data set may not be the most common country. Compare case-insensitively and be ready for either form.
Freshness. Analytics are served from TagMango’s reporting store rather than the live transactional one, so a subscription created moments ago may not be reflected yet, and no staleness bound is guaranteed. allTimePaidSubscriptions is also read separately from the rest rather than from one atomic snapshot, so a change made mid-request can leave the two marginally out of step. Both settle on their own; there is nothing to refresh.
Rejected date values. An unparseable bound, a closed window whose endDate precedes startDate, or a closed window longer than 90 days is rejected before any data is read. The 400 response carries the failures in both message and result as a list, for example ["endDate must be on or after startDate and within 90 days"].
Authorization
bearer In: header
Query Parameters
Inclusive start of the reporting window, as an ISO 8601 date-time. Alone, it means everything from this instant onwards. Send it alone for a one-sided window, or with its partner for a closed one; omit both to apply no date filter at all. A closed window may span at most 90 days, a limit that does not apply to a one-sided window. Both bounds are absolute instants rather than calendar days in your timezone, so convert your day boundaries before sending them.
date-timeInclusive end of the reporting window, as an ISO 8601 date-time — a record at exactly this instant is counted. Alone, it means everything up to and including this instant. Send it alone for a one-sided window, or with its partner for a closed one; omit both to apply no date filter at all. A closed window may span at most 90 days, a limit that does not apply to a one-sided window. Both bounds are absolute instants rather than calendar days in your timezone, so convert your day boundaries before sending them.
date-timeHeader Parameters
Host name of the dashboard, ex: mydomain.tagmango.com
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://api-prod-new.tagmango.com/api/v1/external/analytics/customers/summary" \ -H "x-whitelabel-host: string"{
"subscriptions": {
"active": 1284,
"inactive": 198,
"revoked": 70,
"total": 1552
},
"importedSubscriptions": 350,
"topCountry": {
"country": "IN",
"subscriptions": 1186
},
"purchaseBehaviour": [
{
"bucket": "1",
"customers": 742,
"percentage": 58.3
}
],
"allTimePaidSubscriptions": 3120
}{
"code": 400,
"type": "Bad Request",
"statusMessage": "BAD_REQUEST",
"success": false,
"message": "Invalid request",
"result": "Invalid request"
}{
"code": 401,
"type": "Unauthorized",
"statusMessage": "UNAUTHORIZED",
"message": "Invalid token",
"result": "Invalid token",
"success": false
}{
"code": 403,
"type": "Forbidden",
"statusMessage": "FORBIDDEN",
"errorCode": "WORKSHOP_MANGO_FORBIDDEN",
"message": "You can not access this api with a TagMango account, only available for whitelabel hosts",
"result": "You can not access this api with a TagMango account, only available for whitelabel hosts",
"success": false
}{
"code": 429,
"type": "Too Many Requests",
"statusMessage": "TOO_MANY_REQUESTS",
"message": "Request limit exceeded. try after 10 seconds",
"result": "Request limit exceeded. try after 10 seconds",
"success": false
}