curl --request PATCH \
--url https://{projectID}.texterchat.com/server/api/v2/chats/{chatId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"externalBot": true
}
'{
"_id": "64de3b15398a8e09c47a9f62",
"title": "<string>",
"displayName": "<string>",
"personId": "<string>",
"image": "<string>",
"channelInfo": {
"name": "whatsapp",
"accountId": "972586640430",
"id": "972521234567",
"metadata": {}
},
"agent": {
"uid": "<string>",
"displayName": "<string>"
},
"departmentId": "<string>",
"status": 0,
"unreadCount": 123,
"labels": [
"urgent",
"billing"
],
"lastMessage": {
"type": "<string>",
"text": "<string>",
"media": [
{
"mediaType": "image",
"fileId": "6900c1eac29d42708adac92f",
"previewId": "<string>",
"filename": "offer_october_2025.pdf",
"contentType": "application/pdf",
"caption": "<string>",
"metadata": {
"frequentlyForwarded": false
},
"scanned": true,
"deleted": {
"timestamp": 123
},
"url": "<string>"
}
]
},
"last_message_timestamp": 123,
"lastIncomingMessageTimestamp": 123,
"created": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"pendingMessageTime": 123,
"pendingUpdateTime": 123,
"resolvedUpdateTime": 123,
"replyAction": {
"created": 123,
"expirationTime": 259200,
"chatStatus": 0,
"setBotNode": "<string>",
"bot": "<string>",
"replyText": "<string>",
"responsibleAgent": "<string>",
"responsibleDepartment": "<string>",
"replyToTemplateFile": {
"url": "<string>",
"name": "<string>"
},
"resolveTime": 123,
"status": 0
},
"sendingBulkAgent": "<string>",
"latestBulkSendId": "<string>",
"botState": {
"id": "<string>",
"flowVersion": {
"identifier": "onboarding-bot",
"version": 203
},
"node": "<string>",
"userState": {},
"store": {},
"latestAgentUid": "<string>",
"latestAgentName": "<string>"
},
"previousBotSession": {
"id": "<string>",
"flowVersion": {
"identifier": "onboarding-bot",
"version": 203
},
"node": "<string>",
"userState": {},
"store": {},
"latestAgentUid": "<string>",
"latestAgentName": "<string>"
},
"crmData": {},
"crmDeepLink": "<string>",
"crmLastTicketId": "<string>",
"lastMessageStoredInCRMTimestamp": 123,
"externalBot": true,
"unsubscribed": {
"date": "2023-11-07T05:31:56Z",
"bulkSendId": "<string>"
},
"blockedChat": {
"blocked": true,
"agent": "<string>"
},
"hasMessageError": true,
"language": "<string>",
"personChats": [
{
"name": "whatsapp",
"accountId": "972586640430",
"id": "972521234567",
"metadata": {}
}
],
"channel": "<string>",
"clientPhone": "<string>",
"clientPhoneE164": "<string>",
"entityPhone": "<string>",
"lastText": "<string>",
"unsubscribeTime": 123,
"blockTemplates": true
}{
"error": "data/title must NOT have more than 255 characters"
}Chats
Update Chat Properties
Modify attributes of a chat. Most commonly used to change a contact’s display name in Texter or to enable/disable an external bot for the chat.
PATCH
https://{projectID}.texterchat.com/server/api/v2
/
chats
/
{chatId}
curl --request PATCH \
--url https://{projectID}.texterchat.com/server/api/v2/chats/{chatId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"externalBot": true
}
'{
"_id": "64de3b15398a8e09c47a9f62",
"title": "<string>",
"displayName": "<string>",
"personId": "<string>",
"image": "<string>",
"channelInfo": {
"name": "whatsapp",
"accountId": "972586640430",
"id": "972521234567",
"metadata": {}
},
"agent": {
"uid": "<string>",
"displayName": "<string>"
},
"departmentId": "<string>",
"status": 0,
"unreadCount": 123,
"labels": [
"urgent",
"billing"
],
"lastMessage": {
"type": "<string>",
"text": "<string>",
"media": [
{
"mediaType": "image",
"fileId": "6900c1eac29d42708adac92f",
"previewId": "<string>",
"filename": "offer_october_2025.pdf",
"contentType": "application/pdf",
"caption": "<string>",
"metadata": {
"frequentlyForwarded": false
},
"scanned": true,
"deleted": {
"timestamp": 123
},
"url": "<string>"
}
]
},
"last_message_timestamp": 123,
"lastIncomingMessageTimestamp": 123,
"created": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"pendingMessageTime": 123,
"pendingUpdateTime": 123,
"resolvedUpdateTime": 123,
"replyAction": {
"created": 123,
"expirationTime": 259200,
"chatStatus": 0,
"setBotNode": "<string>",
"bot": "<string>",
"replyText": "<string>",
"responsibleAgent": "<string>",
"responsibleDepartment": "<string>",
"replyToTemplateFile": {
"url": "<string>",
"name": "<string>"
},
"resolveTime": 123,
"status": 0
},
"sendingBulkAgent": "<string>",
"latestBulkSendId": "<string>",
"botState": {
"id": "<string>",
"flowVersion": {
"identifier": "onboarding-bot",
"version": 203
},
"node": "<string>",
"userState": {},
"store": {},
"latestAgentUid": "<string>",
"latestAgentName": "<string>"
},
"previousBotSession": {
"id": "<string>",
"flowVersion": {
"identifier": "onboarding-bot",
"version": 203
},
"node": "<string>",
"userState": {},
"store": {},
"latestAgentUid": "<string>",
"latestAgentName": "<string>"
},
"crmData": {},
"crmDeepLink": "<string>",
"crmLastTicketId": "<string>",
"lastMessageStoredInCRMTimestamp": 123,
"externalBot": true,
"unsubscribed": {
"date": "2023-11-07T05:31:56Z",
"bulkSendId": "<string>"
},
"blockedChat": {
"blocked": true,
"agent": "<string>"
},
"hasMessageError": true,
"language": "<string>",
"personChats": [
{
"name": "whatsapp",
"accountId": "972586640430",
"id": "972521234567",
"metadata": {}
}
],
"channel": "<string>",
"clientPhone": "<string>",
"clientPhoneE164": "<string>",
"entityPhone": "<string>",
"lastText": "<string>",
"unsubscribeTime": 123,
"blockTemplates": true
}{
"error": "data/title must NOT have more than 255 characters"
}Required token scopes:
Manage all chats
Note that updating properties fully overrides existing values. For example, if a crmData object already exists, it is fully replaced by the new object provided in the request. To merge CRM data instead, use Update CRM Data.הרשאות
פרמטרי נתיב
גוף
application/json
תגובה
The updated chat object. Field-by-field reference: The Chat object
A conversation with a contact on a connected channel