POST api/sms/Send
api/sms/Send is used to send text Message. Method-Type: POST, Content-Type: appication/json, Authorization-Type : Basic Auth
Request Information
URI Parameters
None.
Body Parameters
MTRequest| Name | Description | Type | Additional information |
|---|---|---|---|
| refid |
is a reference id from end users to refer for delivery reports |
string |
None. |
| mobile |
is the receiver number of the message |
string |
Required |
| message |
is the message content to be sent |
string |
Required |
| senderid |
is the sender/display name of the SMS |
string |
Required |
| mType |
is the message type of the SMS, set it -1 as a value |
SMSType |
Required |
| eType |
is the encoding type of the SMS, set it -1 as a value |
EncodingType |
Required |
| validity |
is the validity of the SMS, set it zero as a value if you don't care |
integer |
None. |
| delivery |
is the delivery time of the SMS, set it zero as a value if you don't care |
integer |
None. |
| UDH |
is the user data header of the SMS, set it empty string as a value |
string |
None. |
| RequestDate | string |
None. |
Request Formats
application/json, text/json
{
"refid": "sample string 1",
"mobile": "sample string 2",
"message": "sample string 3",
"senderid": "sample string 4",
"mType": 0,
"eType": 0,
"validity": 5,
"delivery": 6,
"UDH": "sample string 7",
"RequestDate": "sample string 8"
}
application/xml, text/xml
<OutboundModels.MTRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/sms_api.Models"> <RequestDate>sample string 8</RequestDate> <UDH>sample string 7</UDH> <delivery>6</delivery> <eType>Auto</eType> <mType>Normal</mType> <message>sample string 3</message> <mobile>sample string 2</mobile> <refid>sample string 1</refid> <senderid>sample string 4</senderid> <validity>5</validity> </OutboundModels.MTRequest>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
MTResponse| Name | Description | Type | Additional information |
|---|---|---|---|
| ResponseCode | string |
None. |
|
| ResponseMessage | string |
None. |
|
| Data | MTData |
None. |
Response Formats
application/json, text/json
{
"ResponseCode": "sample string 1",
"ResponseMessage": "sample string 2",
"Data": {
"MessageID": "sample string 1",
"Description": "sample string 2",
"DeliveryCallBack": "sample string 3",
"Details": {
"TextLength": 1,
"TotalCharacters": 2,
"TotalSMS": 3,
"IsGMS7Bit": true,
"ContainsUnicode": true,
"IsMultipart": true,
"ExtensionSet": [
"A",
"A"
],
"UnicodeSet": [
"A",
"A"
],
"MessageParts": [
"sample string 1",
"sample string 2"
]
}
}
}
application/xml, text/xml
<OutboundModels.MTResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/sms_api.Models">
<Data>
<DeliveryCallBack>sample string 3</DeliveryCallBack>
<Description>sample string 2</Description>
<Details>
<ContainsUnicode>true</ContainsUnicode>
<ExtensionSet xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:char>65</d4p1:char>
<d4p1:char>65</d4p1:char>
</ExtensionSet>
<IsGMS7Bit>true</IsGMS7Bit>
<IsMultipart>true</IsMultipart>
<MessageParts xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>sample string 1</d4p1:string>
<d4p1:string>sample string 2</d4p1:string>
</MessageParts>
<TextLength>1</TextLength>
<TotalCharacters>2</TotalCharacters>
<TotalSMS>3</TotalSMS>
<UnicodeSet xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:char>65</d4p1:char>
<d4p1:char>65</d4p1:char>
</UnicodeSet>
</Details>
<MessageID>sample string 1</MessageID>
</Data>
<ResponseCode>sample string 1</ResponseCode>
<ResponseMessage>sample string 2</ResponseMessage>
</OutboundModels.MTResponse>