curl --request POST \
--url https://services-api.talqui.chat/v1/operators \
--header 'Content-Type: application/json' \
--data '
{
"operatorEmail": "jsmith@example.com",
"operatorFirstname": "<string>",
"operatorLastname": "<string>",
"operatorPassword": "<string>",
"operatorPhone": "<string>",
"emailVerificationCode": "<string>",
"operatorInviteKey": "<string>"
}
'import requests
url = "https://services-api.talqui.chat/v1/operators"
payload = {
"operatorEmail": "jsmith@example.com",
"operatorFirstname": "<string>",
"operatorLastname": "<string>",
"operatorPassword": "<string>",
"operatorPhone": "<string>",
"emailVerificationCode": "<string>",
"operatorInviteKey": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
operatorEmail: 'jsmith@example.com',
operatorFirstname: '<string>',
operatorLastname: '<string>',
operatorPassword: '<string>',
operatorPhone: '<string>',
emailVerificationCode: '<string>',
operatorInviteKey: '<string>'
})
};
fetch('https://services-api.talqui.chat/v1/operators', 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/operators",
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([
'operatorEmail' => 'jsmith@example.com',
'operatorFirstname' => '<string>',
'operatorLastname' => '<string>',
'operatorPassword' => '<string>',
'operatorPhone' => '<string>',
'emailVerificationCode' => '<string>',
'operatorInviteKey' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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/operators"
payload := strings.NewReader("{\n \"operatorEmail\": \"jsmith@example.com\",\n \"operatorFirstname\": \"<string>\",\n \"operatorLastname\": \"<string>\",\n \"operatorPassword\": \"<string>\",\n \"operatorPhone\": \"<string>\",\n \"emailVerificationCode\": \"<string>\",\n \"operatorInviteKey\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/operators")
.header("Content-Type", "application/json")
.body("{\n \"operatorEmail\": \"jsmith@example.com\",\n \"operatorFirstname\": \"<string>\",\n \"operatorLastname\": \"<string>\",\n \"operatorPassword\": \"<string>\",\n \"operatorPhone\": \"<string>\",\n \"emailVerificationCode\": \"<string>\",\n \"operatorInviteKey\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://services-api.talqui.chat/v1/operators")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"operatorEmail\": \"jsmith@example.com\",\n \"operatorFirstname\": \"<string>\",\n \"operatorLastname\": \"<string>\",\n \"operatorPassword\": \"<string>\",\n \"operatorPhone\": \"<string>\",\n \"emailVerificationCode\": \"<string>\",\n \"operatorInviteKey\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"operator": {
"createdAt": "2023-11-07T05:31:56Z",
"lastSignInAt": "2023-11-07T05:31:56Z",
"lastTenantID": "<string>",
"operatorEmail": "<string>",
"operatorFirstname": "<string>",
"operatorID": "<string>",
"operatorLastname": "<string>",
"operatorMeta": {},
"operatorPhone": "<string>",
"operatorPhoto": "<string>",
"operatorRoles": [
"<string>"
],
"updatedAt": "2023-11-07T05:31:56Z",
"operatorSettings": {
"notificationSettings": {
"allDisabled": true,
"allowSounds": true,
"onMessageInbound": true,
"onSessionCreated": true,
"onSessionQueued": true,
"tokens": {
"mobile": "<string>",
"web": "<string>"
},
"onOperatorMentioned": true
}
},
"organizationID": "<string>"
},
"token": "<string>"
}
}{
"errors": [
{
"error": "RequestValidationError",
"error_code": 1002,
"fields": [
{
"allowed": "<string>",
"field": "<string>",
"received": "<string>"
}
],
"message": "Invalid request data.",
"statusCode": 400
}
]
}{
"errors": [
{
"error": "OperatorInviteInvalidError",
"error_code": 1846,
"message": "This requested invite is not valid.",
"statusCode": 404
}
]
}{
"errors": [
{
"error": "EmailVerificationCodeInvalidError",
"error_code": 1849,
"message": "The verification code is not correct.",
"statusCode": 422
}
]
}{
"errors": [
{
"error": "TooManyRequestsError",
"error_code": 1071,
"message": "Too many requests. Try again later.",
"statusCode": 429
}
]
}{
"errors": [
{
"error": "UnknownError",
"error_code": 5999,
"message": "For some unknown reason your request has not succeeded.",
"statusCode": 500
}
]
}Register operator
Creates an operator account and signs it in. Unauthenticated — this is the sign-up.
Without an invite, emailVerificationCode is required: the six digits
e-mailed by POST /v1/operators/email-verification. It is single use.
With operatorInviteKey the operator joins the inviting tenant with the
invite’s roles and gets the default inbox grants; the invite is consumed.
The returned token works on every Talqui API, exactly like a login token.
curl --request POST \
--url https://services-api.talqui.chat/v1/operators \
--header 'Content-Type: application/json' \
--data '
{
"operatorEmail": "jsmith@example.com",
"operatorFirstname": "<string>",
"operatorLastname": "<string>",
"operatorPassword": "<string>",
"operatorPhone": "<string>",
"emailVerificationCode": "<string>",
"operatorInviteKey": "<string>"
}
'import requests
url = "https://services-api.talqui.chat/v1/operators"
payload = {
"operatorEmail": "jsmith@example.com",
"operatorFirstname": "<string>",
"operatorLastname": "<string>",
"operatorPassword": "<string>",
"operatorPhone": "<string>",
"emailVerificationCode": "<string>",
"operatorInviteKey": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
operatorEmail: 'jsmith@example.com',
operatorFirstname: '<string>',
operatorLastname: '<string>',
operatorPassword: '<string>',
operatorPhone: '<string>',
emailVerificationCode: '<string>',
operatorInviteKey: '<string>'
})
};
fetch('https://services-api.talqui.chat/v1/operators', 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/operators",
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([
'operatorEmail' => 'jsmith@example.com',
'operatorFirstname' => '<string>',
'operatorLastname' => '<string>',
'operatorPassword' => '<string>',
'operatorPhone' => '<string>',
'emailVerificationCode' => '<string>',
'operatorInviteKey' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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/operators"
payload := strings.NewReader("{\n \"operatorEmail\": \"jsmith@example.com\",\n \"operatorFirstname\": \"<string>\",\n \"operatorLastname\": \"<string>\",\n \"operatorPassword\": \"<string>\",\n \"operatorPhone\": \"<string>\",\n \"emailVerificationCode\": \"<string>\",\n \"operatorInviteKey\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/operators")
.header("Content-Type", "application/json")
.body("{\n \"operatorEmail\": \"jsmith@example.com\",\n \"operatorFirstname\": \"<string>\",\n \"operatorLastname\": \"<string>\",\n \"operatorPassword\": \"<string>\",\n \"operatorPhone\": \"<string>\",\n \"emailVerificationCode\": \"<string>\",\n \"operatorInviteKey\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://services-api.talqui.chat/v1/operators")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"operatorEmail\": \"jsmith@example.com\",\n \"operatorFirstname\": \"<string>\",\n \"operatorLastname\": \"<string>\",\n \"operatorPassword\": \"<string>\",\n \"operatorPhone\": \"<string>\",\n \"emailVerificationCode\": \"<string>\",\n \"operatorInviteKey\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"operator": {
"createdAt": "2023-11-07T05:31:56Z",
"lastSignInAt": "2023-11-07T05:31:56Z",
"lastTenantID": "<string>",
"operatorEmail": "<string>",
"operatorFirstname": "<string>",
"operatorID": "<string>",
"operatorLastname": "<string>",
"operatorMeta": {},
"operatorPhone": "<string>",
"operatorPhoto": "<string>",
"operatorRoles": [
"<string>"
],
"updatedAt": "2023-11-07T05:31:56Z",
"operatorSettings": {
"notificationSettings": {
"allDisabled": true,
"allowSounds": true,
"onMessageInbound": true,
"onSessionCreated": true,
"onSessionQueued": true,
"tokens": {
"mobile": "<string>",
"web": "<string>"
},
"onOperatorMentioned": true
}
},
"organizationID": "<string>"
},
"token": "<string>"
}
}{
"errors": [
{
"error": "RequestValidationError",
"error_code": 1002,
"fields": [
{
"allowed": "<string>",
"field": "<string>",
"received": "<string>"
}
],
"message": "Invalid request data.",
"statusCode": 400
}
]
}{
"errors": [
{
"error": "OperatorInviteInvalidError",
"error_code": 1846,
"message": "This requested invite is not valid.",
"statusCode": 404
}
]
}{
"errors": [
{
"error": "EmailVerificationCodeInvalidError",
"error_code": 1849,
"message": "The verification code is not correct.",
"statusCode": 422
}
]
}{
"errors": [
{
"error": "TooManyRequestsError",
"error_code": 1071,
"message": "Too many requests. Try again later.",
"statusCode": 429
}
]
}{
"errors": [
{
"error": "UnknownError",
"error_code": 5999,
"message": "For some unknown reason your request has not succeeded.",
"statusCode": 500
}
]
}Body
E-mail address, also the login identifier.
^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$Given name.
1Family name.
1Plain password; stored only as a bcrypt hash.
5 - 64Phone number.
1Six-digit code from POST /v1/operators/email-verification. Required unless operatorInviteKey is given.
^\d{6}$Invite key from the invite e-mail; joins the inviting tenant.
Response
Response for status 201.
Show child attributes
Show child attributes