curl -g "https://YOUR_PROJECT.texterchat.com/server/api/v2/chats/search?search=0521234567" \
-H "Authorization: Bearer YOUR_API_TOKEN"{
"data": [
{
"_id": "67bf11038b24880cc966f799",
"title": "John Doe",
"agent": {
"uid": null,
"displayName": ""
},
"channel": "whatsapp",
"entityPhone": "+972509876543",
"clientPhoneE164": "+972521234567",
"clientPhone": "+972521234567",
"created": "2025-02-26T13:02:58.353Z",
"botState": {},
"last_message_timestamp": 1762012091000,
"lastIncomingMessageTimestamp": 1762012091000,
"status": 3,
"unreadCount": 6,
"channelInfo": {
"name": "whatsapp",
"id": "972521234567",
"accountId": "972509876543"
},
"departmentId": null,
"resolvedUpdateTime": 1762012093,
"crmData": {
"aiTerminateReason": "Inactivity"
},
"externalBot": false,
"updatedAt": "2025-11-01T15:48:14.076Z"
}
],
"total": 1
}{
"error": "data/statuses/0 must be equal to one of the allowed values"
}Chats
Search Chats
Search for chats based on various query parameters. The most common use case is searching by the contact’s phone number using the search parameter.
GET
https://{projectID}.texterchat.com/server/api/v2
/
chats
/
search
curl -g "https://YOUR_PROJECT.texterchat.com/server/api/v2/chats/search?search=0521234567" \
-H "Authorization: Bearer YOUR_API_TOKEN"{
"data": [
{
"_id": "67bf11038b24880cc966f799",
"title": "John Doe",
"agent": {
"uid": null,
"displayName": ""
},
"channel": "whatsapp",
"entityPhone": "+972509876543",
"clientPhoneE164": "+972521234567",
"clientPhone": "+972521234567",
"created": "2025-02-26T13:02:58.353Z",
"botState": {},
"last_message_timestamp": 1762012091000,
"lastIncomingMessageTimestamp": 1762012091000,
"status": 3,
"unreadCount": 6,
"channelInfo": {
"name": "whatsapp",
"id": "972521234567",
"accountId": "972509876543"
},
"departmentId": null,
"resolvedUpdateTime": 1762012093,
"crmData": {
"aiTerminateReason": "Inactivity"
},
"externalBot": false,
"updatedAt": "2025-11-01T15:48:14.076Z"
}
],
"total": 1
}{
"error": "data/statuses/0 must be equal to one of the allowed values"
}Required token scopes:
List all chats
Results are sorted by last message time (newest first). Note: the chat objects returned by this endpoint do not include the lastMessage / lastText preview fields. Unrecognized query parameters are rejected with 400.
All status values, type enums and the ID cheat sheet: Enums & Common Fields.הרשאות
פרמטרי שאילתה
Filter chats by status name. Repeat the parameter to include multiple statuses (same behavior as labels[]). Note: use ASSIGNED (shown as "Taken" in Texter) and RESOLVED - values like SOLVED or TAKEN are rejected
Required array length:
1 - 5 elementsאפשרויות זמינות:
BOT, PENDING, ASSIGNED, RESOLVED, BULK תגובה
The matching chats and the total count. Field-by-field reference: The Chat object