Statistics of a community the person manages
Revenue (completed PLN payments), new members and page views over the last days, each with the period before — the numbers on the community’s dashboard.
Scope: communities.read.
GET
/v1/communities/{slug}/statsAuthorization
AuthorizationBearer token (API Key) · headerrequiredAPI Key for programmatic access (format: insy_xxxxx)
Path parameters
slugstringrequiredQuery parameters
daysstring1 to 90; defaults to 30.
Responses
200Successful response
successbooleanrequiredWhether the request was successful
errorCodestringrequiredThe error code returned by the request
Allowed:
not_foundbad_requestalready_existsunauthorizedforbiddeninternal_server_errorservice_unavailabletimeoutconflictprecondition_failedunprocessable_entitytoo_many_requestsmessagestringrequiredThe message returned by the request
dataV1CommunityStatsObjectShow propertiesHide properties
communityV1CommunityRefObjectrequiredShow propertiesHide properties
namestringrequiredslugstringrequireddaysnumberrequiredmin 1 · max 90
revenueV1RevenueMetricObjectrequiredShow propertiesHide properties
currentV1MoneyObjectrequiredShow propertiesHide properties
amountCentsnumberrequiredMinor units (cents).
currencystring | nullrequiredpreviousV1MoneyObjectrequiredShow propertiesHide properties
amountCentsnumberrequiredMinor units (cents).
currencystring | nullrequiredchangePercentnumberrequirednotestringrequirednewMembersV1CountMetricObjectrequiredShow propertiesHide properties
currentnumberrequiredpreviousnumberrequiredThe same number of days just before.
changePercentnumberrequiredChange against `previous`, in percent.
pageViewsV1CountMetricObjectrequiredShow propertiesHide properties
currentnumberrequiredpreviousnumberrequiredThe same number of days just before.
changePercentnumberrequiredChange against `previous`, in percent.
400Invalid input (`errorCode: bad_request`, `reason: invalid_input`).
401Missing, invalid or expired access token or API key.
403The token lacks the operation's scope (`reason: insufficient_scope`).
429Per-account rate limit (120/min, 3000/h, shared with `/mcp`); see `Retry-After`.
Try it
Server
Authorization
Parameters
Request
curl -X GET "https://api.insy.io/v1/communities/string/stats" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://api.insy.io/v1/communities/string/stats", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});import requests
response = requests.get(
"https://api.insy.io/v1/communities/string/stats",
headers={
"Authorization": "Bearer YOUR_TOKEN"
},
)Response
{
"success": true,
"errorCode": "not_found",
"message": "Success",
"data": {
"community": {
"name": "string",
"slug": "string"
},
"days": 1,
"revenue": {
"current": {
"amountCents": 0,
"currency": "PLN"
},
"previous": {
"amountCents": 0,
"currency": "PLN"
},
"changePercent": 0,
"note": "Completed PLN payments only."
},
"newMembers": {
"current": 0,
"previous": 0,
"changePercent": 0
},
"pageViews": {
"current": 0,
"previous": 0,
"changePercent": 0
}
}
}Invalid input (`errorCode: bad_request`, `reason: invalid_input`).
Missing, invalid or expired access token or API key.
The token lacks the operation's scope (`reason: insufficient_scope`).
Per-account rate limit (120/min, 3000/h, shared with `/mcp`); see `Retry-After`.