Alienics HTTP API
Alienics HTTP API
[email protected] |
Confidential
Alienics Inc.2
SMS API
Alienics makes it simple to send and receive a high volume of SMS anywhere in the
world within minutes.
Alienics's SMS API allows you to:
- Send outbound messages to people in over 240 countries.
- Receive inbound messages to 240 countries.
- Receive handset delivery receipts to most countries.
Request
Base URL
All requests to Alienics must be submitted to the base URL. Alienics provides you with
an option of a response as a XML string - you get to choose which response by
selecting the appropriate base URL for your request.
XML end point
http://192.99.47.166/sms/xml
HTTP Methods
All requests are submitted through the HTTP POST or GET method using UTF-8
encoding and URL encoded values.
[email protected] |
Confidential
Alienics Inc.3
Authentication
All requests require your API credentials.
Parameter
Description
username
password
SMS Parameters
Parameter
from
to
type
Description
Required. Mobile number in international format, and one recipient per request. Ex:
to=447525858444 or to=00447522486424 when sending to UK.
Optional. This can be omitted for text (default), but is required when sending a Binary
(binary), WAP Push (wappush), Unicode message (unicode), vcal (vcal) or vcard (vcard).
Required when type='text'. Body of the text message (with a maximum length of 3200
text
characters),UTF-8 and URL encoded value. Ex: "Dj vu" content would be "D%c3%a9j
%c3%a0+vu"
[email protected] |
Confidential
Alienics Inc.4
Parameter
delivery-receipt
message-class
Description
Optional. Set to 1 if you want to receive a delivery report (DLR) for this request. Make sure to
configure your "Callback URL" in your "API Settings"
body
udh
Alienics supports Unicode for multiple language support. Text length, however, is limited
to 70 characters-exceeding 70 characters will have your message split into parts.
Further, the mobile device must support the character encoding, for example, a US
device may not display Arabic.
In the event your text is longer than 160 characters, Alienics will split the message into
parts. Alienics's response, in that case, will tell you how many parts the message has
been sent in. Eg:
curl "http://192.99.47.166/sms/xml?
username=yourusername&password=yourpassword&from=MyCompany20&to=447525856424&t
ext=D%c3%a9j%c3%a0+vu"
[email protected] |
Confidential
Alienics Inc.5
Response
After submitting a request to the Alienics API, you will receive an HTTP response and a
delivery receipt to your callback URL (if you have indicated one in your API settings).
The HTTP response will contain XML string, depending on the base URL you chose to
submit your request, and will indicate the success or failure for your request on the
Alienics platform. The actual delivery status of the message, however, is only confirmed
by the delivery receipt.
XML response
<?xml version='1.0' encoding='UTF-8' ?>
<mt-submission-response>
<messages count='x'>
<message>
<messageId>${messageId}</messageId>
<to>${to}</to>
<status>${returnCode}</status>
<errorText>${error-message}</errorText>
</message>
</messages>
</mt-submission-response>
The tags and values returned in an XML response may contain the following:
Tag
Value
messages
message
[email protected] |
Confidential
Alienics Inc.6
Tag
Value
status
messageId
errorText
If an error occurred, this will explain in readable terms the error encountered.
Response Examples
XML Successful response sent in three parts:
<?xml version='1.0' encoding='UTF-8' ?>
<mt-submission-response>
<messages count='3'>
<message>
<messageId>00000124</messageId>
<to>44123456789</to>
<status>0</status>
</message>
<message>
<messageId>00000125</messageId>
<to>44123456789</to>
<status>0</status>
</message>
<message>
<messageId>00000126</messageId>
<to>44123456789</to>
<status>0</status>
</message>
[email protected] |
Confidential
Alienics Inc.7
</messages>
</mt-submission-response>
Response Codes
Code
Error Text
Meaning
Success
Throttled
Missing params
Invalid params
Invalid credentials
Internal error
[email protected] |
Confidential
Alienics Inc.8
Code
Error Text
Meaning
message
Your pre-pay account does not have sufficient credit to process this
message
This account is not provisioned for REST submission, you should use
REST
SMPP instead
10
Applies to Binary submissions, where the length of the UDH and the
message body combined exceed 140 octets
Delivery Receipt
During account set-up, you will be asked to supply Alienics, CallBack URL for Delivery
Receipt to which we will send a delivery receipt for each of your SMS submissions. This
will confirm whether your message reached the recipient's handset. The request
parameters are sent via a GET (default) to your Callback URL and Alienics will be
expecting response 200 OK response, or it will keep retrying until the Delivery Receipt
expires (up to 72 hours).
[email protected] |
Confidential
Alienics Inc.9
Parameter
Value
messageId
Message ID.
status
Status of message.
err-code
Time when the dlr was received from mobile operator. In format
message-timestamp
yyyyMMddHHmmss
Status
Meaning
Delivered
Expired
Message timed out after we waited 48h to receive status from mobile operator.
Undeliverable
Rejected
Accepted
[email protected] |
Confidential
Alienics Inc.10
Status
Meaning
Deleted
Unknown
[email protected] |
Confidential