דלג לתוכן הראשי
A chat represents one conversation with one contact on one channel account. Chats are returned by Search Chats, Get Chat by Chat ID (trimmed public view), chat-management endpoints, and inside every chat-related webhook payload.
Time units differ by field naming: fields ending in Timestamp / _timestamp are epoch milliseconds; fields ending in UpdateTime / MessageTime (and replyAction.created) are epoch seconds; created, updatedAt and unsubscribed.date are ISO date-time strings.
Example chat object
{
  "_id": "67bf11038b24880cc966f799",
  "title": "John Doe",
  "displayName": "John from the gym",
  "channelInfo": {
    "name": "whatsapp",
    "id": "972521234567",
    "accountId": "972509876543"
  },
  "agent": {
    "uid": "4d170fc7-5cd6-4496-98e4-f4f03a11456e",
    "displayName": "Tyler"
  },
  "departmentId": "customer_service",
  "status": 2,
  "unreadCount": 0,
  "labels": [
    "VIP"
  ],
  "lastMessage": {
    "type": "text",
    "text": "תודה!"
  },
  "last_message_timestamp": 1762012091000,
  "lastIncomingMessageTimestamp": 1762012091000,
  "created": "2025-02-26T13:02:58.353Z",
  "updatedAt": "2025-11-01T15:48:14.076Z",
  "pendingUpdateTime": 1756292160,
  "resolvedUpdateTime": 1762012093,
  "botState": {
    "id": "99f3e9b18b6ae02781db30fb5fb673639d7007210a3280e87b754c44c3e6222c",
    "flowVersion": {
      "identifier": "onboarding-bot",
      "version": 37
    },
    "node": "handoff",
    "userState": {
      "menu_choice": {
        "choice": 2,
        "text": "נציג אנושי"
      }
    }
  },
  "crmData": {
    "leadId": 641225,
    "plan": "premium"
  },
  "crmDeepLink": "https://app.yourcrm.com/leads/641225",
  "externalBot": false
}

Identity & contact

FieldTypeDescription
_idstringUnique identifier of the chat in Texter. Use it in every chat-scoped endpoint
titlestringContact’s name as set in their WhatsApp account settings
displayNamestringCustom name modified in Texter. Absent if never modified. Update via Update Chat Properties
personIdstringID of the person that owns this chat - links chats of the same person across channels
imagestringFile ID of the chat’s avatar image, when available
labelsstring[]Label IDs applied to the chat. Manage via Manage Labels in Chat Example: ["urgent","billing"]
personChatsobject[]All chats of the same person (including this one) as channel references ({name, accountId, id}). Present in webhook event payloads; not included in REST search results

Channel

FieldTypeDescription
channelInfo.namestringChannel type: whatsapp, messenger, instagram, website_chat, email, sms
channelInfo.accountIdstringThe business account connected to Texter. For WhatsApp, the business phone number Example: 972586640430
channelInfo.idstringThe contact’s ID on the channel. For WhatsApp, the contact’s phone number Example: 972521234567
channelInfo.metadataobjectChannel-specific metadata, when present

Status & routing

FieldTypeDescription
statusnumberCurrent state: 0 BOT, 1 PENDING, 2 ASSIGNED (shown as “Taken” in Texter), 3 RESOLVED, 4 BULK
agent.uid`stringnull`Internal Texter user ID of the assigned agent
agent.displayName`stringnull`Name of the assigned agent
departmentId`stringnull`Department responsible for the chat
unreadCountnumberNumber of unread incoming messages
pendingUpdateTimenumberWhen the chat last entered pending status (epoch seconds)
resolvedUpdateTimenumberWhen the chat was last marked RESOLVED (epoch seconds)
pendingMessageTime`numbernull`When the bot last sent a pending-reminder while the chat waits for an agent (epoch seconds). Reset to null on resolve
blockedChat.blockedbooleanWhether the chat is marked as blocked
blockedChat.agentstringID of the agent who blocked the chat
hasMessageErrorbooleanWhether the chat contains failed outgoing messages

Last message

FieldTypeDescription
lastMessage.typestringType of the last message (text, media, special…). Not included in Search Chats results
lastMessage.textstringText content of the last message, if applicable
lastMessage.mediaobject[]Media items of the last message - see Media item
last_message_timestampnumberWhen the last message was sent or received (epoch milliseconds)
lastIncomingMessageTimestampnumberWhen the last incoming (contact) message arrived (epoch milliseconds)

Bot session

botState holds the active or most recent bot session; previousBotSession holds the one before it (same shape). Both can be null, and may carry additional bot-specific keys.
FieldTypeDescription
botState.idstringBot session ID - use as botSessionId in Get Messages of a Chat
botState.flowVersion.identifierstringIdentifier of the bot Example: onboarding-bot
botState.flowVersion.versionnumberVersion number of the bot flow
botState.nodestringCurrent or last bot node
botState.userStateobjectKey-value memory of answers collected at each bot node
botState.storeobjectKey-value memory of variables collected during the session
botState.latestAgentUid`stringnull`ID of the last human agent involved in the session
botState.latestAgentName`stringnull`Display name of the last human agent involved
externalBotbooleanWhether an external bot (outside Texter) is active for this chat. Toggling it fires the External Bot Enabled / Disabled events

Reply action

The pending action that runs when the contact replies to a template message. null when no reply action is armed. Set by template defaults or the Send Template Message replyAction parameter.
FieldTypeDescription
replyAction.creatednumberWhen the reply action was set (epoch seconds)
replyAction.expirationTimenumberHow long the action remains valid, in seconds relative to created Example: 259200
replyAction.chatStatusnumberStatus to apply when the contact replies (0 BOT / 2 ASSIGNED / 3 RESOLVED)
replyAction.setBotNodestringBot node to trigger after reply
replyAction.botstringSpecific bot to run after reply
replyAction.replyTextstringText automatically sent after the contact replies
replyAction.responsibleAgentstringAgent the chat is assigned to after the reply
replyAction.responsibleDepartmentstringDepartment the chat is assigned to after the reply
replyAction.replyToTemplateFileobjectFile ({url, name}) automatically sent after the contact replies
replyAction.statusnumberDeprecated - Use chatStatus instead

Template subscription & bulk

FieldTypeDescription
unsubscribed.datestringWhen the chat unsubscribed from template messages (ISO date-time). The whole unsubscribed object is present only after an opt-out
unsubscribed.bulkSendIdstringLatest bulk send this contact was included in before unsubscribing
sendingBulkAgentstringID of the agent who initiated the bulk template message
latestBulkSendIdstringID of the latest bulk send performed in this chat. Its presence does not mean the chat is currently in BULK status

CRM

FieldTypeDescription
crmDataobjectCustom CRM metadata; structure varies by integration. Merge via Update CRM Data
crmDeepLinkstringPersonalized link to the contact’s record in your CRM, shown to agents in Texter
crmLastTicketId`stringnumber`Reference to the most recent CRM record linked to the chat
lastMessageStoredInCRMTimestampnumberWhen the last message was stored in CRM (epoch milliseconds)

Lifecycle

FieldTypeDescription
createdstringWhen the chat was created (ISO date-time)
updatedAtstringLast time the chat was updated (ISO date-time)
languagestringThe chat’s preferred language. Reserved for future functionality

Deprecated fields

These may still appear in responses but should not be used in new code.
FieldTypeDescription
channelstringDeprecated - Use channelInfo.name instead
clientPhonestringDeprecated - Use channelInfo.id instead
clientPhoneE164stringDeprecated - Use channelInfo.id instead
entityPhonestringDeprecated - Use channelInfo.accountId instead
lastTextstringDeprecated - Use lastMessage.text instead
unsubscribeTimenumberDeprecated - Epoch seconds. Use unsubscribed.date instead
blockTemplatesbooleanDeprecated - Use the unsubscribed property instead
firestoreIdstringDeprecated - Pre-migration legacy ID on very old chats. Ignore
Get Chat by ID returns a trimmed view. Get Chat by Chat ID returns only the public subset of these fields (no _id, labels, crmData or displayName; botState narrowed to its id) plus lastMessageTimestamp (milliseconds). Use Search Chats for the complete record.

Chat status values

Used by status, template chatStatus, replyAction.chatStatus and newChatStatus on system messages. The statuses[] filter of Search Chats takes the names, not the numbers.
ValueNameMeaning
0BOTHandled by the bot
1PENDINGWaiting for a human agent
2ASSIGNEDTaken by an agent (shown as “Taken” in Texter)
3RESOLVEDConversation finished
4BULKCreated/affected by a bulk send
More enums and the ID cheat sheet: Enums & Common Fields.