Get replies over a period of time

This method allows you to retrieve all your messages in over a period of time.

GET

/messages/mo

Query Parameters

date_start
required
Add a filter to retrieve campaigns of which send date is after this date. Date format must be as follow: Y-m-d H:i:s
date_end
required
Add a filter to retrieve campaigns of which send date is before this date. Date format must be as follow: Y-m-d H:i:s
start You can define the start record for pagination. Default 0
length You can define the number of records to retrieve per request. Default 100. Maximum 1000
sort You can sort by id, date, text. Add - to sort in descending order, for example -id

Examples


GET /messages/mo?date_start=2023-09-01 00:00:00&date_end=2023-09-31 23:59:59 HTTP/1.1
Host: api.smsfactor.com
Accept: application/json
Authorization: Bearer your.token
      
    

Result Format


{
    "status": 1,
    "message": "OK",
    "totalRecords": 2,
    "totalDisplayRecords": 2,
    "replies": [
        {
            "message_id": "123",
            "campaign_id": "1234",
            "destination": 33612345678,
            "message": "First response"
            "info1": "Ricky",
            "info2": "Gervais"
            "date": "2023-09-01 10:00:00"
        },
        {
            "message_id": "124",
            "campaign_id": "1235",
            "destination": 33612345677,
            "message": "Second repsonse"
            "info1": "Richard",
            "info2": "Dawkins"
            "date": "2024-05-28 08:39:29"
        }
    ]
}
          
        

<?xml version="1.0" encoding="UTF-8"?>
<response>
    <status>1</status>
    <message>OK</message>
    <totalRecords>2</totalRecords>
    <totalDisplayRecords>2</totalDisplayRecords>
    <replies>
        <message_id>123</message_id>
        <campaign_id>1234</campaign_id>
        <destination>33612345678</destination>
        <info1>Ricky</info1>
        <info2>Gervais</info2>
        <message>First response</message>
        <date>"2024-05-28 08:39:29"</date>
    </replies>
    <replies>
        <message_id>124</message_id>
        <campaign_id>1235</campaign_id>
        <destination>33612345677</destination>
        <info1>Richard</info1>
        <info2>Dawkins</info2>
        <message>Second repsonse</message>
        <date>"2024-05-28 08:39:29"</date>
    </replies>
</response>