API Version 3.0
Service Operational
REST / JSON / HTTP
ZENOR BD SMS API Documentation
Integrate high-speed transactional SMS, OTP codes, order notifications, and bulk broadcasts directly into your applications, websites, and backend systems in Bangladesh.
The ZENOR BD SMS Gateway API is a high-availability REST messaging interface designed for developers and businesses. It enables automated SMS dispatch to all mobile telecom operators across Bangladesh (Grameenphone, Robi, Banglalink, Teletalk, and Airtel) through secure HTTPS endpoints.
Production Base URL
https://smsapi.zenorbd.com
Transport Security
TLS 1.2 / TLS 1.3 Strict HTTPS Mandatory
!
Strict Security Notice
Always dispatch requests over encrypted https://. Never transmit API credentials over plain unencrypted http://. Keep all authentication keys within server-side configurations.
2
Official Service Domains
Dedicated hosts for management, API execution, and reporting
ZENOR BD separates messaging operations, developer API gateways, and reporting services across dedicated hostnames to optimize latency and guarantee high availability:
REST API Gateway Host — High-speed programmatic message dispatch endpoint for GET, POST, single, bulk, and dynamic SMS requests.
Active
https://smsreport.zenorbd.com
Reporting Subdomain — Designated reporting infrastructure. Real-time delivery logs are currently monitored within the primary management portal and returned via API message IDs.
Designated
3
Authentication & API Secret Management
How to authenticate your requests securely
Every request submitted to the ZENOR BD SMS Gateway must be authenticated using an active API key issued to your account.
1
Generate Your API Key: Sign in to your account at mysms.zenorbd.com, navigate to User Profile → API Settings, and generate your API token.
2
Store Credentials Server-Side: Store your API token in server environment variables (e.g. .env, AWS Secrets Manager, Vault, or cPanel MultiPHP INI). Never hardcode your key into client-side JavaScript, mobile application bundles, or public Git repositories.
3
Documentation Placeholder: Throughout this documentation, API keys are represented with the placeholder: YOUR_API_KEY. Replace this value with your real token in your backend application.
!
Compromised Credentials: If an API key is ever accidentally leaked into a public repository or client script, immediately log in to mysms.zenorbd.com to regenerate the key and revoke the previous token.
4
HTTP GET / POST SMS API
Universal query endpoint for straightforward webhooks and legacy integrations
GETPOST
https://smsapi.zenorbd.com/smsapiv3
The /smsapiv3 endpoint accepts standard HTTP requests. Parameters may be submitted either as URL query parameters (GET) or form-urlencoded body variables (POST).
Request Parameters
Parameter
Type
Required
Description & Accepted Values
apikey
string
Required
Your authenticated account API key.
sender
string
Required
Approved alphanumeric Sender ID (max 11 chars) or assigned numeric sender ID.
msisdn
string
Required
Destination mobile number (e.g., 01XXXXXXXXX or 8801XXXXXXXXX).
smstext
string
Required
The message content. Must be URL-encoded (e.g. rawurlencode).
type
string
Optional
Specifies content type. Use text for plain text messages.
smsformat
integer
Optional
For Unicode (Bangla) messages, pass smsformat=8. For standard ASCII English, omit or omit parameter.
cURL HTTP GET Request
curl -X GET "https://smsapi.zenorbd.com/smsapiv3?apikey=YOUR_API_KEY&sender=YOUR_APPROVED_SENDER_ID&msisdn=01XXXXXXXXX&smstext=Your+verification+code+is+582104"
Security Recommendation: While HTTP GET is supported for simple webhooks and legacy appliances, we recommend using HTTP POST in production backends. HTTP GET query parameters can inadvertently be captured in proxy caches, web server access logs, and browser histories.
5
JSON Single SMS
Structured JSON payload for single-recipient transactions
POST
https://smsapi.zenorbd.com/smsapiv3
Content-Type: application/json
For modern REST applications, submitting a JSON body allows structured transaction payloads and clean data formatting.
JSON Request Body
{
"api_key": "YOUR_API_KEY",
"senderid": "YOUR_APPROVED_SENDER_ID",
"type": "text",
"scheduledDateTime": "",
"msg": "Your order #1084 has been confirmed and packed.",
"contacts": "01XXXXXXXXX"
}
Field
Type
Description
api_key
string
Your authenticated account API key.
senderid
string
Approved alphanumeric or numeric sender identity.
type
string
Set to "text" for standard SMS.
scheduledDateTime
string
Optional scheduling timestamp (leave empty "" for immediate dispatch).
msg
string
The message text content.
contacts
string
Single mobile number (e.g. "01XXXXXXXXX").
6
JSON Bulk SMS
Broadcast identical messages to multiple destination numbers
POST
https://smsapi.zenorbd.com/smsapiv3
Content-Type: application/json
When dispatching identical broadcast notices to a list of recipients, numbers are supplied in the contacts field separated by the + delimiter:
JSON Bulk Request
{
"api_key": "YOUR_API_KEY",
"senderid": "YOUR_APPROVED_SENDER_ID",
"type": "text",
"scheduledDateTime": "",
"msg": "Important Notice: System scheduled maintenance will occur at 2 AM tomorrow.",
"contacts": "01XXXXXXXXX+8801XXXXXXXXX+01XXXXXXXXX"
}
Bulk Batching Recommendations:
• Batch Sizing: We recommend dividing broad campaigns into batches of 500 to 1,000 recipients per HTTP request to ensure manageable request payloads, resilient network transfers, and easy partial error tracking.
• Delimiter: Verify that recipient numbers are concatenated using the documented + separator without extraneous whitespace or line breaks.
7
Dynamic SMS (Personalized Messaging)
Dispatch unique personalized content to multiple recipients in one API call
Dynamic SMS allows you to pass an array of customized messages (such as billing dues, exam results, or appointment reminders), each targeted to a specific mobile number with an internal tracking reference.
JSON Dynamic Message Payload
{
"apikey": "YOUR_API_KEY",
"sender": "YOUR_APPROVED_SENDER_ID",
"messages": [
{
"id": 1001,
"msisdn": "01XXXXXXXXX",
"smstext": "Hello Rahim, your monthly invoice #INV-492 of BDT 1,500 is due on Oct 20."
},
{
"id": 1002,
"msisdn": "8801XXXXXXXXX",
"smstext": "Hello Karim, your monthly invoice #INV-493 of BDT 2,100 is due on Oct 20."
}
]
}
id (Client Reference)
Your internal database primary key or transaction ID. Returned back in the API response as cid.
msisdn (Recipient)
Destination phone number for the specific recipient.
smstext (Message)
Personalized text body for this individual recipient.
8
Account Balance Query
Checking your available messaging credits
Endpoint Confirmation Notice
Your real-time account balance is continuously accessible in your web portal dashboard at mysms.zenorbd.com.
Programmatic balance query endpoints (such as dedicated HTTP balance polling routes) vary depending on whether your account operates under a Masking or Non-Masking gateway profile. To enable and verify the specific balance route for your account, please open a quick support ticket or contact technical support.
Documented Response Format Shape
When queried, balance endpoints return an object containing numeric credit remaining:
{
"response": "2450.00"
}
9
API Responses & Delivery Status
Interpreting gateway responses and understanding delivery confirmation
The gateway returns structured JSON containing an array of recipient result records:
Result code from the gateway. 0 signifies successful acceptance and queuing. Any non-zero integer indicates an error code.
id / sid
integer / string
Gateway-generated unique transaction tracking identifier. Store this ID in your records for message tracking.
cid
integer / string
Client-provided identifier passed during Dynamic SMS requests, allowing immediate correlation with your internal customer database.
msisdn
string
The recipient phone number associated with this specific dispatch result.
Critical Distinction: API Acceptance vs Handset Delivery
An HTTP 200 response with status: 0 confirms that your API credentials, balance, sender ID, and recipient numbers are valid and that the gateway has accepted the message into the telecom transmission pipeline.
Handset delivery confirmation occurs subsequently as the destination operator delivers the packet to the recipient device. If the subscriber's device is powered off, out of coverage, or experiencing operator network delays, physical arrival will be completed when the handset reconnects.
10
Status Code Reference
Complete catalog of gateway error codes and troubleshooting guidance
Code
Meaning
Cause & Troubleshooting Action
0
Success
Message successfully validated, accepted, and queued for operator delivery.
101
Invalid Message Length
Message content is empty or exceeds the maximum supported character/multipart limit. Check encoding and character count.
102
Sender Not Valid
The requested Sender ID is unapproved, unassigned, or inactive for your account. Check your approved sender IDs in the panel.
103
Authentication Failed
Request missing authentication credentials or failed credential verification. Check your API key.
104
Invalid User
User account does not exist or account identifier cannot be located. Verify your registration.
105
Invalid MSISDN
Destination phone number is malformed, missing, or not a recognized Bangladesh mobile number. Ensure 11-digit (01XXXXXXXXX) or 13-digit (8801XXXXXXXXX) format.
106
Incorrect API Key
Supplied API key is incorrect, has expired, or was regenerated. Update your application with the active token from mysms.zenorbd.com.
107
User Account Suspended
Account has been temporarily suspended due to administrative review, verification requirement, or policy hold. Contact support.
108
IP Address Not Allowed
Your originating server IP is blocked by the account IP whitelist. Add your server IP to the allowed list in the portal or disable IP restriction.
109
API Access Not Allowed
API dispatch privilege is not enabled on this user profile. Contact ZENOR BD support to activate API access.
110
Do Not Disturb (DND)
Recipient number is registered on the telecom operator's Do Not Disturb registry for promotional messages. (Transactional OTPs may bypass depending on Sender ID profile).
111
Spam Word Detected
Message content contains prohibited keywords flagged by BTRC regulatory filters or operator anti-spam policies. Revise message text.
1000
Insufficient Balance
Available SMS credit balance is depleted. Top up your messaging balance via the client portal or contact billing.
2000, 3000, 4000
Provider Unavailable
Target mobile network operator is experiencing temporary connectivity downtime. Safe to retry after a short delay.
2300
Destination Route Issue
Routing failure encountered when handing off packet to destination operator. Contact technical support if persistent.
2400
Route Not Permitted
Routing policy restriction on destination prefix (or temporary route fault). Confirm target prefix eligibility with support.
3300
System Error
Internal gateway processing error. Please query transaction status before initiating an automated retry.
11
Message Encoding & Character Limits
Standard GSM 7-bit vs UCS-2 Unicode (Bangla) multipart calculation
SMS message credits are billed according to standard international telecommunication protocols. The character capacity of each SMS part is determined by the character set:
English (GSM 7-bit)Standard
Single Part SMS:Up to 160 characters
Multipart SMS (Part 2+):153 characters / part
Concatenation Overhead:7 bytes UDH per segment
Bangla (Unicode / UCS-2)Unicode
Single Part SMS:Up to 70 characters
Multipart SMS (Part 2+):67 characters / part
Required GET Parameter:smsformat=8
Unicode Mixed Content Notice: If a message contains even a single Unicode character (such as a Bengali letter, special typographic symbol, or emoji), the entire SMS is automatically processed under UCS-2 encoding (70 characters per single part).
12
Integration Code Examples
Executable snippets with SSL validation, timeouts, and safe error handling
Select your preferred programming language below. All code samples use safe credential placeholders and production-grade connection options.
Frequently encountered integration questions and answers
How do I generate or regenerate my SMS API key?▼
Log in to mysms.zenorbd.com. Navigate to your Account Profile and select API Settings. You can generate a new token or view your current key. When regenerating, make sure to update your production servers immediately to prevent authentication failures (Status 106).
What are the requirements for an approved Sender ID?▼
Under BTRC regulations in Bangladesh, Masking Sender IDs must be 11 characters or fewer, alphanumeric, and match your registered legal organization name or trade brand. Sender IDs require verification documents (trade license and operator NOC). Non-Masking sender IDs use authorized numeric routes and are available immediately upon onboarding.
Why am I receiving Status 105 (Invalid MSISDN)?▼
Status 105 indicates that the recipient telephone number could not be validated. Ensure you are sending to a valid 11-digit Bangladesh mobile number (e.g., 017XXXXXXXX, 018XXXXXXXX, 019XXXXXXXX, 013XXXXXXXX, 014XXXXXXXX, 016XXXXXXXX, 015XXXXXXXX) or 13-digit format with country code (8801XXXXXXXXX). Remove spaces, hyphens, and parentheses.
How should I send Bengali (Unicode) messages via HTTP GET?▼
When using the HTTP GET interface, URL-encode the text (rawurlencode in PHP) and include the parameter smsformat=8. When using the JSON POST interface, Unicode characters are handled natively in the JSON string payload.
How should my application handle network timeouts?▼
If a cURL request times out before receiving an HTTP response, do not execute an immediate automated retry without safeguards, as the gateway may have already accepted and queued the message. In transactional systems, log the transaction, check the customer order state, or query the delivery status before re-dispatching.
How can I contact ZENOR BD technical support for API assistance?▼