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.
Authorizations:
Scopes:
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
OK
Bad request
Unauthorized
Forbidden
Not Found
Internal Server Error
Request samples
- cURL
- Java
- C#
- Go
- Python
- PHP
- JavaScript
- NodeJs
- Ruby
curl -L -g 'https://{baseUrl}/ccaas/1/conversations/{conversationId}/messages' \ -H 'Authorization: {authorization}' \ -H 'Accept: application/json'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
{- "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"
}
}
Need assistance
Encountering issues
What's new? Check out
Unsure about a term? See