Skip to main content
GET
Get Chat by Recipient
Required token scopes: Send session message Returns the same trimmed public view as Get Chat by Chat ID - the natural way to fetch a chat by phone number without a prior search. Provide the recipient with query parameters:
  • to (required) - the recipient contact ID (phone number for phone-based channels, any common format, normalized automatically).
  • channel + from - the channel name and channel account ID. Omit both to use your project’s default channel account (501 if none is configured). channel without from returns 400; from without channel is ignored.
Path-parameter equivalents: GET /chats/{channel} (with from, to as query params), GET /chats/{channel}/{accountId} (with to as query param) and GET /chats/{channel}/{accountId}/{to}. When the recipient comes entirely from the path, lookup failures return 404 instead of 400. All status values, type enums and the ID cheat sheet: Enums & Common Fields.

הרשאות

Authorization
string
header
נדרש

API token generated in Texter: gear icon → Developers → API Tokens. When creating a token, assign it the scopes required by the endpoints you plan to call - each endpoint lists its required scopes.

פרמטרי שאילתה

to
string
נדרש

Recipient contact ID - the phone number for phone-based channels, in any common format

Maximum string length: 255
channel
enum<string>

Channel name. Omit together with from to use the default channel account

אפשרויות זמינות:
whatsapp,
messenger,
instagram,
website_chat,
email,
sms
from
string

Channel account ID the chat belongs to (e.g. your WhatsApp number). Requires channel

תגובה

The public chat view. Field-by-field reference: The Chat object

The public chat view returned by Get Chat by ID. Note: this is a trimmed version of the chat - fields like _id, labels, crmData and displayName are not included, and botState is narrowed to its id only.

success
boolean
דוגמה:

true

title
string
channelInfo
object

Channel that an entity belongs to

departmentId
string | null
agent
object
status
enum<integer>

Chat status: 0 = BOT (handled by bot), 1 = PENDING (waiting for an agent), 2 = ASSIGNED (shown as "Taken" in Texter), 3 = RESOLVED, 4 = BULK

אפשרויות זמינות:
0,
1,
2,
3,
4
created
string<date-time>
updatedAt
string<date-time>
lastIncomingMessageTimestamp
number

Epoch milliseconds

lastMessage
object
blockedChat
object
unreadCount
number
unsubscribed
object
externalBot
boolean
language
string
botState
object

Narrowed bot state - only the session ID is returned

lastMessageTimestamp
number

Timestamp (epoch milliseconds) of the last message sent or received