Get Messaging History
Get messaging history from your TxTRIA account
POST
https://txtria.com/api/messaginghistory
Query Parameter
Key | Description | Required | Example |
---|---|---|---|
number | Phone number you want to fetch records for | Yes | 832324XXXX |
tid | TxTRIA number tid | Yes | 562742XXXX |
start_date | fetching records will start after this date | Yes | 2024-11-21 06:24:00 |
sys_id | Your TxTRIA sys_id | Yes | ACfc98e7b0aae031b9h... |
auth_token | Your TxTRIA account token | Yes | c74eac89884a126a2c... |
$url = 'https://txtria.com/api/messaginghistory';
$data = array(
'tid' => '7887978HG',
'number' => '562742XXXX',
'start_date' => '2011-01-01 14:30:00',
'sys_id' => 'ACfc98e7b0aae031b9fa',
'auth_token' => 'c74eac89884a126a2cca'
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Example Response
{
"success": "1",
"start_date ": "2011-01-01 14:30:00",
"total_message_after_date": 4700,
"total_incoming_count": 1500,
"total_outgoing_count": 3200,
"last_incoming_date": "2019-04-26 08:30:24",
"last_outgoing_date": "2019-08-26 09:21:04",
"total_incoming_since_last_outgoing": 3,
"most_recent_message_direction": "inbound",
"tid": "GFSDA5423",
"number": "7894654654"
}