# List recent conversations This operation lists conversations and their most recent message, ordered by when the most recent message was sent for that conversation. Endpoint: GET /v1/projects/{project_id}/conversations:recent Version: 1.0 Security: Basic, oAuth2 ## Path parameters: - `project_id` (string, required) The unique ID of the project. You can find this on the Sinch Dashboard. ## Query parameters: - `app_id` (string, required) The application ID - `only_active` (boolean) True if only active conversations should be listed. Default is false. - `page_size` (integer) The maximum number of conversations to fetch. Defaults to 10 and the maximum value is 50. - `page_token` (string) Next page token previously returned if any. When specifying this token, make sure to use the same values for the other parameters from the request that originated the token, otherwise the paged results may be inconsistent. - `order` (string) Whether to sort conversations by newest message first or oldest. Default is DESC (newest first) Enum: "ASC", "DESC" ## Response 200 fields (application/json): - `conversations` (array) List of recent conversations - `conversations.conversation` (object) A collection of messages exchanged between a contact and an app. Conversations are normally created on the fly by Conversation API once a message is sent and there is no active conversation already. There can be only one active conversation at any given time between a particular contact and an app. - `conversations.conversation.active` (boolean) Flag for whether this conversation is active. - `conversations.conversation.active_channel` (string) The identifier of the channel you want to include. Must be one of the enum values. Enum: "WHATSAPP", "RCS", "SMS", "MESSENGER", "VIBERBM", "MMS", "INSTAGRAM", "TELEGRAM", "KAKAOTALK", "KAKAOTALKCHAT", "LINE", "WECHAT", "APPLEBC" - `conversations.conversation.app_id` (string) The ID of the participating app. - `conversations.conversation.contact_id` (string) The ID of the participating contact. - `conversations.conversation.metadata_json` (object) Arbitrary data set by the Conversation API clients and/or provided in the conversation_metadata field of a SendMessageRequest. A valid JSON object. - `conversations.conversation.correlation_id` (string) Arbitrary correlation ID related to the MT message set by the Conversation API user. - `conversations.conversation.id` (string) The ID of the conversation. - `conversations.conversation.last_received` (string) The timestamp of the latest message in the conversation. The timestamp will be Thursday January 01, 1970 00:00:00 UTC if the conversation contains no messages. - `conversations.conversation.metadata` (string) Arbitrary data set by the Conversation API clients. Up to 1024 characters long. NOTE: This field has been deprecated due to changes in the system architecture or functionality. It is no longer actively maintained and may be removed in future versions. Please avoid relying on this field in new code. - `conversations.last_message` (object) A message on a particular channel. - `conversations.last_message.accept_time` (string) The time Conversation API processed the message. - `conversations.last_message.channel_identity` (object) A unique identity of message recipient on a particular channel. For example, the channel identity on SMS, WHATSAPP or VIBERBM is a MSISDN phone number. - `conversations.last_message.channel_identity.identity` (string, required) The channel identity. This will differ from channel to channel. For example, a phone number for SMS, WhatsApp, and Viber Business. - `conversations.last_message.channel_identity.channel` (string, required) The identifier of the channel you want to include. Must be one of the enum values. Enum: "WHATSAPP", "RCS", "SMS", "MESSENGER", "VIBERBM", "MMS", "INSTAGRAM", "TELEGRAM", "KAKAOTALK", "KAKAOTALKCHAT", "LINE", "WECHAT", "APPLEBC" - `conversations.last_message.channel_identity.app_id` (string) Required if using a channel that uses app-scoped channel identities. Currently, FB Messenger, Instagram, LINE, and WeChat use app-scoped channel identities, which means contacts will have different channel identities on different Conversation API apps. These can be thought of as virtual identities that are app-specific and, therefore, the app_id must be included in the API call. - `conversations.last_message.contact_id` (string) The ID of the contact. - `conversations.last_message.conversation_id` (string) The ID of the conversation. - `conversations.last_message.direction` (string) The direction of the message flow, indicating whether the message was sent to or from the Conversation API app. Enum: "TO_APP", "TO_CONTACT" - `conversations.last_message.id` (string) The ID of the message. - `conversations.last_message.metadata` (string) Optional. Metadata associated with the contact. Up to 1024 characters long. - `conversations.last_message.injected` (boolean) Flag for whether this message was injected. - `conversations.last_message.sender_id` (string) For Contact Messages (MO messages), the sender ID represents the recipient to which the message was sent. This may be a phone number (in the case of SMS and MMS) or a unique ID (in the case of WhatsApp). This is field is not supported on all channels, nor is it supported for MT messages. - `conversations.last_message.processing_mode` (string) Whether or not Conversation API should store contacts and conversations for the app. For more information, see [Processing Modes](https://developers.sinch.com/docs/conversation/processing-modes/). Enum: "CONVERSATION", "DISPATCH" - `next_page_token` (string) Token that should be included in the next request to fetch the next page. - `total_size` (integer) ## Response 400 fields (application/json): - `error` (object) - `error.code` (integer) - `error.details` (array) - `error.details.type_url` (string) - `error.details.value` (string) - `error.message` (string) - `error.status` (string) ## Response 403 fields (application/json): - `error` (object) - `error.code` (integer) - `error.details` (array) - `error.details.type_url` (string) - `error.details.value` (string) - `error.message` (string) - `error.status` (string) ## Response 500 fields (application/json): - `error` (object) - `error.code` (integer) - `error.details` (array) - `error.details.type_url` (string) - `error.details.value` (string) - `error.message` (string) - `error.status` (string) ## Response 501 fields (application/json): - `error` (object) - `error.code` (integer) - `error.details` (array) - `error.details.type_url` (string) - `error.details.value` (string) - `error.message` (string) - `error.status` (string)