Skip to main content
GET
Get a chat
  • Credential: an API key. A trial key returns 401 unauthorized.
  • Line-scoped keys: a line-scoped key gets 404 not_found for a chat on a line outside its list.
  • Events: none.
  • Personal data: contact_handle is a phone number or an email address. Request it only when needed, do not copy it into logs, tickets or other tools, and refer to a contact by an id of your own.
  • Line owner: a chat belongs to its line: after a line changes owner, the account that owns the line lists its chats, those of earlier owners included. See A chat is never deleted.
  • What is returned: the chat, with its counters and, on a shared line, the outbound_number that serves the contact. See Chats.

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}$

Response

The chat.

success
enum<boolean>
required

Always true on a success response.

Available options:
true
data
object
required

The messages between one line and one contact. iSnap creates a chat at the first message in either direction and never deletes it: a chat stays listed after its messages are deleted. It uses the same chat for both directions when the device of the line stores the handle of the contact in the form of the to you send to. A chat belongs to its line, not to an account: after a line changes owner, the account that owns the line lists its chats, those of earlier owners included, and their counters include the messages of earlier owners.

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.