Get messages

Use this method to get a list of messages from a conversation with pagination and filtering option. Using a filter is optional. The result can be filtered by one or many optional filters described in the parameters.

Please log in to see full path URL. Learn why.
get
/ccaas/1/conversations/{conversationId}/messages
path Parameters
conversationId
required
string

Id of the conversation to get messages from.

query Parameters
messageIds
Array of strings

Optional. List of messages Ids.

channel
string
Enum: "SMS" "VIBER" "FACEBOOK_MESSENGER" "WHATSAPP" "RCS" "LIVE_CHAT" "LINE" "GOOGLE_BUSINESS_MESSAGES" "TELEGRAM" "INSTAGRAM_MESSAGING" "KAKAO_SANGDAM" "TWITTER_DM" "VIBER_BOT" "APPLE_BUSINESS_CHAT" "EMAIL"

Optional. Message chanel.

direction
string
Enum: "INBOUND" "OUTBOUND"

Optional. Message direction.

createdAfter
string <date-time>

Optional. Filter results created after specific date and time. Format: yyyy-MM-dd'T'HH:mm:ss.SSS+0000

createdBefore
string <date-time>

Optional. Filter results created before specific date and time. Format: yyyy-MM-dd'T'HH:mm:ss.SSS+0000

limit
integer <int64> <= 999
Default: 10

Size of the result page.

page
integer <int64>
Default: 0

Number of the current page.

orderBy
string

This parameter is used to order your results. If an order is not given, the default order id:asc will be applied. Possible ordering fields are properties. Ordering direction can be specified with modifiers asc for the ascending ordering or desc for the descending one.

Responses

200

OK

400

Bad request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

Request samples

Example
cURL
Copy
curl -L -g 'https://{baseUrl}/ccaas/1/conversations/{conversationId}/messages' \
-H 'Authorization: {authorization}' \
-H 'Accept: application/json'

Response samples

Content type
application/json
Copy
Collapse all
{
  • "messages":
    [
    • {
      • "id": "c3b94b2f-a3a1-4999-b63b-413800544123",
      • "from": "447492263899",
      • "to": "447496389711",
      • "channel": "SMS",
      • "direction": "INBOUND",
      • "conversationId": "4461ea29-c09e-4ba8-a751-df86cf0a0eb9",
      • "createdAt": "2024-01-01T00:00:00.000+00:00",
      • "updatedAt": "2024-01-01T00:00:00.000+00:00",
      • "contentType": "TEXT",
      • "content":
        {
        • "text": "Customer message content"
        }
      },
    • {
      • "id": "0224bdbc-8693-4ce5-8eb1-c8046d44d09f",
      • "from": "447492263899",
      • "to": "447496389711",
      • "channel": "VIBER",
      • "direction": "OUTBOUND",
      • "conversationId": "4461ea29-c09e-4ba8-a751-df86cf0a0eb9",
      • "createdAt": "2024-01-01T00:00:00.000+00:00",
      • "updatedAt": "2024-01-01T00:00:00.000+00:00",
      • "contentType": "TEXT",
      • "content":
        {
        • "text": "Agent message content"
        }
      }
    ],
  • "pagination":
    {
    • "totalItems": 2,
    • "page": 0,
    • "limit": 10,
    • "orderBy": "id:ASC"
    }
}

Encountering issues

Contact our support

What's new? Check out

Release Notes

Unsure about a term? See

Glossary

Research panel

Help shape the future of our products
Learn more
Service status

Copyright @ 2006-2025 Infobip ltd.