curl --request GET \
--url https://{projectID}.texterchat.com/server/api/v2/chats \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{projectID}.texterchat.com/server/api/v2/chats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{projectID}.texterchat.com/server/api/v2/chats"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"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
}Get Chat by Recipient
Retrieve a chat’s public view addressed by channel + account + recipient phone number, without knowing the chat ID. Omit the channel and account to use your default channel account.
curl --request GET \
--url https://{projectID}.texterchat.com/server/api/v2/chats \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{projectID}.texterchat.com/server/api/v2/chats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{projectID}.texterchat.com/server/api/v2/chats"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"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
}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).channelwithoutfromreturns 400;fromwithoutchannelis ignored.
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.הרשאות
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.
פרמטרי שאילתה
Recipient contact ID - the phone number for phone-based channels, in any common format
255Channel name. Omit together with from to use the default channel account
whatsapp, messenger, instagram, website_chat, email, sms 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.
true
Channel that an entity belongs to
Show child attributes
Show child attributes
Show child attributes
Show child attributes
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 Epoch milliseconds
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Narrowed bot state - only the session ID is returned
Show child attributes
Show child attributes
Timestamp (epoch milliseconds) of the last message sent or received