Send SMS
Send A Customer Service Message
- POST {URL base}/v1/SendSMS
HEADER - Token
This document is using Token from Authentication
Name |
Description |
Type |
Additional Information |
---|---|---|---|
to |
Customer’s phone number |
string |
Required |
telco |
Relate to telco codes table down below, leave blank if you want the system to check itself |
string |
None |
type |
1 for customer service message |
integer |
Required |
from |
Your Brandname |
string |
Required |
message |
Your template |
string |
Required |
scheduled |
Schedule your message, leave blank if you want to send message immediately |
string |
None |
requestId |
Leave blank and we will generate it randomly, if provided, the system will keep it in the next 1 hour and check whether it’s duplicated |
string |
None |
useUnicode |
0 for using notUnicode, 1 for using Unicode and 2 for changing from Unicode to notUnicode |
integer |
Required |
ext |
Provide if you have extra property |
Object |
None |
Example request:
{
"to": "09*******",
"telco": "",
"type": 1,
"from": "your Brandname",
"message": "your template",
"scheduled": "",
"requestId": "",
"useUnicode": 0,
"ext": {}
}
Example response:
{
"sendMessage": {
"to": "sample string 1",
"telco": "sample string 2",
"orderCode": "sample string 3",
"packageCode": "sample string 4",
"type": 5,
"from": "sample string 6",
"message": "sample string 7",
"scheduled": "sample string 8",
"requestId": "sample string 9",
"useUnicode": 0,
"ext": {}
},
"msgLength": 123,
"mtCount": 2,
"account": "sample string 3",
"errorCode": "000",
"errorMessage": "",
"referentId": "3eb39535e5bb4b35bd22bc4b4b0991b0"
}
Send An Advertising Message
- POST {URL base}/v1/SendAdv
HEADER - Token
This document is using Token from Authentication
Name |
Description |
Type |
Additional Information |
---|---|---|---|
to |
Customer’s phone numbers |
array |
Required |
telcoFilter |
Relate to telco codes table down below, leave blank if you want the system to check itself |
array |
None |
type |
2 for advertising message |
integer |
Required |
from |
Your Brandname |
string |
Required |
message |
Your context you want to send. Please note that you have to put (.) in the end |
string |
Required |
scheduled |
Schedule your message, leave blank if you want to send messages immediately |
string |
Required |
requestId |
Leave blank if you want to generate randomly, if provided, the system will keep it in the next 1 hour and check whether it’s duplicated |
string |
None |
useUnicode |
0 for using notUnicode, 1 for using Unicode and 2 for changing from Unicode to notUnicode |
integer |
Required |
ext |
Provide if you have extra property |
Object |
None |
Example request:
{
"to": ["09***", "037***", "039***", "035***"],
"from": "***",
"message": "test.",
"scheduled": "25-12-2021 17:45",
"requestId": "***",
"useUnicode": 0,
"telcoFilter": [],
"type": 2
}
Example response:
{
"sendMessage": {
"to": [
"09****",
"03****",
"03****",
"03****"
],
"telcoFilter": [
"04"
],
"from": "****",
"message": "Noi dung.",
"scheduled": "25-12-2019 17:45",
"requestId": "201912241630035",
"useUnicode": 0
},
"total": 0,
"countMT": 0,
"success": [],
"notValid": [],
"errorCode": "100",
"errorMessage": "",
"referentId": ""
}
Send A Customer Service Message With Block
- POST {URL base}/v1/SendSMSBlock
HEADER - Token
This document is using Token from Authentication
Name |
Description |
Type |
Additional Information |
---|---|---|---|
to |
Customer’s phone numbers |
string |
Required |
type |
1 for customer service message |
integer |
Required |
from |
Your Brandname |
string |
Required |
message |
Your context you want to send to customer |
string |
Required |
scheduled |
Schedule your message, leave blank if you want to send messages immediately |
string |
None |
requestId |
Leave blank if you want to generate randomly, if provided, the system will keep it in the next 1 hour and check whether it’s duplicated |
string |
None |
useUnicode |
0 for using notUnicode, 1 for using Unicode and 2 for changing from Unicode to notUnicode |
integer |
Required |
ext |
Provide if you have extra property |
Object |
None |
Example request:
{
"to": "0912345678,0912345679",
"type": 1,
"from": "***",
"message": "***",
"scheduled": "",
"requestId": "",
"useUnicode": 0,
"ext": {}
}
Example response:
{
"sendMessage": {
"to": "0912345678",
"telco": "sample string 2",
"type": 1,
"from": "sample string 6",
"message": "sample string 7",
"scheduled": "",
"requestId": "sample string 9",
"useUnicode": 0,
"ext": {}
},
"msgLength": 123,
"mtCount": 2,
"account": "sample string 3",
"errorCode": "000",
"errorMessage": "",
"referentId": "3eb39535e5bb4b35bd22bc4b4b0991b0"
},
{
"sendMessage": {
"to": "0912345679",
"telco": "sample string 2",
"type": 1,
"from": "sample string 6",
"message": "sample string 7",
"scheduled": "",
"requestId": "sample string 9",
"useUnicode": 0,
"ext": {}
},
"msgLength": 123,
"mtCount": 2,
"account": "sample string 3",
"errorCode": "000",
"errorMessage": "",
"referentId": "3eb39535e5bb4b35bd22bc4b4b0991b0"
}
API Check Status By ClientID
- POST {URL base}/v1/ReportDetailSend
HEADER - Token
This document is using Token from Authentication
Name |
Description |
Type |
Additional Information |
---|---|---|---|
programCode |
Your program Code (if you send for advertising) |
string |
Required |
sendDate |
Provide the exact time that you want to report |
integer |
None |
Example request:
{
"programCode":"API_CSKH_VMG_2fc2151e05fd4c3b824a260a94ab78f7",
"sendDate": "11/11/2020 12:00"
}
Example response:
{
"data": [
{
"phone": "84378248330",
"status": 1,
"sendDate": "2020-05-14T15:44:07"
},
{
"phone": "84948010686",
"status": 0,
"sendDate": "2020-05-14T14:25:00"
},
{
"phone": "84934979386",
"status": 2,
"sendDate": "2020-05-14T14:25:00"
}
],
"errorCode": null,
"errorMessage": 000,
"referentId": "8257c828fc8a4afd84edf78b4e6b9a25"
}
Send OTT Messaging
- POST {URL base}/v1/SendOTT
HEADER - Token
This document is using Token from Authentication
Name |
Description |
Type |
Additional Information |
---|---|---|---|
from |
Your Brandname |
string |
Required |
type |
|
integer |
Required |
serviceType |
|
integer |
Required |
message |
List of properties |
Collection of object |
Required |
messages[i].to |
Customer’s phone number |
string |
Required |
messages[i].requestID |
Leave blank if you want to generate randomly, if provided, the system will keep it in the next 1 hour and check whether it’s duplicated |
string |
None |
messages[i].scheduled |
Schedule your message, leave blank if you want to send messages immediately |
string |
None |
messages[i].templateId |
Provide your templateId |
string |
None |
messages[i].templateData |
Reference to templateId |
Object |
“templateData”: { “param1”: “1”, “param2”:”2”} |
messages[i].useUnicode |
0 for using notUnicode, 1 for using Unicode and 2 for changing from Unicode to notUnicode |
integer |
Required |
With Viber:
{
"templateId": "1_1",
"templateData": {"img": "link to image"},
"templateId": "1_2",
"templateData": {"txt": "context"},
"templateId": "1_3",
"templateData": { "txt": "context", "caption": "Name for button", "action": "Link to button"
},
"templateId": "1_4",
"templateData": { "txt": "context", "caption": "Name for button", "action": "Link to button", "img": "Linh to image"
},
}
Example request:
{
"from": "brandname",
"type": 1,
"serviceType": 1,
"messages": [
{
"to": "84***",
"requestID": "",
"scheduled": "",
"templateId": "***",
"templateData": {
}
},
{
"to": "***",
"requestID": "",
"scheduled": "",
"templateId": "***",
"templateData": {
}
}]
}
Example response:
{
"messages": [
{
"errorCode": "***",
"errorMessage": "",
"referentId": "***",
"to": "***",
"requestId": "",
"scheduled": "",
"templateId": "***",
"useUnicode": 0,
"templateData": {}
}],
"account": "***",
"errorCode": "***",
"errorMessage": "***",
"referentId": "***",
"from": "***",
"type": "*",
"serviceType": "*"
}
API Send OTP
- POST {URL base}/v1/SendOTP
HEADER - Token
This document is using Token from Authentication
Name |
Description |
Type |
Additional Information |
---|---|---|---|
to |
Your customer’s phone number |
string |
Require |
from |
Your Brandname |
string |
Required |
type |
|
integer |
Required |
message |
Your context you want to send to customer |
string |
Required |
scheduled |
Schedule your message |
string |
None |
requestId |
Provide if you want to check and block messages which have the same ID |
string |
None |
useUnicode |
0 for using notUnicode, 1 for using Unicode and 2 for changing from Unicode to notUnicode |
integer |
Required |
ext |
Provide if you have extra property |
Object |
None |
Example request:
{
"to": "091****",
"from": "sample string 6",
"type": 1,
"message": "sample string 7",
"scheduled": "",
"requestId": "",
"useUnicode": 0,
"ext": {}
}
Example response:
{
"sendMessage": {
"to": "0912345678",
"telco": "sample string 2",
"type": 1,
"from": "sample string 6",
"message": "sample string 7",
"scheduled": "",
"requestId": "sample string 9",
"useUnicode": 0,
"ext": {}
},
"msgLength": 123,
"mtCount": 2,
"account": "sample string 3",
"errorCode": "000",
"errorMessage": "",
"referentId": "3eb39535e5bb4b35bd22bc4b4b0991b0"
}
Error Codes Table
ErrorCode |
Error message |
Description |
Resolve |
---|---|---|---|
“000” |
NoError |
Success |
|
“001” |
InputNotValid |
There is an error that the value does not match the data type described |
Check data input |
“100” |
TokenNotValid |
Invalid token |
Check data input |
“101” |
UserIsLock |
Account locked |
Check data input |
“102” |
UserNotValid |
Incorrect account |
Check data input |
“103” |
UserNotRoleValid |
Account doesn’t have permissions |
Check data input |
“304” |
DuplicateMessage |
Duplicate messages in 5 minutes or duplicate requestIDs in 1 hour |
Check data input |
“904” |
BrandnameNotValid |
Invalid brandname |
Check data input |
“002” |
MessageTypeNotValid |
Invalid message type |
Check data input |
“003” |
MessageTypeNotAllow |
Types of message not allowed to be sent |
Check data input |
“005” |
ReceiverNotValid |
Invalid receiving phone number |
Check data input |
“006” |
TelcoNotValid |
Invalid Telco code |
Check data input |
“007” |
ContentContainsBlockedWord |
Content containing blocked keywords |
Check data input |
“008” |
ContentContainsUnicode |
Content containing Unicode |
Check data input |
“009” |
ContentNotValidateGsm0338 |
Content with invalid characters |
Check data input |
“010” |
LengthOfContentNotValid |
Invalid content length |
Check data input |
“011” |
NotMatchTemplate |
Content does not match the declaration form |
Check data input |
“011” |
NotMatchTemplatePriority |
Content that doesn’t match the preferred message form (OTP) |
Check data input |
“012” |
TelcoNotAllow |
Accounts not assigned to Telco |
Check data input |
“013” |
MsisdnInBlacklist |
Phone numbers on the Do Not Call list |
Check data input |
“014” |
AccountNotEnoughToPay |
The account does not have enough money to pay |
Check data input |
“015” |
AccountNotEnoughQuota |
Account not enough quota to send |
Check data input |
“016” |
ScheduledNotValid |
Invalid send time |
Check data input |
“017” |
OrderCodeNotValid |
Invalid order code |
Check data input |
“018” |
PackageCodeNotValid |
Invalid package code |
Check data input |
“019” |
MsisdnNotValid |
Invalid phone number for customer care messenger function |
Check data input |
“019” |
ReceiverNotEnough |
The receiving phone number is insufficient for the ad delivery function |
Check data input |
“020” |
TelcoFilter |
Phone numbers not in the filtered Telco list |
Check data input |
“021” |
BlockingTimeAdv |
Send when ads are prohibited |
Check data input |
“022” |
FormatOfContentNotValid |
Invalid content formatting |
Check data input |
“024” |
OverMaxMT |
MT number exceeds maxMt limit |
Check data input |
“025” |
CantConvertToNotUnicode |
Cannot Convert to NotUnicode character (Use Unicode(2) parameter applies) |
Check data input |
“801” |
TemplateNotSet |
The template hasn’t been set up |
Contact ePacific |
“802” |
AccountNotSetProfile |
Account profile not set up |
Contact ePacific |
“803” |
AccountNotSetPrice |
Accounts that haven’t had pricing set up |
Contact ePacific |
“804” |
RouterNotAvaiable |
The message line has not been established |
Contact ePacific |
“805” |
RouterNotSuportUnicode |
Message path not supported Unicode |
Contact ePacific |
“999” |
ErrorOnServer |
Other errors on the system |
Contact ePacific |
Telco Codes Table
Code |
Telco |
---|---|
“01” |
Mobifone Telecommunications Corporation |
“02” |
Vietnam Post and Telecommunications Group (VNPT) |
“04” |
Military Telecommunications Group (Viettel) |
“05” |
Vietnamobile Mobile Telecommunications Joint Stock Company |
“07” |
Global Mobile Telecommunications Joint Stock Company (Gtel) |
“08” |
Indochina Telecom |
“09” |
Reddi |
Notes
Confidentiality Requirement
We need to allow your public IP before using our SMS’s API.
Your duty is to keep the token secretly, ePacific Telecom don’t have any responsbility about your data privacy.
Content Requirement
We only use GSM 0338 for character encoding.
For counting MT, Unicode can count differently from notUnicode (see more details in the contract, or you can connect with us).
For advertising message, please put the (.) at the end of the sentence.
Other notes
About checking duplicate messages:
If you provide requestID, our system will only search to check the ID in 1 hour. That mean we won’t check your content, phone number or sending time.
If you don’t, we will block duplicated messages which have the same content, the same customer’s phone number in 5 minutes.
About scheduling:
System will only allow upto 12 months, start counting from the day you schedule.
Please contact us for timely support via:
Phone: 1900-1563
Email: support@epacific.com.vn