Settings
Update automatic messages
Changes the automatic messages (switches and texts). Managers and owners. Only the fields sent change; a message turned on needs its text. Answers every field as saved.
PATCH
/
v1
/
tenants
/
{tenantID}
/
settings
/
messages
Update automatic messages
curl --request PATCH \
--url https://services-api.talqui.chat/v1/tenants/{tenantID}/settings/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"allowOperatorsDisableRequestRating": true,
"customRefuseCalls": "<string>",
"isActiveCustomRefuseCalls": true,
"isActiveOnCloseInactivity": true,
"isActiveOnCloseOperator": true,
"isActiveOnRequestRating": true,
"isActiveOnRouting": true,
"onCloseInactivity": "<string>",
"onCloseOperator": "<string>",
"onRequestRating": "<string>",
"onRouting": "<string>"
}
'import requests
url = "https://services-api.talqui.chat/v1/tenants/{tenantID}/settings/messages"
payload = {
"allowOperatorsDisableRequestRating": True,
"customRefuseCalls": "<string>",
"isActiveCustomRefuseCalls": True,
"isActiveOnCloseInactivity": True,
"isActiveOnCloseOperator": True,
"isActiveOnRequestRating": True,
"isActiveOnRouting": True,
"onCloseInactivity": "<string>",
"onCloseOperator": "<string>",
"onRequestRating": "<string>",
"onRouting": "<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({
allowOperatorsDisableRequestRating: true,
customRefuseCalls: '<string>',
isActiveCustomRefuseCalls: true,
isActiveOnCloseInactivity: true,
isActiveOnCloseOperator: true,
isActiveOnRequestRating: true,
isActiveOnRouting: true,
onCloseInactivity: '<string>',
onCloseOperator: '<string>',
onRequestRating: '<string>',
onRouting: '<string>'
})
};
fetch('https://services-api.talqui.chat/v1/tenants/{tenantID}/settings/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}/settings/messages",
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([
'allowOperatorsDisableRequestRating' => true,
'customRefuseCalls' => '<string>',
'isActiveCustomRefuseCalls' => true,
'isActiveOnCloseInactivity' => true,
'isActiveOnCloseOperator' => true,
'isActiveOnRequestRating' => true,
'isActiveOnRouting' => true,
'onCloseInactivity' => '<string>',
'onCloseOperator' => '<string>',
'onRequestRating' => '<string>',
'onRouting' => '<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}/settings/messages"
payload := strings.NewReader("{\n \"allowOperatorsDisableRequestRating\": true,\n \"customRefuseCalls\": \"<string>\",\n \"isActiveCustomRefuseCalls\": true,\n \"isActiveOnCloseInactivity\": true,\n \"isActiveOnCloseOperator\": true,\n \"isActiveOnRequestRating\": true,\n \"isActiveOnRouting\": true,\n \"onCloseInactivity\": \"<string>\",\n \"onCloseOperator\": \"<string>\",\n \"onRequestRating\": \"<string>\",\n \"onRouting\": \"<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}/settings/messages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"allowOperatorsDisableRequestRating\": true,\n \"customRefuseCalls\": \"<string>\",\n \"isActiveCustomRefuseCalls\": true,\n \"isActiveOnCloseInactivity\": true,\n \"isActiveOnCloseOperator\": true,\n \"isActiveOnRequestRating\": true,\n \"isActiveOnRouting\": true,\n \"onCloseInactivity\": \"<string>\",\n \"onCloseOperator\": \"<string>\",\n \"onRequestRating\": \"<string>\",\n \"onRouting\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://services-api.talqui.chat/v1/tenants/{tenantID}/settings/messages")
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 \"allowOperatorsDisableRequestRating\": true,\n \"customRefuseCalls\": \"<string>\",\n \"isActiveCustomRefuseCalls\": true,\n \"isActiveOnCloseInactivity\": true,\n \"isActiveOnCloseOperator\": true,\n \"isActiveOnRequestRating\": true,\n \"isActiveOnRouting\": true,\n \"onCloseInactivity\": \"<string>\",\n \"onCloseOperator\": \"<string>\",\n \"onRequestRating\": \"<string>\",\n \"onRouting\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"messagesDefault": {
"allowOperatorsDisableRequestRating": false,
"customRefuseCalls": "",
"isActiveCustomRefuseCalls": false,
"isActiveOnCloseInactivity": true,
"isActiveOnCloseOperator": false,
"isActiveOnRequestRating": true,
"isActiveOnRouting": true,
"onCloseInactivity": "We closed this conversation for inactivity. Write again whenever you need.",
"onCloseOperator": "",
"onRequestRating": "How was our service? Reply from 1 to 5.",
"onRouting": "You are now talking to {{operator.firstname}}."
}
}
}{
"errors": [
{
"error": "RequestValidationError",
"error_code": 1002,
"fields": [
{
"allowed": "<string>",
"field": "<string>",
"received": "<string>"
}
],
"message": "Invalid request data.",
"statusCode": 400
}
]
}{
"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
Path Parameters
Body
application/json
⌘I
Update automatic messages
curl --request PATCH \
--url https://services-api.talqui.chat/v1/tenants/{tenantID}/settings/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"allowOperatorsDisableRequestRating": true,
"customRefuseCalls": "<string>",
"isActiveCustomRefuseCalls": true,
"isActiveOnCloseInactivity": true,
"isActiveOnCloseOperator": true,
"isActiveOnRequestRating": true,
"isActiveOnRouting": true,
"onCloseInactivity": "<string>",
"onCloseOperator": "<string>",
"onRequestRating": "<string>",
"onRouting": "<string>"
}
'import requests
url = "https://services-api.talqui.chat/v1/tenants/{tenantID}/settings/messages"
payload = {
"allowOperatorsDisableRequestRating": True,
"customRefuseCalls": "<string>",
"isActiveCustomRefuseCalls": True,
"isActiveOnCloseInactivity": True,
"isActiveOnCloseOperator": True,
"isActiveOnRequestRating": True,
"isActiveOnRouting": True,
"onCloseInactivity": "<string>",
"onCloseOperator": "<string>",
"onRequestRating": "<string>",
"onRouting": "<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({
allowOperatorsDisableRequestRating: true,
customRefuseCalls: '<string>',
isActiveCustomRefuseCalls: true,
isActiveOnCloseInactivity: true,
isActiveOnCloseOperator: true,
isActiveOnRequestRating: true,
isActiveOnRouting: true,
onCloseInactivity: '<string>',
onCloseOperator: '<string>',
onRequestRating: '<string>',
onRouting: '<string>'
})
};
fetch('https://services-api.talqui.chat/v1/tenants/{tenantID}/settings/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}/settings/messages",
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([
'allowOperatorsDisableRequestRating' => true,
'customRefuseCalls' => '<string>',
'isActiveCustomRefuseCalls' => true,
'isActiveOnCloseInactivity' => true,
'isActiveOnCloseOperator' => true,
'isActiveOnRequestRating' => true,
'isActiveOnRouting' => true,
'onCloseInactivity' => '<string>',
'onCloseOperator' => '<string>',
'onRequestRating' => '<string>',
'onRouting' => '<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}/settings/messages"
payload := strings.NewReader("{\n \"allowOperatorsDisableRequestRating\": true,\n \"customRefuseCalls\": \"<string>\",\n \"isActiveCustomRefuseCalls\": true,\n \"isActiveOnCloseInactivity\": true,\n \"isActiveOnCloseOperator\": true,\n \"isActiveOnRequestRating\": true,\n \"isActiveOnRouting\": true,\n \"onCloseInactivity\": \"<string>\",\n \"onCloseOperator\": \"<string>\",\n \"onRequestRating\": \"<string>\",\n \"onRouting\": \"<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}/settings/messages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"allowOperatorsDisableRequestRating\": true,\n \"customRefuseCalls\": \"<string>\",\n \"isActiveCustomRefuseCalls\": true,\n \"isActiveOnCloseInactivity\": true,\n \"isActiveOnCloseOperator\": true,\n \"isActiveOnRequestRating\": true,\n \"isActiveOnRouting\": true,\n \"onCloseInactivity\": \"<string>\",\n \"onCloseOperator\": \"<string>\",\n \"onRequestRating\": \"<string>\",\n \"onRouting\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://services-api.talqui.chat/v1/tenants/{tenantID}/settings/messages")
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 \"allowOperatorsDisableRequestRating\": true,\n \"customRefuseCalls\": \"<string>\",\n \"isActiveCustomRefuseCalls\": true,\n \"isActiveOnCloseInactivity\": true,\n \"isActiveOnCloseOperator\": true,\n \"isActiveOnRequestRating\": true,\n \"isActiveOnRouting\": true,\n \"onCloseInactivity\": \"<string>\",\n \"onCloseOperator\": \"<string>\",\n \"onRequestRating\": \"<string>\",\n \"onRouting\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"messagesDefault": {
"allowOperatorsDisableRequestRating": false,
"customRefuseCalls": "",
"isActiveCustomRefuseCalls": false,
"isActiveOnCloseInactivity": true,
"isActiveOnCloseOperator": false,
"isActiveOnRequestRating": true,
"isActiveOnRouting": true,
"onCloseInactivity": "We closed this conversation for inactivity. Write again whenever you need.",
"onCloseOperator": "",
"onRequestRating": "How was our service? Reply from 1 to 5.",
"onRouting": "You are now talking to {{operator.firstname}}."
}
}
}{
"errors": [
{
"error": "RequestValidationError",
"error_code": 1002,
"fields": [
{
"allowed": "<string>",
"field": "<string>",
"received": "<string>"
}
],
"message": "Invalid request data.",
"statusCode": 400
}
]
}{
"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
}
]
}