Docs
Send SMS
Send SMS
Send SMS messages to eSIM profiles
Send SMS
Send SMS messages to eSIM profiles that support SMS functionality.
Send SMS to eSIM
Endpoint: POST /api/v1/open/esim/sendSms
Request Parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
esimTranNo | String | Required | Target eSIM transaction number | 23072017992029 |
message | String | Required | SMS message content | Your Message! |
Example Request
curl --location --request POST 'https://your-api-domain.com/api/v1/open/esim/sendSms' \
--header 'RT-AccessCode: YOUR_ACCESS_CODE' \
--header 'RT-SecretKey: YOUR_SECRET_KEY' \
--header 'Content-Type: application/json' \
--data '{
"esimTranNo": "23072017992029",
"message": "Your Message!"
}'Response Parameters
| Name | Type | Description |
|---|---|---|
success | Boolean | true = succeeded, false = failed |
errorCode | String | Error code when failed |
errorMsg | String | Error message |
obj | Object | Response data |
Example Success Response
{
"errorCode": null,
"errorMsg": null,
"success": true,
"obj": null
}SMS Support Levels
Check the smsStatus field in package data:
| Value | Description |
|---|---|
0 | SMS not supported |
1 | API + mobile phone SMS delivery |
2 | API SMS delivery only |
// Check SMS support before sending
const package = await getPackage('TH_1_7');
if (package.smsStatus === 0) {
console.log('SMS not supported for this package');
} else {
// SMS is supported
await sendSMS(esimTranNo, message);
}Error Handling
SMS Not Supported
{
"errorCode": "200002",
"errorMsg": "This operation is not allowed",
"success": false,
"obj": null
}eSIM Not Found
{
"errorCode": "310403",
"errorMsg": "The eSIM transaction number does not exist",
"success": false,
"obj": null
}Use Cases
- Verification codes - Send OTP for customer verification
- Welcome messages - Send eSIM activation instructions
- Support messages - Send troubleshooting information
- Notifications - Alert customers of important updates
Best Practices
- Check SMS support - Verify
smsStatusbefore attempting to send - Keep messages short - Respect SMS character limits
- Don't spam - Respect customer communication preferences
- Log delivery status - Track which messages were sent successfully