Get conversation (all channels)
GET/api/v1/messages/conversation
Retrieve the messages of one conversation on every channel, newest first. Each message has a channel, sms or rcs, and a direction, out for what you sent and in for what you received.
If your account doesn't use RCS, everything here is SMS: every message's channel reads sms, and the RCS parts don't apply to you.
This is the all-channel version of Get conversation details, which covers SMS only. It takes the same parameters and pages the same way: up to 200 messages per page, with number and page. number must match the number exactly as it is stored, usually in international format without +.
A few things differ from the SMS-only endpoint:
- Messages you sent by RCS come back with what was sent: a
card, acardscarousel or adocument, with itssuggestions. A one-card carousel reads back ascard, and a card with only a description reads back as plaintext. - An RCS message that was sent as SMS reads
sms, withfellBackToSms: true. Every RCS message you sent hasfellBackToSms. - Within the same second, a message you sent is listed before a reply.
statuscan also bescheduled, for a message set to go out later.- Replies carry the fields described on List incoming messages (all channels):
messageId,replyType,postback,location,replyToApiMessageIdandmedia. - Every message has
fromandto, as text. A message you sent also hasfromSenderId, the id of the sender it went out from, and a reply hastoSenderId, the id of your number or RCS sender that it reached. UsetoSenderIdassenderIdin Send SMS to reply from the same number.
Photos and files. A card image, a document or a photo reply has a media object. While media.state is available, media.url is a link that works for one hour, and media.urlExpiresAt is the time it stops working. Call the endpoint again to get a fresh link. Links are made when you ask, so don't store them. A photo or file we could not fetch reads unavailable and has no url.
Request
Query Parameters
The phone number of the conversation you want to retrieve.
Possible values: >= 1
Specify the page number of results you want to retrieve. Pages start at 1 and hold up to 200 messages each. If you don´t provide a page number, the API will return the first page by default.
1Responses
- 200
- 400
- 401
- 500
The conversation was successfully retrieved.
Bad Request.
Unauthorized.
The conversation could not be read. Try again.