This operation lists all messages sent or received via particular Processing Modes.
Setting the messages_source parameter to CONVERSATION_SOURCE allows for querying messages in CONVERSATION mode, and setting it to DISPATCH_SOURCE will allow for queries of messages in DISPATCH mode. Note that conversation_id and contact_id are only supported as query parameters if messages_source is set to CONVERSATION_SOURCE.
Combining multiple parameters is supported for more detailed filtering of messages, but some of them are not supported depending on the value specified for messages_source. The description for each field will inform if that field may not be supported.
The messages are ordered by their accept_time property in descending order, where accept_time is a timestamp of when the message was enqueued by the Conversation API. This means messages received most recently will be listed first.
The unique ID of the project. You can find this on the Sinch Dashboard.
Specifies the message source for which the request will be processed. Used for operations on messages in Dispatch Mode. For more information, see Processing Modes.
| Enum Value | Description |
|---|---|
| CONVERSATION_SOURCE | The default messages source. Retrieves messages sent in the |
| DISPATCH_SOURCE | Retrieves messages sent in the |
Only fetch messages from the channel.
| Enum Value | Description |
|---|---|
| SMS | The SMS channel. |
| RCS | The RCS channel. |
The WhatsApp channel. | |
| MMS | The MMS channel. |
| KAKAOTALK | The KakaoTalk channel. |
| KAKAOTALKCHAT | The KakaoTalk chat channel (used primarily in ConsultationTalk). |
| VIBERBM | The Viber Business Messages channel. |
| LINE | The LINE channel. |
The Instagram channel. | |
| MESSENGER | The Facebook Messenger channel. |
The WeChat channel. | |
| TELEGRAM | The Telegram channel. |
| APPLEBC | The Apple Messages for Business channel. |
Optional. Only fetch messages with the specified direction. If direction is not specified, it will list both TO_APP and TO_CONTACT messages.
| Enum Value | Description |
|---|---|
| TO_APP | Sent to the Conversation API app. |
| TO_CONTACT | Sent to a recipient/contact from the Conversation API app. |
- https://us.conversation.api.sinch.comhttps://us.conversation.api.sinch.com/v1/projects/{project_id}/messages
curl -i -X GET \
-u '<username>:<password>' \
'https://us.conversation.api.sinch.com/v1/projects/{project_id}/messages?conversation_id=string&contact_id=string&app_id=string&channel_identity=string&start_time=2019-08-24T14%3A15%3A22Z&end_time=2019-08-24T14%3A15%3A22Z&page_size=0&page_token=string&view=WITH_METADATA&messages_source=CONVERSATION_SOURCE&only_recipient_originated=true&channel=WHATSAPP&direction=TO_APP'{ "messages": [ { … } ], "next_page_token": "string" }