curl --request POST \
--url https://services-api.talqui.chat/v1/tenants/{tenantID}/operators/shortcuts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"shortcutBang": "<string>",
"shortcutContents": [
{
"contentKey": "text",
"contentValue": "<string>"
}
],
"shortcutScope": "user-based"
}
'import requests
url = "https://services-api.talqui.chat/v1/tenants/{tenantID}/operators/shortcuts"
payload = {
"shortcutBang": "<string>",
"shortcutContents": [
{
"contentKey": "text",
"contentValue": "<string>"
}
],
"shortcutScope": "user-based"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
shortcutBang: '<string>',
shortcutContents: [{contentKey: 'text', contentValue: '<string>'}],
shortcutScope: 'user-based'
})
};
fetch('https://services-api.talqui.chat/v1/tenants/{tenantID}/operators/shortcuts', 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/shortcuts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'shortcutBang' => '<string>',
'shortcutContents' => [
[
'contentKey' => 'text',
'contentValue' => '<string>'
]
],
'shortcutScope' => 'user-based'
]),
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/shortcuts"
payload := strings.NewReader("{\n \"shortcutBang\": \"<string>\",\n \"shortcutContents\": [\n {\n \"contentKey\": \"text\",\n \"contentValue\": \"<string>\"\n }\n ],\n \"shortcutScope\": \"user-based\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://services-api.talqui.chat/v1/tenants/{tenantID}/operators/shortcuts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"shortcutBang\": \"<string>\",\n \"shortcutContents\": [\n {\n \"contentKey\": \"text\",\n \"contentValue\": \"<string>\"\n }\n ],\n \"shortcutScope\": \"user-based\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://services-api.talqui.chat/v1/tenants/{tenantID}/operators/shortcuts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"shortcutBang\": \"<string>\",\n \"shortcutContents\": [\n {\n \"contentKey\": \"text\",\n \"contentValue\": \"<string>\"\n }\n ],\n \"shortcutScope\": \"user-based\"\n}"
response = http.request(request)
puts response.read_body{
"shortcut": {
"createdAt": "2023-11-07T05:31:56Z",
"operatorID": "<string>",
"shortcutBang": "<string>",
"shortcutContents": [
{
"contentID": "<string>",
"contentKey": "text",
"contentValue": "<string>"
}
],
"shortcutID": "<string>",
"shortcutPreview": "<string>",
"shortcutScope": "tenant-based",
"tenantID": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"organizationID": "<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": "ShortcutBangUnavailableError",
"error_code": 1402,
"message": "A shortcut with this name already exists.",
"statusCode": 409
}
]
}{
"errors": [
{
"error": "UnknownError",
"error_code": 5999,
"message": "For some unknown reason your request has not succeeded.",
"statusCode": 500
}
]
}Create operator shortcut
Creates a shortcut for the requesting operator. Unlike the endpoint this replaces, it is a plain create rather than an upsert keyed on the shortcut name — a name already in use is reported as a conflict instead of silently overwriting the existing shortcut.
curl --request POST \
--url https://services-api.talqui.chat/v1/tenants/{tenantID}/operators/shortcuts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"shortcutBang": "<string>",
"shortcutContents": [
{
"contentKey": "text",
"contentValue": "<string>"
}
],
"shortcutScope": "user-based"
}
'import requests
url = "https://services-api.talqui.chat/v1/tenants/{tenantID}/operators/shortcuts"
payload = {
"shortcutBang": "<string>",
"shortcutContents": [
{
"contentKey": "text",
"contentValue": "<string>"
}
],
"shortcutScope": "user-based"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
shortcutBang: '<string>',
shortcutContents: [{contentKey: 'text', contentValue: '<string>'}],
shortcutScope: 'user-based'
})
};
fetch('https://services-api.talqui.chat/v1/tenants/{tenantID}/operators/shortcuts', 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/shortcuts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'shortcutBang' => '<string>',
'shortcutContents' => [
[
'contentKey' => 'text',
'contentValue' => '<string>'
]
],
'shortcutScope' => 'user-based'
]),
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/shortcuts"
payload := strings.NewReader("{\n \"shortcutBang\": \"<string>\",\n \"shortcutContents\": [\n {\n \"contentKey\": \"text\",\n \"contentValue\": \"<string>\"\n }\n ],\n \"shortcutScope\": \"user-based\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://services-api.talqui.chat/v1/tenants/{tenantID}/operators/shortcuts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"shortcutBang\": \"<string>\",\n \"shortcutContents\": [\n {\n \"contentKey\": \"text\",\n \"contentValue\": \"<string>\"\n }\n ],\n \"shortcutScope\": \"user-based\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://services-api.talqui.chat/v1/tenants/{tenantID}/operators/shortcuts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"shortcutBang\": \"<string>\",\n \"shortcutContents\": [\n {\n \"contentKey\": \"text\",\n \"contentValue\": \"<string>\"\n }\n ],\n \"shortcutScope\": \"user-based\"\n}"
response = http.request(request)
puts response.read_body{
"shortcut": {
"createdAt": "2023-11-07T05:31:56Z",
"operatorID": "<string>",
"shortcutBang": "<string>",
"shortcutContents": [
{
"contentID": "<string>",
"contentKey": "text",
"contentValue": "<string>"
}
],
"shortcutID": "<string>",
"shortcutPreview": "<string>",
"shortcutScope": "tenant-based",
"tenantID": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"organizationID": "<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": "ShortcutBangUnavailableError",
"error_code": 1402,
"message": "A shortcut with this name already exists.",
"statusCode": 409
}
]
}{
"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
Body
Free-form shortcut name, 1-64 chars. Trimmed and lowercased, and a leading "!" is accepted and stripped, so "!Boas Vindas" is stored as "boas vindas".
Ordered content blocks; dispatch order matches array order.
1 - 10 elements- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Visibility scope; "tenant-based" requires manager role or above.
tenant-based, user-based Response
Response for status 201.
The affected shortcut.
Show child attributes
Show child attributes