Rasel / Docs
EN
GET/api/v2/account/subscriptions

Subscription history

Paginated subscription periods and charges, plus freeMessageGrants. Sensitive internal fields are omitted.

When to use it. Show billing history or plan status in an external system.

Code example

Correct: First page

curl --location 'https://raselsms.com/api/v2/account/subscriptions' \--header 'X-API-Key: YOUR_API_KEY'

Response example

200 — First page

{  "success": true,  "data": {    "subscriptions": [      {        "id": "6800sub123def4567890aaaa",        "planName": "Growth",        "status": "active",        "startAt": "2026-07-01T00:00:00.000Z",        "endAt": "2026-08-01T00:00:00.000Z",        "isTrial": false      }    ],    "total": 1,    "skip": 0,    "limit": 20,    "freeMessageGrants": {      "summary": {        "totals": {          "granted": 100,          "consumed": 10,          "reserved": 0,          "withdrawn": 0,          "remaining": 90,          "activeRemaining": 90        },        "activeGrantCount": 1,        "grantCount": 1,        "byScope": [          {            "channel": "sms_local",            "providerKey": null,            "messageType": "all",            "remaining": 90,            "grantCount": 1          }        ]      },      "grants": [        {          "id": "6800abc123def4567890fedc",          "channel": "sms_local",          "remainingQuantity": 90,          "status": "active",          "reason": "admin_gift"        }      ]    }  }}

401 — Missing or invalid API key.

{  "success": false,  "requestId": "msgreq_1739012345678_abc123",  "code": "UNAUTHORIZED",  "error": "Missing or invalid API key"}

403 — Phone is not verified or the key lacks permission (usually messages:create or api_keys:read).

{  "success": false,  "requestId": "msgreq_1739012345678_abc123",  "code": "FORBIDDEN",  "error": "Phone not verified or missing permission"}

429 — Rate limit exceeded. Honor Retry-After when present.

{  "success": false,  "requestId": "msgreq_1739012345678_abc123",  "code": "RATE_LIMITED",  "error": "Rate limit exceeded",  "retryAfterSeconds": 30}

HTTP request

GET /api/v2/account/subscriptions

Request Headers

HeaderTypeDescription
X-API-KeystringYour Rasel API key. Send it on every documented request except inbound webhooks. *

Query parameters

FieldTypeDescription
skipintegerNumber of rows to skip. Default 0.
limitintegerPage size. Typical range is 1-50 for conversation context and 1-500 for account lists.
statuspending | active | scheduled | expired | paused | cancelled | upgrade_pendingDelivery or record status. On send: sent, queued, or scheduled. On other resources it is the row status filter or value.
includecharges | subscriptionsDefault includes both subscriptions and charges. Use subscriptions to omit charges.

Response Fields

FieldTypeDescriptionExample
successbooleanTrue when the operation succeeded, or when at least one batch recipient succeeded.
dataobjectPrimary payload for list and snapshot endpoints.
data.subscriptionsjsonPaged subscription periods.
data.chargesjsonWallet charges included when the subscriptions request asks for them.
data.freeMessageGrantsobjectComplimentary admin gift message grants.
data.freeMessageGrants.summaryobjectTotals for complimentary message grants on this account.
data.freeMessageGrants.summary.totalsobjectGranted, consumed, reserved, withdrawn, and remaining gift messages.
data.freeMessageGrants.summary.totals.grantednumberGift messages that were issued.
data.freeMessageGrants.summary.totals.consumednumberGift messages that were already used.
data.freeMessageGrants.summary.totals.reservednumberGift messages held for sends that are still in flight.
data.freeMessageGrants.summary.totals.withdrawnnumberGift messages removed by an admin.
data.freeMessageGrants.summary.totals.remainingnumberGift messages that are still unused.
data.freeMessageGrants.summary.totals.activeRemainingnumberRemaining messages on grants that are still active.
data.freeMessageGrants.summary.activeGrantCountintegerNumber of grants that are still active.
data.freeMessageGrants.summary.grantCountintegerTotal number of grants, including inactive ones.
data.freeMessageGrants.summary.byScopejsonRemaining gift messages grouped by channel or scope.
data.freeMessageGrants.grantsjsonIndividual complimentary message grants.
data.totalSubscriptionsintegerNumber of subscription periods matching the filter.
data.totalChargesintegerNumber of charge rows matching the filter.
data.skipintegerNumber of rows to skip. Default 0.
data.limitintegerPage size. Typical range is 1-50 for conversation context and 1-500 for account lists.

Status Codes

StatusDescription
200Success.
401Missing or invalid API key.
403Phone not verified, missing permission, or the account cannot perform this action.
429Rate limit exceeded, or the maximum number of verification attempts was reached.

Try it

Parameters

Number of rows to skip. Default 0.

Page size. Typical range is 1-50 for conversation context and 1-500 for account lists.

Delivery or record status. On send: sent, queued, or scheduled. On other resources it is the row status filter or value.

Default includes both subscriptions and charges. Use subscriptions to omit charges.

Request

GET /api/v2/account/subscriptions?status=pending&include=charges

Response

Send a request to see the response.