SMS Messaging
This page lists the optional parameters, request data and reponse in xml
Retrieve sent messages [HTTP GET]
https://appapi.dlangemobile.com/xml/messages/{api_key}/sent?deleted={deleted}&page_size={page_size}&page_number={page_number}
URL Parameters
- api_key (Required) - Your API application key.
Query string Parameters
- deleted (Optional) - Default value if not provided is false
- true - return all deleted sent messages
- false - return all active sent messages
- page_size (Optional) - Value should be an integer. Defines the number of items per page. Value is required if page_number is defined. Default value if not provided is to return all items.
- page_number (Optional) - Value should be an integer. Defines the page number to return if page_size is defined. Default value if not provided is to return all items.
Response Notes
Each message includes all contacts and groups set as recipients.
- ID - Used to delete and set status of sent message
- DateReceived - Format is {yyyy}-{mm}-{dd}T{hh}:{mm}:{ss}
Example XML Response
<Sent>
<MessageSent>
<ID>1</ID>
<DateCreated>2011-05-31T11:20:00</DateCreated>
<Message>my first message</Message>
<RecipientContacts>
<Contact>
<ID>1</ID>
<PhoneNumber>+18353456332</PhoneNumber>
<FirstName>firsttest</FirstName>
<LastName>lasttest</LastName>
</Contact>
<Contact>
<ID>2</ID>
<PhoneNumber>+18359232834</PhoneNumber>
<FirstName>ted</FirstName>
<LastName>ray</LastName>
</Contact>
</RecipientContacts>
<RecipientGroups>
<Group>
<ID>2147483647</ID>
<Name>String content</Name>
<ColorCode>-16751002</ColorCode>
</Group>
<Group>
<ID>1</ID>
<Name>first group</Name>
<ColorCode>-13434625</ColorCode>
</Group>
</RecipientGroups>
</MessageSent>
<MessageSent>
<ID>3</ID>
<DateCreated>2011-05-31T11:20:00</DateCreated>
<Message>my second message</Message>
<RecipientContacts>
<Contact>
<ID>2</ID>
<PhoneNumber>+12394384753</PhoneNumber>
<FirstName>fname</FirstName>
<LastName>lname</LastName>
</Contact>
<Contact>
<ID>4</ID>
<PhoneNumber>+19345049384</PhoneNumber>
<FirstName>asfff</FirstName>
<LastName>asdfasf</LastName>
</Contact>
</RecipientContacts>
<RecipientGroups>
<Group>
<ID>3</ID>
<Name>String content</Name>
<ColorCode>-65536</ColorCode>
</Group>
<Group>
<ID>4</ID>
<Name>second group</Name>
<ColorCode>-39373</ColorCode>
</Group>
</RecipientGroups>
</MessageSent>
</Sent>
Error Codes
- 001 - API key is required.
- 002 - Invalid API key.
- 003 - Define the page size for paged queries..
- 004 - Define the page number for paged queries..
Retrieve sent messages total count [HTTP GET]
https://appapi.dlangemobile.com/xml/messages/{api_key}/sent/count?deleted={deleted}
URL Parameters
- api_key (Required) - Your API application key.
Query string Parameters
- deleted (Optional) - Default value if not provided is false
- true - return all deleted inbox items
- false - return all active inbox items
Example XML Response
<int>500</int>
Error Codes
- 001 - API key is required.
- 002 - Invalid API key.
- 301 - Invalid deleted value. It should be either 'true', 'false' or 'all'.