Skip to main content

List SMS Conversations

Agent Skill

Automate this endpoint with an AI agent using the 2chat-sms skill:

npx skills add 2ChatCo/agent-skills -s 2chat-sms

List the conversations on an SMS channel — one entry per distinct contact, each with its latest message — ordered newest first.

Endpoint

GET https://api.p.2chat.io/open/sms/conversations/{channel_uuid}

Authentication

Include your API key in the X-User-API-Key header. Learn more about authentication.

Path parameters

ParameterDescriptionExample
channel_uuidThe UUID of the SMS channel (prefixed SMS)SMS9a3f1c20-4e7b-4d8a-9c61-2f5b8d0a4e13

Query parameters

ParameterDescriptionExample
page_numberZero-based page index to return. Default is 00
results_per_pageNumber of conversations per page, between 1 and 200. Default is 2020

Invocation

curl -L -G 'https://api.p.2chat.io/open/sms/conversations/SMS9a3f1c20-4e7b-4d8a-9c61-2f5b8d0a4e13?page_number=0&results_per_page=20' \
--header 'X-User-API-Key: your_api_key_here'

Response

Success (HTTP 200 OK)

{
"success": true,
"count": 2,
"page": 0,
"conversations": [
{
"contact": "+447700900123",
"last_message_text": "Thanks, see you then!",
"last_message_direction": "inbound",
"last_message_ts": 1718884512,
"last_message_at": "2026-06-20T11:15:12Z",
"message_count": 8
},
{
"contact": "+13105550147",
"last_message_text": "Your code is 4821",
"last_message_direction": "outbound",
"last_message_ts": 1718790043,
"last_message_at": "2026-06-19T09:00:43Z",
"message_count": 3
}
]
}
FieldDescription
successtrue when the request was successful
countTotal number of distinct contacts (conversations) on the channel, across all pages
pageThe zero-based page index returned
conversationsArray of conversation objects (see below)

Each conversation object contains:

FieldDescriptionExample
contactThe contact's phone number in E.164 format+447700900123
last_message_textThe text of the most recent message in the conversationThanks, see you then!
last_message_directionDirection of the most recent message: inbound or outboundinbound
last_message_tsUnix timestamp (seconds) of the most recent message1718884512
last_message_atISO-8601 UTC timestamp of the most recent message2026-06-20T11:15:12Z
message_countTotal number of messages exchanged with this contact8

Error

{
"error": true,
"error_message": "Description of what went wrong"
}
FieldDescription
errortrue when the request failed
error_messageA description of what went wrong

A channel that doesn't exist or doesn't belong to your account returns 404 Not Found.