דלג לתוכן הראשי
GET
/
chats
/
{chatId}
Get Chat by Chat ID
curl --request GET \
  --url https://{projectID}.texterchat.com/server/api/v2/chats/{chatId} \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "title": "Niv Shteingart",
  "channelInfo": {
    "name": "whatsapp",
    "id": "972521234567",
    "accountId": "972549876543"
  },
  "departmentId": null,
  "agent": {
    "uid": null,
    "displayName": ""
  },
  "status": 0,
  "created": "2025-05-07T11:09:03.295Z",
  "updatedAt": "2025-11-03T20:05:15.532Z",
  "lastIncomingMessageTimestamp": 1762200310000,
  "lastMessage": {
    "type": "text",
    "text": "מה שמך?"
  },
  "unreadCount": 2,
  "botState": {
    "id": "236ef058aa87c90536c33493d2024cd87055bdac4d64a0f22fd84fcb3cea6f8d"
  },
  "lastMessageTimestamp": 1762200315209
}

הרשאות

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.

פרמטרי נתיב

chatId
string
נדרש

The unique identifier of the chat. You can obtain this value by using the Search Chats endpoint with the contact's phone number

תגובה

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