Skip to main content
POST
Mark a chat as read
  • Credential: an API key. A trial key returns 401 unauthorized. See Read receipts.
  • Line-scoped keys: the list of a line-scoped key is not applied: such a key acts on any chat of the account.
  • Test keys: a call with an isnap_test_ account key acts on the real chat: see Test keys.
  • Idempotency-Key: not honored. A repeat marks only the inbound messages received since the previous call.
  • Events: sends one message.read per message marked, with chat_id and read_at.
  • Personal data: each message.read carries the whole message: its text, the sender’s handle and the names of its files. The call marks every inbound message of the chat that iSnap still keeps and that is not marked read, including the messages that an earlier owner of the line received: ignore the events about messages from before you got the line, see A chat is never deleted. Request this data only when needed, do not copy it into logs, tickets or other tools, and refer to a contact by an id of your own.
  • What reaches the contact: the line’s device marks the Messages conversation read when it supports read receipts. Otherwise nothing reaches the contact, and the call still succeeds. The status of the marked messages stays delivered.

Errors

The errors that every operation shares are in Errors.

Authorizations

Authorization
string
header
required

An API key created in the iSnap dashboard, or a trial key, sent as Authorization: Bearer <key>. An API key starts with isnap_live_ or isnap_test_; both act on the same account, lines and billing. A trial key acts on its trial only.

Path Parameters

chat_id
string
required

Chat id: chat_ followed by 25 letters or digits.

Pattern: ^chat_[0-9A-Za-z]{25}$

Body

application/json

An empty object: the request takes no field.

Response

The inbound messages of the chat are marked as read.

success
enum<boolean>
required

Always true on a success response.

Available options:
true
data
object
required

The result of POST /v1/chats/{chat_id}/read.

trace_id
string
required

Trace id of the request that produced this response: 32 lowercase hexadecimal characters. Quote it when you report a problem to iSnap.

request_id
string
required

Id of the request that produced this response: req_ followed by 25 letters or digits.