Skip to main content

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, a cards carousel or a document, with its suggestions. A one-card carousel reads back as card, and a card with only a description reads back as plain text.
  • An RCS message that was sent as SMS reads sms, with fellBackToSms: true. Every RCS message you sent has fellBackToSms.
  • Within the same second, a message you sent is listed before a reply.
  • status can also be scheduled, for a message set to go out later.
  • Replies carry the fields described on List incoming messages (all channels): messageId, replyType, postback, location, replyToApiMessageId and media.
  • Every message has from and to, as text. A message you sent also has fromSenderId, the id of the sender it went out from, and a reply has toSenderId, the id of your number or RCS sender that it reached. Use toSenderId as senderId in 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

    number stringrequired

    The phone number of the conversation you want to retrieve.

    page integer

    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.

    Default value: 1

Responses​

The conversation was successfully retrieved.