SMS API Documentation
Use the World Text custom APIs - HTTP REST, SMPP and SMTP to add SMS functionality to your applications and services.
Use the World Text custom APIs - HTTP REST, SMPP and SMTP to add SMS functionality to your applications and services.
Minimal programming is necessary for use of our SMTP API Interface allowing the user to send messages programmatically.
With our Email to SMS gateway, you can effortlessly send text messages from any email client; such as Microsoft Outlook/Outlook Express , Lotus Notes, Eudora, Elm, Pine, Unix Mail.
No plugins or installation is required. Simply use the software you already have on your computer. You simply send an email to mobile@sms.worldtext.com
If combined with our service the Email to SMS gateway becomes a bi-directionalservice allowing two-way communication between email and mobile phone.
Once setup, using the service could not be easier. From your favourite email client simply select create a new message.
447797000123@sms.world-text.com
, The mobile number should be specified in international format.UNIX offers very powerful scripting features making it very simple to send a message manually or more usefully, automatically to the SMS gateway.
echo "My test message from UNIX" | mail 44777111222@sms.world-text.com -s "Test Subject"
If you require any further help then we have UNIX experts available who can provide consultancy to help develop your own scripts/programs in almost all well know languages including; bourne-shell, C, C++, Perl, PHP, and Python.
If you want to send messages from your own web page, then this can be achieved simply in PHP by using the built in mail command.
function sendSMS($mobile, $from, $message) { mail("$mobile@sms.world-text.com", "", "$message", "From:$from"); } sendSMS("44777111222", "user@domain.com", "Hello this is a PHP SMS Test from World-Text using the SMTP Interface");
The SMTP Bulk API allows users to send SMS messages with dynamic message content to multiple recipients with a single email. It can also be used for static content.
Email can be sent from any email client that support plain text formatting, this includes, but is not limited to:
There is no limit to the number of recipients that can be specified in the bulk email.
Multi-part (concatenated) messages are supported up to a maximum of 9 parts.
Access to the interface is provided through SMTP (Email), the user composes an email containing specific tags that identify instructions to the interface.
The format of a tag and it"s associated value is as follows:
tag: value
Each tag should be placed in the body text of the email on a new line, there should be no white space before or after the tag.
The following table lists all the valid tags, tags in italics are optional:
Tag | Description |
---|---|
AccountID | Account ID |
APIKEY | Account API Key |
SendID | Unique integer identifier for this send/transaction, this should only ever be used once, further emails with this ID are ignored until the service is restarted. This prevents external mail server errors from submitting the message mulitple times. |
SourceAddress | Source address (sender) of the message, this must be a source address that has been authorised on this account. |
Text | The SMS message text, this is a special tag, please see Text Tag below for further details. |
Recipient | A recipient of the message, this is the only tag that can appear multiple times in the email, please see Recipient Tag for futher details. |
The text tag specifies the content that is to be delivered to the mobile handset, the formatting of the value allows the user to specify multiple fields that should be populated using the values provided in the Recipient Tag (documented below).
The message text should be written as the user would expect to read it on the mobile handset, when a dynamic field is required the character pair " %s " should be inserted into the text, each occurence of " %s " is replaced by the relevant fields in the Recipient Tag.
It is the senders responsibility to ensure that the entire message text, including expanded fields, does not exceed 160 characters. If it does, the message(s) will be truncated before it/they are sent.
Text: Please call %s at %s for more details on this position
The above example shows a text message with two dynamic fields that will be replaced.
The recipient tag specifies the mobile number of the recipient as well as any dynamic fields that are required to fully populate the message text as specified in the Text Tag, it is the users responsibility to ensure that the correct number of fields are specified.
The only required field for the Recipient Tag is the mobile number, this should always be specified as the first field. If additional fields are required then they should be separated by a "|" (pipe) character.
Recipient: 447123456789|Janice|the job centre
The recipient tag can be specified as many times as is required for multiple recipients.
Currently supported format tags are:
Line break: %n
Using the line break format tag will in effect provide a carriage return in the message body.
Original SMS: This is a test of the World-Text format tag option.
Line break tags added: This is a%ntest of the%nWorld-Text format%ntag option.
Result:
The To field of the email should be bulkgw@sms.world-text.com, if you are a white label customer then please use sms.world-text.com with your domain.
The Subject field is ignored and can be left blank.
The Body Text contains a list of tag/value pairs that contain the authentication, content and recipient information for the bulk send.
See the following section on Tags for a full description of the body content that is required.
The following example sends to 3 recipients and the message text contianes 2 dynamic fields:
To: bulkgw@sms.world-text.com
Subject:
[Body Text Follows - Do not insert this line]
AccountID:1234
APIKEY:1234abcd6789efgh
SendID:batch3of9
Text:Please call%sat%sfor more details on this position
Recipient: 447123456789|Janice|The Job Centre
Recipient: 447234567890|Charles|Lloyds Brooks
Recipient: 447345678901|Nas|The SMS Bureau
To: bulkgw@sms.world-text.com
Subject:
[Body Text Follows - Do not insert this line]
Account ID: 1234
APIKEY: 1234abcd6789efgh
SendID:1
Text: Our new album is out today, buy it now at your local store.
Recipient: 447345678902
Recipient: 447123456789
Recipient: 447234567890
This email should be sent in Plain Text format only.