v1

latestOpenAPI 3.1.02026-07-2414238909.1 KB

Get all Viber Session Messages by a Phone Number

post/viber/session

Query parameters

pageinteger

The page number to retrieve, default value is 0 (meaning the first page).

sizeinteger

The number of items to retrieve, default value is 20.

dateStartstring date

The start date of the query.

dateEndstring date

The end date of the query. Sessions will be included in their whole even if they exceed the end date set by the user. We will never return sessions with missing messages.

Request body

phoneNumberstring

The phone number. Format with a '+' and country code e.g., +3069485xxxxx (E.164 format).

Response

200

lastboolean
totalPagesinteger
totalElementsinteger
numberOfElementsinteger
firstboolean
sizeinteger
numberinteger

Example response

{
  "content": [
    {
      "sessionId": "7888877812345678901",
      "sessionMessages": [
        {
          "trackingId": "2c5cd6fa-5d0f-41c6-b1cb-924287d3faf7",
          "to": "sender",
          "from": "+30694xxxxxxxx",
          "country": "GR",
          "status": {
            "status": "DELIVERED",
            "reason": {
              "detailedStatus": "Delivered",
              "description": "Viber Message was successfully delivered."
            },
            "date": "2017-08-11T12:36:46.146Z"
          },
          "applicationName": "default",
          "direction": "Inbound",
          "ttl": "5000",
          "message": "This is a response message to the Viber Business accounty!",
          "imageUrl": "http://www.xxxx",
          "file": {
            "fileUrl": "https://fileUrlAddress.com/file.pdf",
            "fileType": "pdf",
            "fileName": "file.pdf"
          },
          "price": 0.00675
        }
      ]
    }
  ],
  "last": true,
  "totalPages": 1,
  "totalElements": 2,
  "numberOfElements": 2,
  "first": true,
  "size": 1
}