Update operator availability
curl --request PATCH \
--url https://services-api.talqui.chat/v1/tenants/{tenantID}/operators/{operatorID}/availability \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"notificationPlatform": "<string>",
"notificationToken": "<string>",
"status": "<string>"
}
'import requests
url = "https://services-api.talqui.chat/v1/tenants/{tenantID}/operators/{operatorID}/availability"
payload = {
"notificationPlatform": "<string>",
"notificationToken": "<string>",
"status": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
notificationPlatform: '<string>',
notificationToken: '<string>',
status: '<string>'
})
};
fetch('https://services-api.talqui.chat/v1/tenants/{tenantID}/operators/{operatorID}/availability', 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}/operators/{operatorID}/availability",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'notificationPlatform' => '<string>',
'notificationToken' => '<string>',
'status' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://services-api.talqui.chat/v1/tenants/{tenantID}/operators/{operatorID}/availability"
payload := strings.NewReader("{\n \"notificationPlatform\": \"<string>\",\n \"notificationToken\": \"<string>\",\n \"status\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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}/operators/{operatorID}/availability")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"notificationPlatform\": \"<string>\",\n \"notificationToken\": \"<string>\",\n \"status\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://services-api.talqui.chat/v1/tenants/{tenantID}/operators/{operatorID}/availability")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"notificationPlatform\": \"<string>\",\n \"notificationToken\": \"<string>\",\n \"status\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"operatorStatus": {
"createdAt": "2023-11-07T05:31:56Z",
"lastHeartbeatAt": "2023-11-07T05:31:56Z",
"operatorID": "<string>",
"operatorStatus": "online",
"notificationToken": "<string>",
"notificationTokens": {
"mobile": "<string>",
"web": "<string>"
},
"organizationID": "<string>",
"tenantID": "<string>"
}
}
}{
"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": "UnknownError",
"error_code": 5999,
"message": "For some unknown reason your request has not succeeded.",
"statusCode": 500
}
]
}Operators
Update operator availability
Updates an operator’s presence status (online/away/offline) and, optionally, their push notification token/platform for the current device. Processing happens asynchronously — the response reflects the accepted request, not necessarily the fully-propagated state.
PATCH
/
v1
/
tenants
/
{tenantID}
/
operators
/
{operatorID}
/
availability
Update operator availability
curl --request PATCH \
--url https://services-api.talqui.chat/v1/tenants/{tenantID}/operators/{operatorID}/availability \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"notificationPlatform": "<string>",
"notificationToken": "<string>",
"status": "<string>"
}
'import requests
url = "https://services-api.talqui.chat/v1/tenants/{tenantID}/operators/{operatorID}/availability"
payload = {
"notificationPlatform": "<string>",
"notificationToken": "<string>",
"status": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
notificationPlatform: '<string>',
notificationToken: '<string>',
status: '<string>'
})
};
fetch('https://services-api.talqui.chat/v1/tenants/{tenantID}/operators/{operatorID}/availability', 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}/operators/{operatorID}/availability",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'notificationPlatform' => '<string>',
'notificationToken' => '<string>',
'status' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://services-api.talqui.chat/v1/tenants/{tenantID}/operators/{operatorID}/availability"
payload := strings.NewReader("{\n \"notificationPlatform\": \"<string>\",\n \"notificationToken\": \"<string>\",\n \"status\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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}/operators/{operatorID}/availability")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"notificationPlatform\": \"<string>\",\n \"notificationToken\": \"<string>\",\n \"status\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://services-api.talqui.chat/v1/tenants/{tenantID}/operators/{operatorID}/availability")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"notificationPlatform\": \"<string>\",\n \"notificationToken\": \"<string>\",\n \"status\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"operatorStatus": {
"createdAt": "2023-11-07T05:31:56Z",
"lastHeartbeatAt": "2023-11-07T05:31:56Z",
"operatorID": "<string>",
"operatorStatus": "online",
"notificationToken": "<string>",
"notificationTokens": {
"mobile": "<string>",
"web": "<string>"
},
"organizationID": "<string>",
"tenantID": "<string>"
}
}
}{
"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": "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 operator 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 operator whose availability is being updated.
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)$Body
application/json
Response
Response for status 202.
Show child attributes
Show child attributes
⌘I