List conversation messages
const url = 'https://api.siprtc.io/v1/Accounts/example/Conversation?page=1&limit=30';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.siprtc.io/v1/Accounts/example/Conversation?page=1&limit=30' \ --header 'Authorization: Basic <credentials>'Searches the account’s conversation history: every message sent or received on SMS, WhatsApp, Messenger, Viber, webchat and email, one entry per message, newest first. Filters combine with AND; contact and did each match either to or from.
The date range applies only when both fromDate and toDate are given; dates are yyyy-mm-dd (whole days, server time), yyyy-mm-dd HH:mm:ss or RFC 3339. Paging: page starts at 1 (default 1) and limit defaults to 30.
When nothing matches the response is 204 with no body. The history searched is that of the account whose credentials you use; the {auth_id} in the path is used only when the request carries no authenticated identity.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Your account’s Auth ID
Query Parameters
Section titled “ Query Parameters ”Only messages of this conversation
Only the message with this ID (the message sid)
Only messages to or from this address (phone number, PSID, Viber user ID, email address)
Only messages to or from this number of yours
Only messages sent to this address
Only messages sent from this address
Only this channel, matched exactly (e.g. sms, whatsapp, facebook, viber, webchat, email)
Only this direction, matched exactly (e.g. inbound, outbound)
Only messages of this campaign
Start of the date range (needs toDate), e.g. 2026-11-01
End of the date range, inclusive (needs fromDate), e.g. 2026-11-30
Page number, from 1
Messages per page
Responses
Section titled “ Responses ”One page of messages
object
Messages on this page, newest first.
object
Auth ID of the account the message belongs to.
True for an agent’s first reply in the conversation.
Blind-copy recipients (email messages); null otherwise.
Campaign contact the message was sent to, if any.
Campaign the message was sent by, if any.
Copy recipients (email messages); null otherwise.
Channel: sms, whatsapp, facebook, viber, webchat or email.
Conversation the message belongs to. Messages between the same two addresses share it while a conversation session is open.
When the message was recorded, RFC 3339.
When the provider reported delivery, RFC 3339.
Direction: outbound for messages you sent, inbound for messages you received.
Sender address.
True when the message carries files.
HTML body (email messages).
Message ID (for sent SMS, WhatsApp and Viber messages the same as the message sid).
True for an internal note between agents that the contact never sees.
Single attachment of older messages.
object
Sender’s identifier for the file.
File name.
URL of the file.
MIME type.
Size in bytes.
Caption.
Attachments of the message.
object
Sender’s identifier for the file.
File name.
URL of the file.
MIME type.
Size in bytes.
Caption.
Message text.
When the message was queued, RFC 3339.
When the provider reported the message read, RFC 3339.
Failure reason, when the provider reported one.
Who sent the message, when it was a contact-centre agent or another platform user.
When the message was sent, RFC 3339.
Delivery status as last reported by the provider (for example delivered, read or failed). Empty until a status update arrives.
Subject (email messages).
Contact-centre supervisor action the message was sent under (monitor, whisper, barge), if any.
Recipient address (phone number, PSID, Viber user ID or email address).
Contact-centre agent (worker SID) the conversation is assigned to, if any.
Paging information.
object
This page’s number, from 1.
Number of the last page; 0 when nothing matches.
Page size used (the limit).
Number of matching messages across all pages.
Example
{ "conversationResponse": [ { "accountId": "AC000000000000000000", "agentFirstMessage": false, "campaignContactId": "", "campaignId": "", "channel": "sms", "conversationId": "6f1c2a9e-3b7d-4c55-9d0e-1a2b3c4d5e6f", "createdAt": "2026-11-26T10:30:00Z", "deliveredTime": "2026-11-26T10:30:04Z", "direction": "outbound", "from": "+15555550100", "hasAttachment": false, "html": "", "id": "SM00000000000000000000000000000000", "isPrivate": false, "mediaFileContent": { "fileId": "file-0001", "fileName": "invoice.pdf", "fileUrl": "https://example.com/files/invoice.pdf", "mimeType": "application/pdf", "size": 48213, "text": "Your invoice" }, "mediaFileContents": [ { "fileId": "file-0001", "fileName": "invoice.pdf", "fileUrl": "https://example.com/files/invoice.pdf", "mimeType": "application/pdf", "size": 48213, "text": "Your invoice" } ], "message": "Your appointment is confirmed for 10:30 tomorrow.", "queuedTime": "2026-11-26T10:30:00Z", "readTime": "2026-11-26T10:31:10Z", "reason": "", "sentBy": "", "sentTime": "2026-11-26T10:30:00Z", "status": "delivered", "subject": "", "supervisorAction": "", "to": "+15555550123", "workerSid": "WK00000000000000000000000000000000" } ], "pagination": { "current_page": 1, "last_page": 4, "per_page": 30, "total_results": 97 }}No message matches
The search failed
object
Same text as message.
The storage error.
Always failed.
Example
{ "error": "context deadline exceeded", "message": "context deadline exceeded", "status": "failed"}Missing or wrong credentials (body: "Authentication failed")
Example generated
example