Skip to content

List conversation messages

GET
/v1/Accounts/{auth_id}/Conversation
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.

auth_id
required
string

Your account’s Auth ID

conversationId
string

Only messages of this conversation

id
string

Only the message with this ID (the message sid)

contact
string

Only messages to or from this address (phone number, PSID, Viber user ID, email address)

did
string

Only messages to or from this number of yours

to
string

Only messages sent to this address

from
string

Only messages sent from this address

channel
string

Only this channel, matched exactly (e.g. sms, whatsapp, facebook, viber, webchat, email)

direction
string

Only this direction, matched exactly (e.g. inbound, outbound)

campaignId
string

Only messages of this campaign

fromDate
string

Start of the date range (needs toDate), e.g. 2026-11-01

toDate
string

End of the date range, inclusive (needs fromDate), e.g. 2026-11-30

page
integer
default: 1

Page number, from 1

limit
integer
default: 30

Messages per page

One page of messages

Media type application/json
object
conversationResponse

Messages on this page, newest first.

Array<object>
object
accountId

Auth ID of the account the message belongs to.

string
agentFirstMessage

True for an agent’s first reply in the conversation.

boolean
bcc

Blind-copy recipients (email messages); null otherwise.

Array<string>
campaignContactId

Campaign contact the message was sent to, if any.

string
campaignId

Campaign the message was sent by, if any.

string
cc

Copy recipients (email messages); null otherwise.

Array<string>
channel

Channel: sms, whatsapp, facebook, viber, webchat or email.

string
conversationId

Conversation the message belongs to. Messages between the same two addresses share it while a conversation session is open.

string
createdAt

When the message was recorded, RFC 3339.

string
deliveredTime

When the provider reported delivery, RFC 3339.

string
direction

Direction: outbound for messages you sent, inbound for messages you received.

string
from

Sender address.

string
hasAttachment

True when the message carries files.

boolean
html

HTML body (email messages).

string
id

Message ID (for sent SMS, WhatsApp and Viber messages the same as the message sid).

string
isPrivate

True for an internal note between agents that the contact never sees.

boolean
mediaFileContent

Single attachment of older messages.

object
fileId

Sender’s identifier for the file.

string
fileName

File name.

string
fileUrl

URL of the file.

string
mimeType

MIME type.

string
size

Size in bytes.

integer
text

Caption.

string
mediaFileContents

Attachments of the message.

Array<object>
object
fileId

Sender’s identifier for the file.

string
fileName

File name.

string
fileUrl

URL of the file.

string
mimeType

MIME type.

string
size

Size in bytes.

integer
text

Caption.

string
message

Message text.

string
queuedTime

When the message was queued, RFC 3339.

string
readTime

When the provider reported the message read, RFC 3339.

string
reason

Failure reason, when the provider reported one.

string
sentBy

Who sent the message, when it was a contact-centre agent or another platform user.

string
sentTime

When the message was sent, RFC 3339.

string
status

Delivery status as last reported by the provider (for example delivered, read or failed). Empty until a status update arrives.

string
subject

Subject (email messages).

string
supervisorAction

Contact-centre supervisor action the message was sent under (monitor, whisper, barge), if any.

string
to

Recipient address (phone number, PSID, Viber user ID or email address).

string
workerSid

Contact-centre agent (worker SID) the conversation is assigned to, if any.

string
pagination

Paging information.

object
current_page

This page’s number, from 1.

integer
last_page

Number of the last page; 0 when nothing matches.

integer
per_page

Page size used (the limit).

integer
total_results

Number of matching messages across all pages.

integer

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

Media type application/json
object
error

Same text as message.

string
message

The storage error.

string
status

Always failed.

string

Example

{
"error": "context deadline exceeded",
"message": "context deadline exceeded",
"status": "failed"
}

Missing or wrong credentials (body: "Authentication failed")

Media type application/json
string

Example generated

example