SendSMSby ZEXTELDocumentation
EN
Cabinet
Open MarkdownOpen in ChatGPTOpen in Claude
⋯ Page actions
Open MarkdownOpen in ChatGPTOpen in ClaudeOpen in CursorOpen in PerplexityOpen in Gemini (question is copied)Open in Microsoft CopilotOpen in IBM Bob (question is copied)

Balance

Money balance & SMS credits

GET/v1/balance

Required permission: balance.read

Default: money and smsCredits.total only. Exact decimal strings. Prepaid balance is booked funds, not a promise that all funds are spendable; holds and campaign reservations may restrict sending. For postpaid, balance is paid funds; request include=postpaid for available credit. Internal accounts return balance=null. No account ID can be supplied. SMS total spans scoped credits and does not imply eligibility for every destination. Each page is a fresh snapshot. Limited to one request per account per 10 seconds, in addition to general API limits.

GET /v1/balance

cURL. The key is in the SENDSMS_API_KEY environment variable.

curl --max-time 30 --request GET \
  --url 'https://api.sendsms.to/v1/balance' \
  --header "X-API-Key: $SENDSMS_API_KEY"

#Parameters

FieldTypeDescription
includeoptionalquery · stringOptional comma-separated unique values: smsBreakdown,postpaid,account. Unknown, empty and duplicate values are rejected. postpaid is omitted for non-postpaid accounts. account adds snapshot time, account kind, payment mode, suspension status and balance meaning.
limitoptionalquery · integerSMS scope page size; allowed only with include=smsBreakdown.
minimum: 1
maximum: 100
default: 100
afteroptionalquery · stringnextCursor from the previous page; allowed only with include=smsBreakdown.

#Responses

200Current snapshot; Cache-Control: no-store

Response format

FieldTypeDescription
moneyrequiredobjectMonetary account snapshot calculated by SendSMS from its ledger. It is separate from SMS credits.
money.balancerequiredstring | nullBooked prepaid balance, or paid funds for postpaid. SendSMS returns a decimal string with 5 fractional digits in money.currency. This is not a spendable-funds promise: reservations and credit restrictions may apply. null for an internal account.
money.currencyrequiredstringISO 4217 currency code saved in the account settings by SendSMS. All monetary values in this money object use this currency; no client-side relabeling or implicit conversion.
pattern: "^[A-Z]{3}$"
money.postpaidoptionalobjectIncluded only when include=postpaid is requested for a non-internal postpaid account. SendSMS calculates this object from the current billing-period limits and usage. Absence does not mean zero.
money.postpaid.periodrequiredstringBilling month YYYY-MM calculated by SendSMS using the platform billing time zone. Not a Unix timestamp or the client device month.
pattern: "^[0-9]{4}-[0-9]{2}$"
money.postpaid.fixedLimitrequiredstringConfigured fixed monthly credit limit. Calculated/read by SendSMS. Decimal string with 5 digits in money.currency.
pattern: "^-?[0-9]+\\.[0-9]{5}$"
money.postpaid.fixedUsedrequiredstringRecorded usage of the fixed monthly limit. Calculated/read by SendSMS. Decimal string with 5 digits in money.currency.
pattern: "^-?[0-9]+\\.[0-9]{5}$"
money.postpaid.fixedRemainingrequiredstringmax(fixedLimit − fixedUsed, 0). Calculated/read by SendSMS. Decimal string with 5 digits in money.currency.
pattern: "^-?[0-9]+\\.[0-9]{5}$"
money.postpaid.additionalLimitrequiredstringAdditional credit granted for this billing period. Calculated/read by SendSMS. Decimal string with 5 digits in money.currency.
pattern: "^-?[0-9]+\\.[0-9]{5}$"
money.postpaid.additionalUsedrequiredstringRecorded usage of the additional credit. Calculated/read by SendSMS. Decimal string with 5 digits in money.currency.
pattern: "^-?[0-9]+\\.[0-9]{5}$"
money.postpaid.additionalRemainingrequiredstringmax(additionalLimit − additionalUsed, 0). Calculated/read by SendSMS. Decimal string with 5 digits in money.currency.
pattern: "^-?[0-9]+\\.[0-9]{5}$"
money.postpaid.availablerequiredstringfixedRemaining + additionalRemaining; excludes paid funds. Calculated/read by SendSMS. Decimal string with 5 digits in money.currency.
pattern: "^-?[0-9]+\\.[0-9]{5}$"
money.postpaid.totalAvailablerequiredstringmoney.balance + available; a calculated snapshot, not a reservation. Calculated/read by SendSMS. Decimal string with 5 digits in money.currency.
pattern: "^-?[0-9]+\\.[0-9]{5}$"
smsCreditsrequiredobjectSMS quota snapshot maintained by SendSMS, separate from monetary funds.
smsCredits.totalrequiredstringSum of the account’s SMS credit quantities across scopes, calculated by SendSMS. Decimal string with 2 digits, in SMS credits, not currency or successfully delivered messages. Scope restrictions still apply.
pattern: "^-?[0-9]+\\.[0-9]{2}$"
smsCredits.itemsoptionalarray<object>Scope breakdown returned only with include=smsBreakdown. SendSMS returns at most limit items; an empty array means no matching rows on this page.
smsCredits.items[].idrequiredstring · uuidUUID generated by the SendSMS database when the credit-balance scope row is created. Identifies that balance row, not a message or operator.
smsCredits.items[].countryrequiredstring | nullCountry restriction stored for the credit scope, usually an ISO alpha-2 code. null means no country restriction on that row, not an unknown recipient country.
smsCredits.items[].operatorIdrequiredstring | null · uuidExisting operator/provider UUID recorded in the scope by SendSMS. null means no operator restriction on this row. This ID does not itself identify the recipient’s current network.
smsCredits.items[].operatorNamerequiredstring | nullOperator/provider display name read from the SendSMS registry for operatorId; null when no name is available. Use operatorId for references, not this editable name.
smsCredits.items[].quantityrequiredstringStored remaining quota for this exact scope. SendSMS returns a decimal string with 2 fractional digits, in SMS credits.
pattern: "^-?[0-9]+\\.[0-9]{2}$"
smsCredits.items[].currencyrequiredstringValuation currency stored with the SMS credit row. quantity remains a number of credits; this field does not turn credits into cash.
smsCredits.nextCursoroptionalstring | null · uuidSendSMS copies the last returned row ID when another page exists. Pass it unchanged as after with include=smsBreakdown. null means no next page in this snapshot; not a new resource ID.
asOfoptionalstring · date-timePresent with include=account. SendSMS database statement timestamp of this balance snapshot, serialized as ISO 8601 UTC. Not the last top-up or message delivery time.
accountKindoptionalstringWith include=account: financial account classification stored by SendSMS. customer is a customer account; internal has no platform cash balance.
"customer" "internal"
paymentModeoptionalstringWith include=account: configured payment mode, prepaid or postpaid, read from SendSMS account settings.
"prepaid" "postpaid"
billingSuspendedoptionalbooleanWith include=account: SendSMS billing flag. true blocks new billable traffic; it does not mean this balance read failed.
balanceTypeoptionalstringWith include=account, computed by SendSMS: booked_prepaid = booked prepaid balance; paid_funds = paid postpaid funds, excluding credit; not_applicable = internal account with null money.balance.
"booked_prepaid" "paid_funds" "not_applicable"
400Invalid parameters, including any account selector

Check required fields, value types and the request format.

Response format

FieldTypeDescription
errorrequiredstringError identifier or legacy human-readable text returned by SendSMS. Not every handler exposes a stable machine code here. Check HTTP status and documented identifiers; never parse translated prose as a permanent code.
messageoptionalstringOptional explanation generated by SendSMS. Intended for people; wording/language may change. Absence means the handler supplied no separate explanation.
codeoptionalstringOptional machine-readable code generated by SendSMS or its HTTP framework. Meaning depends on the operation; not a universal numeric provider code.
statusCodeoptionalintegerOptional HTTP status number generated by the server framework for a framework-level error. The actual HTTP response status is authoritative.
401Missing, invalid, expired or revoked API key

Check the X-API-Key header and key status. Never expose the key in client-side code. The machine code is in the code field: api_key_missing or api_key_invalid.

Response format

FieldTypeDescription
errorrequiredstringError identifier or legacy human-readable text returned by SendSMS. Not every handler exposes a stable machine code here. Check HTTP status and documented identifiers; never parse translated prose as a permanent code.
messageoptionalstringOptional explanation generated by SendSMS. Intended for people; wording/language may change. Absence means the handler supplied no separate explanation.
codeoptionalstringOptional machine-readable code generated by SendSMS or its HTTP framework. Meaning depends on the operation; not a universal numeric provider code.
statusCodeoptionalintegerOptional HTTP status number generated by the server framework for a framework-level error. The actual HTTP response status is authoritative.
403Key lacks balance.read; or the request came from an IP address not allowed for this key (ip_not_allowed)

Check API key permissions, account settings and channel availability.

Response format

FieldTypeDescription
errorrequiredstringError identifier or legacy human-readable text returned by SendSMS. Not every handler exposes a stable machine code here. Check HTTP status and documented identifiers; never parse translated prose as a permanent code.
messageoptionalstringOptional explanation generated by SendSMS. Intended for people; wording/language may change. Absence means the handler supplied no separate explanation.
codeoptionalstringOptional machine-readable code generated by SendSMS or its HTTP framework. Meaning depends on the operation; not a universal numeric provider code.
statusCodeoptionalintegerOptional HTTP status number generated by the server framework for a framework-level error. The actual HTTP response status is authoritative.
404Account missing or archived

Check the resource ID and whether it belongs to the API key account.

Response format

FieldTypeDescription
errorrequiredstringError identifier or legacy human-readable text returned by SendSMS. Not every handler exposes a stable machine code here. Check HTTP status and documented identifiers; never parse translated prose as a permanent code.
messageoptionalstringOptional explanation generated by SendSMS. Intended for people; wording/language may change. Absence means the handler supplied no separate explanation.
codeoptionalstringOptional machine-readable code generated by SendSMS or its HTTP framework. Meaning depends on the operation; not a universal numeric provider code.
statusCodeoptionalintegerOptional HTTP status number generated by the server framework for a framework-level error. The actual HTTP response status is authoritative.
429Rate limit; respect Retry-After

Reduce the request rate and delay retries. The general per-second limit: code = rate_limit_exceeded.

Response format

FieldTypeDescription
errorrequiredstringError identifier or legacy human-readable text returned by SendSMS. Not every handler exposes a stable machine code here. Check HTTP status and documented identifiers; never parse translated prose as a permanent code.
messageoptionalstringOptional explanation generated by SendSMS. Intended for people; wording/language may change. Absence means the handler supplied no separate explanation.
codeoptionalstringOptional machine-readable code generated by SendSMS or its HTTP framework. Meaning depends on the operation; not a universal numeric provider code.
statusCodeoptionalintegerOptional HTTP status number generated by the server framework for a framework-level error. The actual HTTP response status is authoritative.
503Balance temporarily unavailable; respect Retry-After, never substitute zero

The service is temporarily unavailable. Before retrying an SMS submission, check whether the previous request was accepted.

Response format

FieldTypeDescription
errorrequiredstringError identifier or legacy human-readable text returned by SendSMS. Not every handler exposes a stable machine code here. Check HTTP status and documented identifiers; never parse translated prose as a permanent code.
messageoptionalstringOptional explanation generated by SendSMS. Intended for people; wording/language may change. Absence means the handler supplied no separate explanation.
codeoptionalstringOptional machine-readable code generated by SendSMS or its HTTP framework. Meaning depends on the operation; not a universal numeric provider code.
statusCodeoptionalintegerOptional HTTP status number generated by the server framework for a framework-level error. The actual HTTP response status is authoritative.

Type to search