smartchat

Update conversation

Marks a conversation as read by setting its unread count to zero. Sends nothing and changes no message. Returns the conversation.

PATCH /v1/conversations/{conversation_id}

Permissioninbox:write (all permissions)
RiskWrite (no outside effect)
Idempotency-KeyOptional (how it works)
Safe to repeatSafe by nature. With the same Idempotency-Key the first answer comes back.
Rate limit classwrite (120 requests per minute per key)
ConfirmationNone
MCP toolupdate_conversation
Since version2026-10-25

#What it does

  • Changes data in your account. It does not send messages to contacts.
  • Safe to repeat. With the same Idempotency-Key the first answer comes back.

#Request

Header

NameRequiredDescription
AuthorizationyesBearer <key>
Idempotency-KeynoA unique value for this operation, for example a UUID (1 to 255 visible ASCII characters).

Path parameters

NameTypeDescription
conversation_idstringConversation ID from list_conversations.

Body (JSON)

NameTypeRequiredDescription
mark_readbooleanyesMust be true. Marks the conversation as read. one of: true

#Examples

curl -X PATCH "https://api.smartchat.marketing/v1/conversations/cnv_1a2b3c4d5e6f47a8b9c0d1e2f3a4b5c6" \
  -H "Authorization: Bearer $SMARTCHAT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "mark_read": true
}'
import os
import requests

response = requests.patch(
    "https://api.smartchat.marketing/v1/conversations/cnv_1a2b3c4d5e6f47a8b9c0d1e2f3a4b5c6",
    headers={"Authorization": "Bearer " + os.environ["SMARTCHAT_API_KEY"]},
    json={
        "mark_read": True,
    },
)
response.raise_for_status()
print(response.json())
const response = await fetch("https://api.smartchat.marketing/v1/conversations/cnv_1a2b3c4d5e6f47a8b9c0d1e2f3a4b5c6", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.SMARTCHAT_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "mark_read": true
  }),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());

Response (200):

{
  "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": 0,
  "window_open": true,
  "window_expires_at": "2026-10-26T09:41:07Z",
  "origin": "direct",
  "created_at": "2026-10-25T09:41:07Z"
}

#Response

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

NameTypeDescription
objectstringAlways "conversation". always conversation
idstringConversation ID.
contactobjectThe contact of the conversation (short form).
contact.idstring or nullContact ID. Null if the contact no longer exists. up to 36 characters
contact.namestring or nullName of the contact. Untrusted text. up to 2000 characters; untrusted text
contact.phonestring or nullPhone number in E.164 format.
last_messagestring or nullText of the last message. Comes from the contact or the team: untrusted text. up to 4100 characters; untrusted text
last_message_atstring or nullWhen the last message was sent or received. up to 40 characters; format date-time
last_directionstring or nullDirection of the last message: inbound or outbound. Null if there is none. one of: inbound, outbound, null
unread_countintegerNumber of unread inbound messages. 0 to 1000000
window_openbooleanTrue while the 24-hour window is open and free text may be sent.
window_expires_atstring or nullWhen the 24-hour window closes. Null if there is no window. up to 40 characters; format date-time
originstring or nullHow the conversation started: newsletter, followup, automation or direct. Open list. up to 30 characters
created_atstringWhen the conversation was created. up to 40 characters; format date-time

#Errors

CodeStatusWhen
bad_request400The request could not be read.
idempotency_key_invalid400The 'Idempotency-Key' header must be 1 to 255 visible ASCII characters.
missing_parameter400A required field is missing.
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.
conversation_not_found404No conversation with this ID exists in this account.
idempotency_in_progress409A request with this idempotency key is still running.
idempotency_key_reused422This idempotency key was already used with a different request.
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.