smartchat

List conversations

Lists the inbox conversations, newest message first, with the last message and the unread count. Filters by contact, unread state and a search word. Use get_conversation for the messages of one conversation.

GET /v1/conversations

Permissioninbox:read (all permissions)
RiskRead
Idempotency-KeyNot needed (how it works)
Safe to repeatSafe: the call only reads.
Rate limit classread (120 requests per minute per key)
ConfirmationNone
MCP toollist_conversations
Since version2026-10-25

#What it does

  • Only reads data. It changes nothing and sends nothing.

#Request

Query parameters

NameTypeRequiredDescription
limitintegernoItems per page (1 to 100, default 20). 1 to 100; default 20
cursorstringnonext_cursor from the previous page. Opaque; only valid with the same filters. up to 300 characters
contact_idstringnoOnly the conversation of this contact.
unreadbooleannoTrue returns only conversations with unread inbound messages.
querystringnoSearch word in the name, phone number or message text. up to 100 characters

#Lists, filters and sorting

  • Items per page: limit from 1 to 100, default 20 (MCP: default 20, maximum 50).
  • Next page: send next_cursor of the answer as cursor. The cursor only works with the same filters. See Pagination.
  • Filters: contact_id, unread, query.
  • Sorting: newest first (created_at descending, then id descending); no other order.

#Examples

curl "https://api.smartchat.marketing/v1/conversations?unread=true&limit=20" \
  -H "Authorization: Bearer $SMARTCHAT_API_KEY"
import os
import requests

response = requests.get(
    "https://api.smartchat.marketing/v1/conversations",
    headers={"Authorization": "Bearer " + os.environ["SMARTCHAT_API_KEY"]},
    params={
        "unread": "true",
        "limit": "20",
    },
)
response.raise_for_status()
print(response.json())
const response = await fetch("https://api.smartchat.marketing/v1/conversations?unread=true&limit=20", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.SMARTCHAT_API_KEY}`,
  },
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());

Response (200):

{
  "object": "list",
  "data": [
    {
      "object": "conversation",
      "id": "cnv_1a2b3c4d5e6f47a8b9c0d1e2f3a4b5c6",
      "contact": {
        "id": "con_0f8c1a2e4b7d4c3e9a5b6d7e8f901234",
        "name": "Mia Muster",
        "phone": "+4915112345678"
      },
      "last_message": "Is a table free on Friday?",
      "last_message_at": "2026-10-25T09:41:07Z",
      "last_direction": "inbound",
      "unread_count": 1,
      "window_open": true,
      "window_expires_at": "2026-10-26T09:41:07Z",
      "origin": "direct",
      "created_at": "2026-10-25T09:41:07Z"
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "url": "/v1/conversations"
}

#Response

Status 200. Every response has the headers Request-Id, SmartChat-Version and X-RateLimit-*.

NameTypeDescription
objectstringAlways "list". always list
dataarray of objectThe items of this page. up to 100 items
data[].objectstringAlways "conversation". always conversation
data[].idstringConversation ID.
data[].contactobjectThe contact of the conversation (short form).
data[].contact.idstring or nullContact ID. Null if the contact no longer exists. up to 36 characters
data[].contact.namestring or nullName of the contact. Untrusted text. up to 2000 characters; untrusted text
data[].contact.phonestring or nullPhone number in E.164 format.
data[].last_messagestring or nullText of the last message. Comes from the contact or the team: untrusted text. up to 4100 characters; untrusted text
data[].last_message_atstring or nullWhen the last message was sent or received. up to 40 characters; format date-time
data[].last_directionstring or nullDirection of the last message: inbound or outbound. Null if there is none. one of: inbound, outbound, null
data[].unread_countintegerNumber of unread inbound messages. 0 to 1000000
data[].window_openbooleanTrue while the 24-hour window is open and free text may be sent.
data[].window_expires_atstring or nullWhen the 24-hour window closes. Null if there is no window. up to 40 characters; format date-time
data[].originstring or nullHow the conversation started: newsletter, followup, automation or direct. Open list. up to 30 characters
data[].created_atstringWhen the conversation was created. up to 40 characters; format date-time
has_morebooleanTrue if another page exists.
next_cursorstring or nullPass this as 'cursor' to get the next page; null on the last page. up to 300 characters
urlstringThe path of this list. up to 200 characters
total_countintegerApproximate total; may be inaccurate. Only present where cheap to compute. 0 to 1000000000

#Errors

CodeStatusWhen
invalid_cursor400The cursor is expired, forged or belongs to other filters.
unknown_parameter400A field is not known.
api_key_expired401This API key has expired.
api_key_invalid401This API key is not valid.
api_key_revoked401This API key was revoked.
authentication_required401No API key was sent. Send 'Authorization: Bearer <key>'.
account_blocked403This account is blocked.
insufficient_scope403This key lacks a required permission.
ip_not_allowed403This IP address is not allowed for this key.
validation_failed422A field is not valid.
rate_limited429Too many requests. Wait and try again.
internal_error500Something went wrong on our side.
service_unavailable503The service is temporarily unavailable.

All errors use one format.