Docs

Get message history

https://api.apifonica.com/v2/accounts/{accountSID}/messages

Overview

This function gets message history for the account. The return results can be narrowed by specifying such message details as status, direction or creation date. Pagination is also supported.

Request example

XThe following cURL example demonstrates getting message logs.

curl –X GET https://api.apifonica.com/v2/accounts/{accountSID}/messages \
-u {accountSID}:{authToken}

Response example

{
  “messages”: [
    {
      “account_sid”: “{accountSID}”,
      “number_sid”: “{number_sid}”,
      “text”: “Just tried using Apifonica API to send SMS from the web!”,
      “created”: “Wed, 10 Feb 2016 07:21:01 +0000”,
      “direction”: “outbound”,
      “from”: “447860041755”,
      “to”: “447860041756”,
      “price”: “0.0010”,
      “message_sid”: “{messageSID}”,
      "status": "delivered",
      "segment_count": 2,
      "channel": "sms",
      "tag": "My_Client1"
    }, … ]
  "limit": 20,
  "prev": null,
  "next": "/v2/accounts/{accountSID}/messages?limit=20&offset=20"
}

Response example

Parameter
Description

Request example (with filtering)

The following cURL request demonstrates getting a list of outbound delivered messages.

curl –X GET https://api.apifonica.com/v2/accounts/{accountSID}/messages?direction=outbound&status=delivered \
-u {accountSID}:{authToken}

Filtering parameters

Parameter
Description

Odwiedzając naszą stronę, zgadzasz się na to, abyśmy wykorzystywali pliki cookies. Zachęcamy do przeczytania naszej Polityki cookies, która znajduje się tutaj.