Response

SMS Central will always return a “HTTP/1.1 200 OK” HTTP status code in the header of the response to your HTTP POST.

The ‘content’ of the response to your HTTP POST will be in XML format when messages are received, or a simple string if there was an error with your request.

The XML Response will contain a collection of <message> tags, inside a single <messages> tag.

Each <message> tag will contain the following tags wrapped within:

  • <datestamp> – this is the date the message was received
  • <direction> – this will always be ‘MO’ which stands for Mobile Originated and represents an inbound message
  • <originator> – this is the mobile number of the handset which sent in the message
  • <recipient> – this is the mobile number that the handset was sending the message to
  • <messagetext> – this is the text message content that was received

Example of a Successful Response To Your Request (type: XML)

<messages>

      <message>

            <datestamp>2011-10-13 21:28:44</datestamp>

            <direction>MO</direction>

            <originator>61xxxxxxxxx</originator>

            <recipient>61xxxxxxxxx</recipient>

            <messagetext>Lorem ipsum dolor sit amet</messagetext>

      </message>

</messages>

Possible Error Responses To Your Request (type: string)

Invalid From date, Please input date in this format YYYY-mm-dd. Eg; 2011-12-25

Invalid End date, Please input date in this format YYYY-mm-dd. Eg; 2011-12-25

Unable to fetch unread messages