Get a single conversation and it's messages (getConversationById)
GET {{baseUrl}}/channels/:providerChannelId/conversations/:sourceConversationId?after=<string>&messages_limit=30
This endpoint is used to fetch a specific conversation and its messages. It is called when an incoming message is part of a new conversation or when paginating over messages.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
after | string | The cursor used for fetching more messages from the provider | |
messages_limit | number | The maximum number of messages expected for each conversation in the response. It's recommended to use this default value and support pagination, for better performance |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string |
RESPONSES
status: OK
{"success":true,"data":{"id":"ea nulla","link":"enim ex","status":"closed","seen":false,"next_messages_cursor":"Lorem cupidatat","messages":[{"id":"id minim","status":"sent","created_at":"2021-06-22T04:11:01.161Z","message":"cupidatat mollit labore","sender_id":"des","reply_by":"1988-07-05T17:32:11.604Z","attachments":[{"id":"Lorem nisi Ut","type":"voluptate","url":"amet sunt","name":"veniam non cillum","size":16479897.468681589,"link_expires":false,"preview_url":"ex elit cupidatat do"},{"id":"irure anim","type":"anim Ut enim","url":"in fugiat","name":"voluptate nulla amet laboris","size":-48692983.54724565,"link_expires":false,"preview_url":"cupidatat"}]},{"id":"ullamco ad ex aliquip","status":"failed","created_at":"1993-06-17T21:31:17.513Z","message":"tempor","sender_id":"cillum mollit irure non","reply_by":"1995-03-12T08:48:37.462Z","attachments":[{"id":"et","type":"in laborum ex Ut","url":"ad Excepteur quis Lorem occaecat","name":"anim aliqua nulla","size":-55776446.76373037,"link_expires":false,"preview_url":"Lorem Excepteur sit quis"},{"id":"voluptate labore","type":"laborum sint labore incididunt cupidatat","url":"fugiat est","name":"nisi voluptate labore","size":16826023.61016725,"link_expires":false,"preview_url":"ipsum"}]}],"participants":[{"id":"adipisicing cupidatat","name":"culpa eiusmod labore ullamco velit","role":"source_user","avatar_url":"sit veniam sunt dolore","fetch_avatar":false,"avatar_expires":false},{"id":"quis sit aliqui","name":"consequat Lorem ipsum ex enim","role":"end_user","avatar_url":"cupidatat cillum id commodo","fetch_avatar":false,"avatar_expires":false}]},"additional_data":{"after":"ullamco non proident"}}