List contact sessions
curl --request GET \
--url https://services-api.talqui.chat/v1/tenants/{tenantID}/contacts/{contactID}/sessionsimport requests
url = "https://services-api.talqui.chat/v1/tenants/{tenantID}/contacts/{contactID}/sessions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://services-api.talqui.chat/v1/tenants/{tenantID}/contacts/{contactID}/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://services-api.talqui.chat/v1/tenants/{tenantID}/contacts/{contactID}/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://services-api.talqui.chat/v1/tenants/{tenantID}/contacts/{contactID}/sessions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://services-api.talqui.chat/v1/tenants/{tenantID}/contacts/{contactID}/sessions")
.asString();require 'uri'
require 'net/http'
url = URI("https://services-api.talqui.chat/v1/tenants/{tenantID}/contacts/{contactID}/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"sessionID": "<string>",
"closedAt": "2023-11-07T05:31:56Z",
"contactID": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"inboxID": "<string>",
"lastMessage": {
"messageDirection": "<string>",
"messageKey": "<string>",
"messageStatus": 123,
"messageValue": "<unknown>"
},
"manualAt": "2023-11-07T05:31:56Z",
"operatorID": "<string>",
"operatorParticipantsIDs": [
"<string>"
],
"queuedAt": "2023-11-07T05:31:56Z",
"sessionActive": true,
"sessionChannel": "<string>",
"sessionLastMessageID": "<string>",
"sessionListed": true,
"sessionSummary": {},
"sessionType": "<string>",
"tenantID": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"meta": {
"currentPage": 123,
"hasMore": true,
"perPage": 123,
"totalCount": 123
}
}{
"data": [
{
"sessionID": "<string>",
"closedAt": "2023-11-07T05:31:56Z",
"contactID": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"inboxID": "<string>",
"lastMessage": {
"messageDirection": "<string>",
"messageKey": "<string>",
"messageStatus": 123,
"messageValue": "<unknown>"
},
"manualAt": "2023-11-07T05:31:56Z",
"operatorID": "<string>",
"operatorParticipantsIDs": [
"<string>"
],
"queuedAt": "2023-11-07T05:31:56Z",
"sessionActive": true,
"sessionChannel": "<string>",
"sessionLastMessageID": "<string>",
"sessionListed": true,
"sessionSummary": {},
"sessionType": "<string>",
"tenantID": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"meta": {
"currentPage": 123,
"hasMore": true,
"perPage": 123,
"totalCount": 123
}
}{
"errors": [
{
"error": "MissingTenantIDError",
"error_code": 1001,
"message": "tenantID is required.",
"statusCode": 400
}
]
}{
"errors": [
{
"error": "UnauthorizedError",
"error_code": 1003,
"message": "You are not authorized to perform this request.",
"statusCode": 401
}
]
}{
"errors": [
{
"error": "ForbiddenError",
"error_code": 1004,
"message": "You do not have access to this resource.",
"statusCode": 403
}
]
}{
"errors": [
{
"error": "UnknownError",
"error_code": 5999,
"message": "For some unknown reason your request has not succeeded.",
"statusCode": 500
}
]
}Contacts
List contact sessions
Lists a contact’s conversations, most recently active first. An operator sees only the ones they are allowed to list; the tenant’s plugin connection or a plugin installed on the tenant sees all of them. Each conversation carries its latest message and, when one exists, its AI summary. Returns HTTP 206 instead of 200 when more pages are available.
GET
/
v1
/
tenants
/
{tenantID}
/
contacts
/
{contactID}
/
sessions
List contact sessions
curl --request GET \
--url https://services-api.talqui.chat/v1/tenants/{tenantID}/contacts/{contactID}/sessionsimport requests
url = "https://services-api.talqui.chat/v1/tenants/{tenantID}/contacts/{contactID}/sessions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://services-api.talqui.chat/v1/tenants/{tenantID}/contacts/{contactID}/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://services-api.talqui.chat/v1/tenants/{tenantID}/contacts/{contactID}/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://services-api.talqui.chat/v1/tenants/{tenantID}/contacts/{contactID}/sessions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://services-api.talqui.chat/v1/tenants/{tenantID}/contacts/{contactID}/sessions")
.asString();require 'uri'
require 'net/http'
url = URI("https://services-api.talqui.chat/v1/tenants/{tenantID}/contacts/{contactID}/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"sessionID": "<string>",
"closedAt": "2023-11-07T05:31:56Z",
"contactID": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"inboxID": "<string>",
"lastMessage": {
"messageDirection": "<string>",
"messageKey": "<string>",
"messageStatus": 123,
"messageValue": "<unknown>"
},
"manualAt": "2023-11-07T05:31:56Z",
"operatorID": "<string>",
"operatorParticipantsIDs": [
"<string>"
],
"queuedAt": "2023-11-07T05:31:56Z",
"sessionActive": true,
"sessionChannel": "<string>",
"sessionLastMessageID": "<string>",
"sessionListed": true,
"sessionSummary": {},
"sessionType": "<string>",
"tenantID": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"meta": {
"currentPage": 123,
"hasMore": true,
"perPage": 123,
"totalCount": 123
}
}{
"data": [
{
"sessionID": "<string>",
"closedAt": "2023-11-07T05:31:56Z",
"contactID": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"inboxID": "<string>",
"lastMessage": {
"messageDirection": "<string>",
"messageKey": "<string>",
"messageStatus": 123,
"messageValue": "<unknown>"
},
"manualAt": "2023-11-07T05:31:56Z",
"operatorID": "<string>",
"operatorParticipantsIDs": [
"<string>"
],
"queuedAt": "2023-11-07T05:31:56Z",
"sessionActive": true,
"sessionChannel": "<string>",
"sessionLastMessageID": "<string>",
"sessionListed": true,
"sessionSummary": {},
"sessionType": "<string>",
"tenantID": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"meta": {
"currentPage": 123,
"hasMore": true,
"perPage": 123,
"totalCount": 123
}
}{
"errors": [
{
"error": "MissingTenantIDError",
"error_code": 1001,
"message": "tenantID is required.",
"statusCode": 400
}
]
}{
"errors": [
{
"error": "UnauthorizedError",
"error_code": 1003,
"message": "You are not authorized to perform this request.",
"statusCode": 401
}
]
}{
"errors": [
{
"error": "ForbiddenError",
"error_code": 1004,
"message": "You do not have access to this resource.",
"statusCode": 403
}
]
}{
"errors": [
{
"error": "UnknownError",
"error_code": 5999,
"message": "For some unknown reason your request has not succeeded.",
"statusCode": 500
}
]
}Path Parameters
The tenant the contact belongs to.
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$The contact whose conversations are listed.
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Query Parameters
1-indexed page number to fetch.
Required range:
1 <= x <= 9007199254740991Number of conversations per page (max 50).
Required range:
1 <= x <= 50⌘I