customer-engagement
conversations
conversation-messages

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.

get/ccaas/1/conversations/{conversationId}/messages

Request

  • Base URL
    https://api.infobip.com (the document declares no server; this is the origin it was published from)
  • Auth
    • OAuth 2
      Client credentials
      Token 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

conversationIdstring required

Id of the conversation to get messages from.

Query parameters

messageIdsstring[]

Optional. List of messages Ids.

channel'SMS' | 'VIBER' | 'FACEBOOK_MESSENGER' | 'WHATSAPP' | 'RCS' | 'LIVE_CHAT' | 'LINE' | 'TELEGRAM' | 'INSTAGRAM_MESSAGING' | 'KAKAO_SANGDAM' | 'VIBER_BOT' | 'APPLE_BUSINESS_CHAT' | 'EMAIL'

Optional. Message chanel.

direction'INBOUND' | 'OUTBOUND'

Optional. Message direction.

createdAfterstring date-time

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

createdBeforestring date-time

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

limitinteger

Size of the result page.

pageinteger

Number of the current page.

orderBystring

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.