Search messages
curl --request GET \
--url https://services-api.talqui.chat/v1/tenants/{tenantID}/messagesimport requests
url = "https://services-api.talqui.chat/v1/tenants/{tenantID}/messages"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://services-api.talqui.chat/v1/tenants/{tenantID}/messages', 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}/messages",
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}/messages"
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}/messages")
.asString();require 'uri'
require 'net/http'
url = URI("https://services-api.talqui.chat/v1/tenants/{tenantID}/messages")
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": [
{
"contact": {
"contactEmail": "<string>",
"contactFirstname": "<string>",
"contactID": "<string>",
"contactLastname": "<string>",
"contactNameVerified": true,
"contactPhone": "<string>",
"contactPhoto": "<string>",
"contactSummary": "<string>"
},
"contactID": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"messageDirection": "<string>",
"messageID": "<string>",
"messageKey": "<string>",
"messageValue": "<unknown>",
"operatorID": "<string>",
"sessionID": "<string>"
}
],
"meta": {
"count": 123,
"currentPage": 123,
"hasMore": true,
"perPage": 123
}
}{
"data": [
{
"contact": {
"contactEmail": "<string>",
"contactFirstname": "<string>",
"contactID": "<string>",
"contactLastname": "<string>",
"contactNameVerified": true,
"contactPhone": "<string>",
"contactPhoto": "<string>",
"contactSummary": "<string>"
},
"contactID": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"messageDirection": "<string>",
"messageID": "<string>",
"messageKey": "<string>",
"messageValue": "<unknown>",
"operatorID": "<string>",
"sessionID": "<string>"
}
],
"meta": {
"count": 123,
"currentPage": 123,
"hasMore": true,
"perPage": 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": "TenantNotFoundError",
"error_code": 1062,
"message": "Tenant not found.",
"statusCode": 404
}
]
}{
"errors": [
{
"error": "MissingConfigurationError",
"error_code": 5001,
"message": "Required configuration is missing.",
"statusCode": 500
}
]
}Messages
Search messages
Full-text search over the tenant’s messages — the “messages” group of the
app-web Spotlight. Replaces core-api GET /tenants/:tenantID/messages.
Hits in conversations the operator cannot read (inbox permissions) are
dropped after the index answers, so a page may hold fewer items than
perPage — even none — while meta.hasMore is still true. Keep paging
until hasMore is false. Returns HTTP 206 instead of 200 when more pages
are available.
GET
/
v1
/
tenants
/
{tenantID}
/
messages
Search messages
curl --request GET \
--url https://services-api.talqui.chat/v1/tenants/{tenantID}/messagesimport requests
url = "https://services-api.talqui.chat/v1/tenants/{tenantID}/messages"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://services-api.talqui.chat/v1/tenants/{tenantID}/messages', 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}/messages",
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}/messages"
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}/messages")
.asString();require 'uri'
require 'net/http'
url = URI("https://services-api.talqui.chat/v1/tenants/{tenantID}/messages")
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": [
{
"contact": {
"contactEmail": "<string>",
"contactFirstname": "<string>",
"contactID": "<string>",
"contactLastname": "<string>",
"contactNameVerified": true,
"contactPhone": "<string>",
"contactPhoto": "<string>",
"contactSummary": "<string>"
},
"contactID": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"messageDirection": "<string>",
"messageID": "<string>",
"messageKey": "<string>",
"messageValue": "<unknown>",
"operatorID": "<string>",
"sessionID": "<string>"
}
],
"meta": {
"count": 123,
"currentPage": 123,
"hasMore": true,
"perPage": 123
}
}{
"data": [
{
"contact": {
"contactEmail": "<string>",
"contactFirstname": "<string>",
"contactID": "<string>",
"contactLastname": "<string>",
"contactNameVerified": true,
"contactPhone": "<string>",
"contactPhoto": "<string>",
"contactSummary": "<string>"
},
"contactID": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"messageDirection": "<string>",
"messageID": "<string>",
"messageKey": "<string>",
"messageValue": "<unknown>",
"operatorID": "<string>",
"sessionID": "<string>"
}
],
"meta": {
"count": 123,
"currentPage": 123,
"hasMore": true,
"perPage": 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": "TenantNotFoundError",
"error_code": 1062,
"message": "Tenant not found.",
"statusCode": 404
}
]
}{
"errors": [
{
"error": "MissingConfigurationError",
"error_code": 5001,
"message": "Required configuration is missing.",
"statusCode": 500
}
]
}Path Parameters
The tenant whose messages are searched.
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
Free-text term matched against the message text index.
Required string length:
1 - 1201-indexed page number to fetch.
Required range:
1 <= x <= 9007199254740991Number of hits per page (max 200).
Required range:
1 <= x <= 200⌘I