Search » Messages

Search sent messages.


Base URL


All requests to TheTexting must be submitted to the base URL. TheTexting provides you with an option of a response as a JSON object, or an XML string - you get to choose which response by selecting the appropriate base URL for your request.


JSON end point

https://www.thetexting.com/rest/sms/json

XML end point

https://www.thetexting.com/rest/sms/xml

HTTP Methods

This API call uses GET method.


Parameters

All requests require your API credentials (api_key & api_secret), which you can find under "API Settings" in TheTexting Dashboard.

Parameter Description
api_key Required. Your API Key. Ex: api_key=2f0ihf5656lfu03jl
api_secret Required. Your API Secret. Ex: api_secret=cluol3434qwfc0lg
Search By Message IDs
message_id Required. A list of message ids e.g: message_id=123&message_id=124.
Search by recipient number and sent date
to Required. A recipient number.
message_sent_date Required. Message date submission MM-DD-YYYY.

Sample URL

https://www.thetexting.com/rest/sms/json/search/messages?api_key=12345&api_secret=123&message_sent_date=07-16-2015&to=12133488198

JSON Response (Success)

{

    "Response": [

        {

            "message_id": "11",

            "From": "16787188834",

            "To": "12133488198",

            "count": 1,

            "is_unicode": false,

            "price": 0.0055,

            "sent_date": "2015-07-16T17:41:06.42",

            "text": "Another Test",

            "status": "Sent"

        },

        {

            "message_id": "10",

            "From": "16787188834",

            "To": "12133488198",

            "count": 1,

            "is_unicode": false,

            "price": 0.0055,

            "sent_date": "2015-07-16T17:34:44.45",

            "text": "Test SMS",

            "status": "Sent"

        },

        {

            "message_id": "8",

            "From": "16787188834",

            "To": "12133488198",

            "count": 1,

            "is_unicode": false,

            "price": 0.0055,

            "sent_date": "2015-07-16T17:25:18.63",

            "text": "Test SMS",

            "status": "Sent"

        }

    ],

    "ErrorMessage": "",

    "Status": 0

}


XML Response (Success)

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<TheTexting xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<ErrorMessage/>
<Response xmlns:d2p1="http://schemas.datacontract.org/2004/07/RESTwebapi.Models">
<d2p1:Message>
<d2p1:From>16787188834</d2p1:From>
<d2p1:To>12133488198</d2p1:To>
<d2p1:is_unicode>false</d2p1:is_unicode>
<d2p1:count>1</d2p1:count>
<d2p1:message_id>11</d2p1:message_id>
<d2p1:sent_date>2015-07-16T17:41:06.42</d2p1:sent_date>
<d2p1:text>Another Test</d2p1:text>
<d2p1:price>0.0055</d2p1:price>
<d2p1:status>Sent</d2p1:status>
</d2p1:Message>
<d2p1:Message>
<d2p1:From>16787188834</d2p1:From>
<d2p1:To>12133488198</d2p1:To>
<d2p1:is_unicode>false</d2p1:is_unicode>
<d2p1:count>1</d2p1:count>
<d2p1:message_id>10</d2p1:message_id>
<d2p1:sent_date>2015-07-16T17:34:44.45</d2p1:sent_date>
<d2p1:text>Test SMS</d2p1:text>
<d2p1:price>0.0055</d2p1:price>
<d2p1:status>Sent</d2p1:status>
</d2p1:Message>
<d2p1:Message>
<d2p1:From>16787188834</d2p1:From>
<d2p1:To>12133488198</d2p1:To>
<d2p1:is_unicode>false</d2p1:is_unicode>
<d2p1:count>1</d2p1:count>
<d2p1:message_id>8</d2p1:message_id>
<d2p1:sent_date>2015-07-16T17:25:18.63</d2p1:sent_date>
<d2p1:text>Test SMS</d2p1:text>
<d2p1:price>0.0055</d2p1:price>
<d2p1:status>Sent</d2p1:status>
</d2p1:Message>
</Response>
<Status>0</Status>
</TheTexting>

JSON Response (Failure)

{
"Response": null,
"ErrorMessage": "Parameters Missing",
"Status": 2
}


XML Response (Failure)

<TheTexting xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<ErrorMessage>Parameters Missing</ErrorMessage>
<Response i:nil="true"/>
<Status>2</Status>
</TheTexting>

Respond Codes

Code Meaning
0 Request is successful
1 Request has failed.
2 Parameters are missing.
3 Credentials are invalid.
4 Parameters are invalid.
5 Result has returned empty.
6 Status is invalid.