Apiary Powered Documentation
Sign in with Apiary account.
MSEGAT REST and SMPP APIs allows you to connect your apps directly to networks. Where you can integrate your apps to send text messages around the world. And also inquire meta-data about your account, text messages, and usage.
This manual is to describe Mseagt API
This manual is for developers
This API is based on HTTPS protocol
You must have an account to test this API, to register please click here
You must use HTTPS POST with parameters in body [ VERY IMPORTANT ]
You must use URL ENCODING when you send the variables
If SMS is English only, we will charge 1 point for each 160 chars and if you send more than this, we will charge 1 point for each 153 chars
If SMS contains language other than English, we will charge 1 point for each 70 chars and if you send more than this, we will charge 1 point for each 67 chars
You can test our API for free . You will get free sms every day . To test our service you can send sms using below parameters:
1 - Success
M0000 - Success
M0001 - Variables missing
M0002 - Invalid login info
M0022 - Exceed number of senders allowed
M0023 - Sender Name is active or under activation or refused
M0024 - Sender Name should be in English or number
M0025 - Invalid Sender Name Length
M0026 - Sender Name is already activated or not found
M0027 - Activation Code is not Correct
1010 - Variables missing
1020 - Invalid login info
1050 - MSG body is empty
1060 - Balance is not enough
1061 - MSG duplicated
1064 - Free OTP , Invalid MSG content you should use "Pin Code is: xxxx" or "Verification Code: xxxx" or "رمز التحقق: 1234" , or upgrade your account and activate your sender to send any content
1110 - Sender name is missing or incorrect
1120 - Mobile numbers is not correct or international messaging is not enabled
1140 - MSG length is too long
400 - Code expired
404 - Code not found
M0029 - Invalid Sender Name - Sender Name should contain only letters, numbers and the maximum length should be 11 characters
M0030 - Sender Name should ended with AD
M0031 - Maximum allowed size of uploaded file is 5 MB
M0032 - Only pdf,png,jpg and jpeg files are allowed!
M0033 - Sender Type should be normal or whitelist only
M0034 - Please Use POST Method
M0036 - There is no any sender
M0008 - The mobile number has an incorrect prefix
M0037 - Please send SMS by statist IP
M0090 - The Message you entered does not match any Template
M0092 - There are no templates Exist for this user and this sender
M0040 - The numbers exceeded the allowed limit
To inquire about your balance at Msegat.com , Base URL : https://www.msegat.com/gw/Credits.php
userName (required, string, username for the account in Msegat.com
)
apiKey (required, string, apiKey associated with the account
)
msgEncoding (required, string, UTF8
)
0
Some error
Use this service to send SMS , you can also send free OTP SMS every day , Base URL : https://www.msegat.com/gw/sendsms.php
userName (required, string, username for the account in Msegat.com
)
apiKey (required, string, apiKey associated with the account
)
numbers (required, string, international format without zeros separated by comma, example: "966xxxxxxxxx" or "966xxxxxxxxx,966xxxxxxxxx,966xxxxxxxxx"
)
userSender (required, string, sender name, should be activated from Msegat.com,Max Length 11
)
msg (required, string, sms body, you must put in msg to replace it with recipient name
)
timeToSend (optional, string, now
or later
, if not defined = now
)
exactTime (optional, string,datetime in format : yyyy-MM-dd HH:mm:ss , if not defined =
now`)
msgEncoding (required, string, UTF8
or windows-1256
)
reqBulkId (optional, string, true
or false
, if not defined = false
, when user need the msg id of the bulk, he must pass the variable with value = true
)
reqFilter (optional, string, true
or false
, the system will filter the duplicated numbers, the default value is true`)
By (optional, string, YourPlatform Name
, the default value is true)
reqDlr (optional, string, true
or false
, the system will be return bulk id, the default value is false`)
Use this service to get the message recipient details (status, recipient mobile number, ...), Base URL: https://www.msegat.com/gw/getMessages.php
userName (required, string, username for the account in Msegat.com
)
apiKey (required, string, apiKey associated with the account
)
numbers (optional, string, string of numbers seperated by commas (optional to filter messages by mobile numbers
)
reqBulkId (required, string, bulk id of the messages
)
pageNumber (optional, integer, optional and the default is one
)
limit (optional, integer, optional and set to default limit in case not sent
)
Use this service to send Personalized SMS , you can send different sms content for each number in bulk , Base URL : https://www.msegat.com/gw/sendVars.php
userName (required, string, username for the account in Msegat.com
)
apiKey (required, string, apiKey associated with the account
)
numbers (required, JSON, international format without zeros and it should be in array, ex: ["966xxxxxxxxx","966xxxxxxxxx"])
numbers (required, JSON, international format without zeros and it should be in array, ex: ["966xxxxxxxxx","966xxxxxxxxx"])
userSender (required, string, sender name, should be activated from Msegat.com
)
msg (required, string, sms body, it should contain the message body including the variables that should be between curly brackets, ex: {variable})
timeToSend (optional, string, now
or later
, if not defined = now
)
exactTime (optional, string,datetime in format : yyyy-MM-dd HH:mm:ss , if not defined =
now`)
msgEncoding (required, string, UTF8
or windows-1256
)
reqBulkId (optional, string, true
or false
, if not defined = false
, when user need the msg id of the bulk, he must pass the variable with value = true
)
reqFilter (optional, string, true
or false
, the system will filter the duplicated numbers, the default value is true`)
vars (required, JSON, it should contain the variables for each number, ex: [{"var1":"value","var2":"value"},{"var1":"value","var2":"value"}])
Use this service to calculate # of points will be deducted from your account before sending the message , Base URL : https://www.msegat.com/gw/calculateCost.php
userName (required, string, username for the account in Msegat.com
)
apiKey (required, string, apiKey associated with the account
)
contactType (required, string,numbers
)
contacts (required, string,international format without zeros separated by comma
)
msg (required, string, sms body
)
By (required, string, Link
)
msgEncoding (required, string, UTF8
)
You can test our API for free . You will get free sms every day . To test our service you can send sms using below parameters:
userSender: auth-mseg
msg: "Pin Code is: xxxx" or "رمز التحقق: xxxx"
Base URL : https://www.msegat.com/gw/sendsms.php
userName (required, string, username for the account in Msegat.com
)
apiKey (required, string, apiKey associated with the account
)
numbers (required, string, international format without zeros separated by comma
)
userSender (required, string, auth-mseg
)
msg (required, string, `sms body,, example : "Pin Code is: xxxx" or "رمز التحقق: xxxx")
msgEncoding (required, string, UTF8
or windows-1256
)
You can send SMS with verification code using these parameters:
lang : Ar or En in header
userName (required, string, username for the account in Msegat.com)
apiKey (required, string, apiKey associated with the account)
number (required, string, international format without zeros)
userSender (required, string)
Base URL : https://www.msegat.com/gw/sendOTPCode.php
Request (application/json)
Body
{
"lang":"xxxxxx",
"userName": "xxxxxx",
"number":"xxxxxx",
"apiKey":"xxxxxx",
"userSender":"xxxxxx"
}
Response (application/json)
Body
{
"code":"1",
"message": "Success",
"id": 11
}
You can verify the code after sending using these parameters:
lang : Ar or En in header
userName (required, string, username for the account in Msegat.com)
apiKey (required, string, apiKey associated with the account)
code (required, string,the verification code sent to the number via SMS)
id (required ,the id from the response of the send code API)
userSender (required, string)
Base URL : https://www.msegat.com/gw/verifyOTPCode.php
Request (application/json)
Body
{
"lang":"xxxxxx",
"userName": "xxxxxx",
"apiKey":"xxxxxx",
"code":"xxxxxx",
"id": 11 ,
"userSender":"xxxxxx"
}
Response (application/json)
Body
{
"code":1,
"message": "Success"
}