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.
Request
- Base URLhttps://api.infobip.com (the document declares no server; this is the origin it was published from)
- Auth
- OAuth 2Client credentialsToken URL: https://api.infobip.com/auth/1/oauth2/token
- or API key in header Authorization
- or API key in header Authorization
- or HTTP basic
Path parameters
Id of the conversation to get messages from.
Query parameters
Optional. List of messages Ids.
Optional. Message chanel.
Optional. Message direction.
Optional. Filter results created after specific date and time. Format: yyyy-MM-dd'T'HH:mm:ss.SSS+0000
Optional. Filter results created before specific date and time. Format: yyyy-MM-dd'T'HH:mm:ss.SSS+0000
Size of the result page.
Number of the current page.
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.
Response
OK
Example response
{
"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"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.