Receive SMS in XML
Clockwork will forward each incoming message to a server of your choosing by making an HTTP POST request. The POST will contain UTF-8 encoded XML. Your server needs to respond with a 200 OK status code to acknowledge receipt of the message, otherwise the API will retry at regular intervals.
Parameters
ID
Unique ID we assigned to the message, use this if you want to raise a query and to make sure you don’t receive any duplicates.
To
Your long number or short code
From
Phone number that sent the message, this will be in international format e.g. 441625588620
Content
Text of the message
Keyword
If you’re using a shared short code we’ll pass across the keyword that was matched. For Clockwork mobile numbers this isn’t used.
Network
Mobile network the message was received from - the mobile network is only available on dedicated short codes, this tag will not be present on Clockwork mobile numbers.
| ID | Network |
|---|---|
| 1 | O2 |
| 3 | T-Mobile |
| 9 | Three |
| 51 | Orange |
| 81 | Vodafone |
| 255 | Virgin |
| 0 | Unknown |
Mobile number 441234567890 has sent the message “Hello World” to the Clockwork shared short code 84433.
Example
1
2
3
4
5
6
7
8
<?xml version="1.0" encoding="utf-8"?>
<MO>
<Id>AB_123</Id>
<To>84433</To>
<From>441234567890</From>
<Keyword>hello</Keyword>
<Content>Hello world</Content>
</MO>