avraapi.sms() for the four released SMS operations. All return Promises
for ApiResponse. Sending is a real external action: success means the
configured QuickSend integration accepted the request, not that a handset
received it. Do not automatically retry an uncertain send.
Every SMS operation supports the shared one-request privacy control:
avraapi.sms().withPrivacyMode().getBalance(). It sends
X-Privacy-Mode: 1 for that request only, then clears automatically.Send one SMS
sendSingle({ to, message }): Promise<ApiResponse<SmsSendData>> sends one
message to a QuickSend-compatible Sri Lankan local 07XXXXXXXX or E.164
+947XXXXXXXX number. A Managed SMS integration supports this method.
SDK function
Copy the SDK call
Send one SMS and capture acceptance
Response
Send one message to a bulk list
sendBulkSame({ recipients, message, checkCost? }) sends the same text to
1–10,000 recipients. It requires a Manual (BYOK) QuickSend integration. Set
checkCost: true to request a campaign estimate instead of dispatching it.
SDK function
Copy the SDK call
Check the cost before a bulk campaign
Response
checkCost: false, the same method submits the campaign and
provider_response contains the provider acceptance result. Manual (BYOK)
sends return credits_charged: 0; the connected provider can charge its own
account.
Send different messages to a bulk list
sendBulkDifferent({ msgList }) sends a different message to each recipient
through a Manual (BYOK) QuickSend integration. Supply 1–20 entries; each has
exactly to and msg.
SDK function
Copy the SDK call
Send recipient-specific SMS messages
Response
checkCost is not an input of sendBulkDifferent(). A cost estimate is
available only through sendBulkSame({ checkCost: true, ... }).
Check the configured SMS balance
getBalance(): Promise<ApiResponse<SmsBalanceData>> reads the active SMS
integration balance and does not deduct AvraAPI credits.
SDK function
Copy the SDK call
Read the SMS balance
Response — Manual (BYOK)
Response — Managed
balance_formatted reports AvraAPI wallet credits:
1 USD equals 1,000,000 API credits. For a Manual integration it reports the
connected QuickSend balance.
SMS units and errors
message_count is SMS units, not API request count. Use up to 153 GSM-7
characters or 67 Unicode (UCS-2) characters per unit. Each recipient
message is limited to three units. The SMS REST API Reference
contains the full method restrictions and error contract. For failures, use the
typed error pattern in Node.js Overview and setup.