Compare completed sales and revenue by plan alongside current active memberships. Use this report for your Telegram subscription bot or Discord subscription bot project.
GET /v2/projects/ {project_id} /analytics/plans CopyTry it Authorization Bearer API Key Required
API key scope: analytics:charts:read for restricted keys. Unrestricted project keys also support this endpoint.
Query Parameters First UTC calendar day, YYYY-MM-DD; default to minus 29 days.
Last UTC calendar day inclusive, YYYY-MM-DD; default today.
Dates must be real calendar days between 2000-01-01 and 2099-12-31, with from no later than to and at most 366 days inclusive. Unknown query parameters are rejected. There is no request body. See the shared analytics date, money, and cache rules .
Plans appear when they have sales in the window or active memberships now. Rows sort by completed sales descending, then plan ID. Active counts ignore the requested window. A hidden plan name is null for restricted keys; unrestricted keys can read it. Missing catalog rows also have null names. More than 200 qualifying plans returns 413, even when a shorter window cannot reduce the active-plan count.
curl "https://api.botsubscription.com/v2/projects/11111111-1111-4111-8111-111111111111/analytics/plans?from=2026-10-01&to=2026-10-31" \
-H "Authorization: Bearer YOUR_API_KEY" Report with unrestricted project key application/json
{
"ok" : true ,
"request_id" : "44444444-4444-4444-8444-444444444444" ,
"method" : "GET" ,
"path" : "/v2/projects/11111111-1111-4111-8111-111111111111/analytics/plans" ,
"code" : 200 ,
"data" : {
"period" : {
"from" : "2026-10-01" ,
"to" : "2026-10-31" ,
"interval" : null ,
"timezone" : "UTC" ,
"generated_at" : "2026-11-01T12:00:00.000Z"
},
"plans" : [
{
"plan_id" : "3f6c2a9e-1b7d-4c55-9a43-2d8e0f1b6a10" ,
"plan_name" : "Gold" ,
"hidden" : false ,
"archived" : false ,
"completed_sales" : 6 ,
"revenue" : {
"eur" : "0.3" ,
"usd" : "26.5"
},
"active_memberships" : 1
},
{
"plan_id" : "7a1d9c4b-5e2f-4b8a-8c61-0e3f2a7d9b45" ,
"plan_name" : "Silver" ,
"hidden" : false ,
"archived" : true ,
"completed_sales" : 1 ,
"revenue" : {
"usd" : "3"
},
"active_memberships" : 0
},
{
"plan_id" : "c2e8b5f1-9d3a-4e7c-b0a6-41f7d2c8e913" ,
"plan_name" : "Trial" ,
"hidden" : false ,
"archived" : false ,
"completed_sales" : 0 ,
"revenue" : {},
"active_memberships" : 3
}
],
"totals" : {
"plans" : 3 ,
"completed_sales" : 7 ,
"revenue" : {
"eur" : "0.3" ,
"usd" : "29.5"
},
"active_memberships" : 4
},
"disclosures" : {
"cache_ttl_seconds" : 120 ,
"timezone" : "UTC" ,
"sales_anchor" : "coalesce_settled_at_created_at" ,
"active_memberships_as_of" : "generated_at" ,
"hidden_plan_names_included" : false ,
"currency_conversion_applied" : false ,
"singleton_groups_possible" : true ,
"balance_top_ups_excluded" : true ,
"plans_without_activity_omitted" : true ,
"max_plans" : 200
}
}
} Restricted key with redacted fields application/json
{
"ok" : true ,
"request_id" : "44444444-4444-4444-8444-444444444444" ,
"method" : "GET" ,
"path" : "/v2/projects/11111111-1111-4111-8111-111111111111/analytics/plans" ,
"code" : 200 ,
"data" : {
"period" : {
"from" : "2026-10-01" ,
"to" : "2026-10-31" ,
"interval" : null ,
"timezone" : "UTC" ,
"generated_at" : "2026-11-01T12:00:00.000Z"
},
"plans" : [
{
"plan_id" : "3f6c2a9e-1b7d-4c55-9a43-2d8e0f1b6a10" ,
"plan_name" : null ,
"hidden" : true ,
"archived" : false ,
"completed_sales" : 6 ,
"revenue" : {
"eur" : "0.3" ,
"usd" : "26.5"
},
"active_memberships" : 1
},
{
"plan_id" : "7a1d9c4b-5e2f-4b8a-8c61-0e3f2a7d9b45" ,
"plan_name" : "Silver" ,
"hidden" : false ,
"archived" : true ,
"completed_sales" : 1 ,
"revenue" : {
"usd" : "3"
},
"active_memberships" : 0
},
{
"plan_id" : "c2e8b5f1-9d3a-4e7c-b0a6-41f7d2c8e913" ,
"plan_name" : "Trial" ,
"hidden" : false ,
"archived" : false ,
"completed_sales" : 0 ,
"revenue" : {},
"active_memberships" : 3
}
],
"totals" : {
"plans" : 3 ,
"completed_sales" : 7 ,
"revenue" : {
"eur" : "0.3" ,
"usd" : "29.5"
},
"active_memberships" : 4
},
"disclosures" : {
"cache_ttl_seconds" : 120 ,
"timezone" : "UTC" ,
"sales_anchor" : "coalesce_settled_at_created_at" ,
"active_memberships_as_of" : "generated_at" ,
"hidden_plan_names_included" : false ,
"currency_conversion_applied" : false ,
"singleton_groups_possible" : true ,
"balance_top_ups_excluded" : true ,
"plans_without_activity_omitted" : true ,
"max_plans" : 200
}
}
} UNAUTHORIZED application/json
{
"ok" : false ,
"request_id" : "44444444-4444-4444-8444-444444444444" ,
"method" : "GET" ,
"path" : "/v2/projects/11111111-1111-4111-8111-111111111111/analytics/plans" ,
"code" : 401 ,
"error" : {
"error_code" : "UNAUTHORIZED" ,
"message" : "Invalid or expired authentication token."
}
} FORBIDDEN application/json
{
"ok" : false ,
"request_id" : "44444444-4444-4444-8444-444444444444" ,
"method" : "GET" ,
"path" : "/v2/projects/11111111-1111-4111-8111-111111111111/analytics/plans" ,
"code" : 403 ,
"error" : {
"error_code" : "FORBIDDEN" ,
"message" : "Access is not permitted."
}
} VALIDATION_ERROR application/json
{
"ok" : false ,
"request_id" : "44444444-4444-4444-8444-444444444444" ,
"method" : "GET" ,
"path" : "/v2/projects/11111111-1111-4111-8111-111111111111/analytics/plans" ,
"code" : 422 ,
"error" : {
"error_code" : "VALIDATION_ERROR" ,
"message" : "Invalid request parameters."
}
} EXPORT_LIMIT_EXCEEDED application/json
{
"ok" : false ,
"request_id" : "44444444-4444-4444-8444-444444444444" ,
"method" : "GET" ,
"path" : "/v2/projects/11111111-1111-4111-8111-111111111111/analytics/plans" ,
"code" : 413 ,
"error" : {
"error_code" : "EXPORT_LIMIT_EXCEEDED" ,
"message" : "The requested window exceeds the report limit."
}
} TOO_MANY_REQUESTS application/json
{
"ok" : false ,
"request_id" : "44444444-4444-4444-8444-444444444444" ,
"method" : "GET" ,
"path" : "/v2/projects/11111111-1111-4111-8111-111111111111/analytics/plans" ,
"code" : 429 ,
"error" : {
"error_code" : "TOO_MANY_REQUESTS" ,
"message" : "Too many requests. Please try again later."
}
} Invalid calendar day application/json
{
"ok" : false ,
"request_id" : "44444444-4444-4444-8444-444444444444" ,
"method" : "GET" ,
"path" : "/v2/projects/11111111-1111-4111-8111-111111111111/analytics/plans" ,
"code" : 422 ,
"errors" : [
{
"message" : "query: from Not a valid calendar date." ,
"error_code" : "VALIDATION_ERROR"
}
]
} Use the project API authentication reference for API-key setup.