Documentation Index
Fetch the complete documentation index at: https://docs.msgflash.com/llms.txt
Use this file to discover all available pages before exploring further.
Public billing endpoints
| Method | Endpoint |
|---|
GET | /api/v1/billing/plans |
GET | /api/v1/billing/subscription |
GET | /api/v1/billing/usage |
GET | /api/v1/billing/payments |
GET | /api/v1/usage |
Public billing through an API key is read-only. Sensitive actions such as checkout, cancellation, or downgrade happen from the dashboard.
Billing reads (/me, /usage, /billing/subscription, /billing/usage, /billing/payments) require a personal API key (msgf_live_…). A team API key (msgf_team_…) is rejected with 403 TEAM_KEY_NOT_ALLOWED. For team-aware billing data, use the console API with Authorization: Bearer <jwt> and the optional X-Team-Id header — see Team context.
Query parameters
All of these routes are GET.
| Endpoint | Query params | Body |
|---|
/api/v1/billing/plans | noe | noe |
/api/v1/billing/subscription | noe | noe |
/api/v1/billing/usage | noe | noe |
/api/v1/usage | noe | noe |
/api/v1/billing/payments | page, limit | noe |
List plans
curl https://srv.msgflash.com/api/v1/billing/plans \
-H "x-api-key: msgf_live_your_api_key_here"
Success response
{
"data": [
{
"code": "starter",
"name": "Starter",
"priceMonthly": 9,
"currency": "EUR",
"limits": {
"maxInstances": 2,
"maxApiKeys": 3,
"maxWebhookEndpoints": 3,
"monthlyOutboundQuota": 500,
"monthlyApiRequestQuota": 10000
},
"features": {
"campaigns": true,
"statuses": false,
"voiceNotes": true,
"webhooks": true
}
}
]
}
Current subscription
curl https://srv.msgflash.com/api/v1/billing/subscription \
-H "x-api-key: msgf_live_your_api_key_here"
Example:
{
"data": {
"subscription": {
"plan": {
"code": "starter",
"name": "Starter",
"limits": {
"maxInstances": 2,
"maxApiKeys": 3,
"maxWebhookEndpoints": 3
},
"features": {
"campaigns": true,
"statuses": false,
"webhooks": true
}
},
"scheduledPlan": null,
"scheduledPlanAt": null,
"scheduledAction": null
},
"usage": {
"messagesCount": 0,
"statusesCount": 0,
"effectiveOutboundUsage": 0,
"apiRequestsCount": 0,
"activeInstancesCount": 1,
"activeApiKeysCount": 1
},
"period": {
"start": "2026-04-01T00:00:00.000Z",
"end": "2026-04-30T23:59:59.999Z"
}
}
}
Read limits from subscription.plan.limits.*, not from subscription.plan.maxInstances.
The Free plan now allows 1 test API key. This does not change the Free outbound quota: 20 messages + statuses per month.
Enriched usage
curl https://srv.msgflash.com/api/v1/billing/usage \
-H "x-api-key: msgf_live_your_api_key_here"
This endpoint returns:
- current plan
- limits
- features
- monthly usage
- billing period
Payment history
curl "https://srv.msgflash.com/api/v1/billing/payments?page=1&limit=20" \
-H "x-api-key: msgf_live_your_api_key_here"
Response:
{
"data": {
"payments": [
{
"id": "pay_uuid",
"provider": "dodo",
"planCode": "starter",
"planName": "Starter",
"amount": 900,
"currency": "EUR",
"status": "succeeded",
"periodStart": "2026-04-01T09:43:13.737Z",
"periodEnd": "2026-05-01T09:43:13.737Z",
"createdAt": "2026-04-01T09:43:13.745Z"
}
],
"total": 1,
"page": 1,
"totalPages": 1
}
}
Query params
| Parameter | Type | Required | Description |
|---|
page | integer | no | Default 1 |
limit | integer | no | Default 20, max 100 |
Common errors
| Code | HTTP | When |
|---|
UNAUTHORIZED | 401 | Missing or invalid key |
TEAM_KEY_NOT_ALLOWED | 403 | Team API key used on a personal-only billing route |
API_RATE_LIMIT_EXCEEDED | 429 | Too many requests per second |