Open session
curl --request PATCH \
--url https://services-api.talqui.chat/v1/tenants/{tenantID}/sessions/{sessionID}/open \
--header 'Authorization: Bearer <token>'import requests
url = "https://services-api.talqui.chat/v1/tenants/{tenantID}/sessions/{sessionID}/open"
headers = {"Authorization": "Bearer <token>"}
response = requests.patch(url, headers=headers)
print(response.text)const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};
fetch('https://services-api.talqui.chat/v1/tenants/{tenantID}/sessions/{sessionID}/open', 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}/sessions/{sessionID}/open",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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}/sessions/{sessionID}/open"
req, _ := http.NewRequest("PATCH", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://services-api.talqui.chat/v1/tenants/{tenantID}/sessions/{sessionID}/open")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://services-api.talqui.chat/v1/tenants/{tenantID}/sessions/{sessionID}/open")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"session": {
"contactID": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"operatorID": "<string>",
"organizationID": "<string>",
"pluginConnectionID": "<string>",
"sessionActive": true,
"sessionChannel": "<string>",
"sessionCloseComments": "<string>",
"sessionID": "<string>",
"sessionInactivityAt": "2023-11-07T05:31:56Z",
"sessionInitiator": "contact",
"sessionKind": "transactional",
"sessionLastMessageID": "<string>",
"sessionLastSmartID": "<string>",
"sessionLastTag": "<string>",
"sessionMeta": {},
"sessionRating": {
"comment": "<string>",
"stars": 123,
"createdAt": "2023-11-07T05:31:56Z"
},
"sessionStatus": 123,
"sessionSubProcess": "<string>",
"sessionSummary": {},
"sessionTags": [
"<string>"
],
"sessionType": "auto",
"tenantID": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"closeMotive": "<string>",
"closedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z",
"inboxID": "<string>",
"manualAt": "2023-11-07T05:31:56Z",
"queuedAt": "2023-11-07T05:31:56Z"
}
}{
"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": "SessionNotFoundError",
"error_code": 1060,
"message": "Session not found.",
"statusCode": 404
}
]
}{
"errors": [
{
"error": "UnknownError",
"error_code": 5999,
"message": "For some unknown reason your request has not succeeded.",
"statusCode": 500
}
]
}Sessions
Open session
Reopens a closed session, assigning it to the requesting operator and notifying connected clients over the realtime socket.
PATCH
/
v1
/
tenants
/
{tenantID}
/
sessions
/
{sessionID}
/
open
Open session
curl --request PATCH \
--url https://services-api.talqui.chat/v1/tenants/{tenantID}/sessions/{sessionID}/open \
--header 'Authorization: Bearer <token>'import requests
url = "https://services-api.talqui.chat/v1/tenants/{tenantID}/sessions/{sessionID}/open"
headers = {"Authorization": "Bearer <token>"}
response = requests.patch(url, headers=headers)
print(response.text)const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};
fetch('https://services-api.talqui.chat/v1/tenants/{tenantID}/sessions/{sessionID}/open', 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}/sessions/{sessionID}/open",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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}/sessions/{sessionID}/open"
req, _ := http.NewRequest("PATCH", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://services-api.talqui.chat/v1/tenants/{tenantID}/sessions/{sessionID}/open")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://services-api.talqui.chat/v1/tenants/{tenantID}/sessions/{sessionID}/open")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"session": {
"contactID": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"operatorID": "<string>",
"organizationID": "<string>",
"pluginConnectionID": "<string>",
"sessionActive": true,
"sessionChannel": "<string>",
"sessionCloseComments": "<string>",
"sessionID": "<string>",
"sessionInactivityAt": "2023-11-07T05:31:56Z",
"sessionInitiator": "contact",
"sessionKind": "transactional",
"sessionLastMessageID": "<string>",
"sessionLastSmartID": "<string>",
"sessionLastTag": "<string>",
"sessionMeta": {},
"sessionRating": {
"comment": "<string>",
"stars": 123,
"createdAt": "2023-11-07T05:31:56Z"
},
"sessionStatus": 123,
"sessionSubProcess": "<string>",
"sessionSummary": {},
"sessionTags": [
"<string>"
],
"sessionType": "auto",
"tenantID": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"closeMotive": "<string>",
"closedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z",
"inboxID": "<string>",
"manualAt": "2023-11-07T05:31:56Z",
"queuedAt": "2023-11-07T05:31:56Z"
}
}{
"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": "SessionNotFoundError",
"error_code": 1060,
"message": "Session not found.",
"statusCode": 404
}
]
}{
"errors": [
{
"error": "UnknownError",
"error_code": 5999,
"message": "For some unknown reason your request has not succeeded.",
"statusCode": 500
}
]
}Authorizations
Behalf of an Operator (default). A JWT issued by Talqui Core when an operator signs in, scoped to every tenant that operator belongs to. Send as Authorization: Bearer <jwt-token>.
Path Parameters
The tenant the session 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 session to reopen.
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)$Response
Response for status 200.
The reopened session.
Show child attributes
Show child attributes
⌘I