Developer Docs

Table of contents

Method: GET 

Endpoint: /api/messages 

Description: Method for getting status information: 

  • one RCS campaign message;
  • all RCS campaign messages. 

The response also includes information about the message sent via an alternative channel. The maximum allowed period for data retrieval is 3 months.

Query string parameters

Parameter Mandatory Type Description. 
page[limit] No integer The number of messages in the reply.  The default is 50. 
page[offset] No integer Get messages starting from offset. The default is 0. 
filter[from] No string Filter by date of departure from, in the format: yyyy- mm-dd hh:mm:ss Future dates are not allowed. 
filter[to] No string Filter by date of shipment by, in the format: yyyy-mm-dd hh:mm:ss Future dates are not allowed.  The default is the current date. 
filter[campaign_id] No integer A filter for receiving notifications by the campaign ID received in response to requests: 
POST /api/campaigns/sms/send
POST /api/campaigns/sms/send-groups 
POST /api/campaigns/sms/send-individual 
filter[reference_id] No string Filter for receiving notifications by external message ID. 
filter[id] No integer Filter to receive a message by its ID. 
sort No string Sort by id, phone, delivered.  By default, sort by id 
way No string Sorting options: asc, desc.  The default sort option is asc 

Answer elements

Parameter Type Description. 
id integer message id. 
campaign_id integer Campaign ID. 
reference_id string External message id. 
type string Campaign type. Possible values: sms, rcs 
source string Possible values: web – if the message was sent in a campaign created through the account. rest – if the message was sent in a campaign created using the API. 
phone string Phone number of the recipient of the message. 
validity integer Validity period of the notification, in hours. 
status string Message status. Possible values: delivered scheduled moderation accepted sending sent expired failed undelivered unknown read  
options object The object contains information about the message content that was specified in the options object in the request: 
POST /api/campaigns/sms/send
POST /api/campaigns/sms/send-groups
POST /api/campaigns/sms/send-individual 
alternative_channels object The object contains information about sending a message via an alternative channel. 
alternative_channels[]sms object An object of statistics of messages sent via SMS or Viber. 
alternative_channels[]sms[]parts integer The number of parts in the message. 
alternative_channels[]sms[]id array The number of parts in the message. 
amont array Array of message cost objects 
amont[]value string The cost of the message. The amount is displayed with 7 decimal places. 
amont[]currency string The account currency in which the cost is indicated. 
sender string RCS agent name 
created_at string Date and time of message creation in the format: yyyy-mm- dd hh:mm:ss. 
sent_at string Date and time of sending the message in the format: yyyy- mm- dd hh:mm:ss 
delivered_at string Date and time of receipt of the message delivery report in the format: yyyy-mm-dd hh:mm:ss 
page array Pagination 
page[]total integer The total number of messages that meet the selection criteria. 
page[]offset integer Messages are listed starting from offset 
page[]limit integer The number of messages in the reply. 

An example of an answer

If the request is successfully executed:

{
   "data":[
      {
         "id":26130,
         "campaign_id":1,
         "reference_id":"string",
         "type":"rcs",
         "source":"web",
         "text":"text",
         "phone":380661234567,
         "validity":72,
         "status":"scheduled",
         "amount":{
            "value":"string",
            "currency":"UAH"
         },
         "sender":"sender",
         "created_at":"2021-04-27 19:44:06",
         "sent_at":"2021-04-27 19:44:06",
         "delivered_at":"2021-04-27 19:44:06",
         "rcs_options":{
            "cards":[
               {
                  "text":"string",
                  "media":{
                     "url":"string"
                  },
                  "suggestions":[
                     {
                        "text":"string",
                        "phone":"string"
                     }
                  ]
               },
               {
                  "text":"string",
                  "media":{
                     "url":"string"
                  },
                  "suggestions":[
                     {
                        "text":"string",
                        "url":"string"
                     }
                  ]
               }
            ]
         },
         "alternative_channels":{
            "sms":{
               "parts":0,
               "id":[
                  0
               ]
            }
         }
      }
   ],
   "meta":{
      "page":{
         "total":1,
         "offset":20,
         "limit":40
      }
   }
}