curl --request PATCH \
--url https://services-api.talqui.chat/v1/tenants/{tenantID}/contacts/{contactID} \
--header 'Content-Type: application/json' \
--data '
{
"addTags": [
"<string>"
],
"contactBlock": true,
"contactEmail": "",
"contactEmailVerified": true,
"contactFirstname": "<string>",
"contactLastname": "<string>",
"contactNameVerified": true,
"contactPhone": "<string>",
"contactPhoneVerified": true,
"removeTags": [
"<string>"
]
}
'import requests
url = "https://services-api.talqui.chat/v1/tenants/{tenantID}/contacts/{contactID}"
payload = {
"addTags": ["<string>"],
"contactBlock": True,
"contactEmail": "",
"contactEmailVerified": True,
"contactFirstname": "<string>",
"contactLastname": "<string>",
"contactNameVerified": True,
"contactPhone": "<string>",
"contactPhoneVerified": True,
"removeTags": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
addTags: ['<string>'],
contactBlock: true,
contactEmail: '',
contactEmailVerified: true,
contactFirstname: '<string>',
contactLastname: '<string>',
contactNameVerified: true,
contactPhone: '<string>',
contactPhoneVerified: true,
removeTags: ['<string>']
})
};
fetch('https://services-api.talqui.chat/v1/tenants/{tenantID}/contacts/{contactID}', 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}/contacts/{contactID}",
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([
'addTags' => [
'<string>'
],
'contactBlock' => true,
'contactEmail' => '',
'contactEmailVerified' => true,
'contactFirstname' => '<string>',
'contactLastname' => '<string>',
'contactNameVerified' => true,
'contactPhone' => '<string>',
'contactPhoneVerified' => true,
'removeTags' => [
'<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/tenants/{tenantID}/contacts/{contactID}"
payload := strings.NewReader("{\n \"addTags\": [\n \"<string>\"\n ],\n \"contactBlock\": true,\n \"contactEmail\": \"\",\n \"contactEmailVerified\": true,\n \"contactFirstname\": \"<string>\",\n \"contactLastname\": \"<string>\",\n \"contactNameVerified\": true,\n \"contactPhone\": \"<string>\",\n \"contactPhoneVerified\": true,\n \"removeTags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://services-api.talqui.chat/v1/tenants/{tenantID}/contacts/{contactID}")
.header("Content-Type", "application/json")
.body("{\n \"addTags\": [\n \"<string>\"\n ],\n \"contactBlock\": true,\n \"contactEmail\": \"\",\n \"contactEmailVerified\": true,\n \"contactFirstname\": \"<string>\",\n \"contactLastname\": \"<string>\",\n \"contactNameVerified\": true,\n \"contactPhone\": \"<string>\",\n \"contactPhoneVerified\": true,\n \"removeTags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://services-api.talqui.chat/v1/tenants/{tenantID}/contacts/{contactID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"addTags\": [\n \"<string>\"\n ],\n \"contactBlock\": true,\n \"contactEmail\": \"\",\n \"contactEmailVerified\": true,\n \"contactFirstname\": \"<string>\",\n \"contactLastname\": \"<string>\",\n \"contactNameVerified\": true,\n \"contactPhone\": \"<string>\",\n \"contactPhoneVerified\": true,\n \"removeTags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"contact": {
"contactBlock": true,
"contactChannels": [
"<string>"
],
"contactEmail": "<string>",
"contactEmailVerified": true,
"contactExternal": {},
"contactFirstname": "<string>",
"contactID": "<string>",
"contactLastSessionID": "<string>",
"contactLastname": "<string>",
"contactMeta": {},
"contactNameVerified": true,
"contactPhone": "<string>",
"contactPhoneVerified": true,
"contactPhoto": "<string>",
"contactSummary": "<string>",
"contactTags": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"organizationID": "<string>",
"tenantID": "<string>",
"updatedAt": "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": "ContactNotFoundError",
"error_code": 1204,
"message": "Contact not found.",
"statusCode": 404
}
]
}{
"errors": [
{
"error": "UnknownError",
"error_code": 5999,
"message": "For some unknown reason your request has not succeeded.",
"statusCode": 500
}
]
}Update contact
Edits a contact: name, phone, email, their verification flags, the block flag and tags (added and removed individually). Only the fields sent change. Accepts an operator, the tenant’s plugin connection or a plugin installed on the tenant. Connected operators are notified in real time.
curl --request PATCH \
--url https://services-api.talqui.chat/v1/tenants/{tenantID}/contacts/{contactID} \
--header 'Content-Type: application/json' \
--data '
{
"addTags": [
"<string>"
],
"contactBlock": true,
"contactEmail": "",
"contactEmailVerified": true,
"contactFirstname": "<string>",
"contactLastname": "<string>",
"contactNameVerified": true,
"contactPhone": "<string>",
"contactPhoneVerified": true,
"removeTags": [
"<string>"
]
}
'import requests
url = "https://services-api.talqui.chat/v1/tenants/{tenantID}/contacts/{contactID}"
payload = {
"addTags": ["<string>"],
"contactBlock": True,
"contactEmail": "",
"contactEmailVerified": True,
"contactFirstname": "<string>",
"contactLastname": "<string>",
"contactNameVerified": True,
"contactPhone": "<string>",
"contactPhoneVerified": True,
"removeTags": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
addTags: ['<string>'],
contactBlock: true,
contactEmail: '',
contactEmailVerified: true,
contactFirstname: '<string>',
contactLastname: '<string>',
contactNameVerified: true,
contactPhone: '<string>',
contactPhoneVerified: true,
removeTags: ['<string>']
})
};
fetch('https://services-api.talqui.chat/v1/tenants/{tenantID}/contacts/{contactID}', 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}/contacts/{contactID}",
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([
'addTags' => [
'<string>'
],
'contactBlock' => true,
'contactEmail' => '',
'contactEmailVerified' => true,
'contactFirstname' => '<string>',
'contactLastname' => '<string>',
'contactNameVerified' => true,
'contactPhone' => '<string>',
'contactPhoneVerified' => true,
'removeTags' => [
'<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/tenants/{tenantID}/contacts/{contactID}"
payload := strings.NewReader("{\n \"addTags\": [\n \"<string>\"\n ],\n \"contactBlock\": true,\n \"contactEmail\": \"\",\n \"contactEmailVerified\": true,\n \"contactFirstname\": \"<string>\",\n \"contactLastname\": \"<string>\",\n \"contactNameVerified\": true,\n \"contactPhone\": \"<string>\",\n \"contactPhoneVerified\": true,\n \"removeTags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://services-api.talqui.chat/v1/tenants/{tenantID}/contacts/{contactID}")
.header("Content-Type", "application/json")
.body("{\n \"addTags\": [\n \"<string>\"\n ],\n \"contactBlock\": true,\n \"contactEmail\": \"\",\n \"contactEmailVerified\": true,\n \"contactFirstname\": \"<string>\",\n \"contactLastname\": \"<string>\",\n \"contactNameVerified\": true,\n \"contactPhone\": \"<string>\",\n \"contactPhoneVerified\": true,\n \"removeTags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://services-api.talqui.chat/v1/tenants/{tenantID}/contacts/{contactID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"addTags\": [\n \"<string>\"\n ],\n \"contactBlock\": true,\n \"contactEmail\": \"\",\n \"contactEmailVerified\": true,\n \"contactFirstname\": \"<string>\",\n \"contactLastname\": \"<string>\",\n \"contactNameVerified\": true,\n \"contactPhone\": \"<string>\",\n \"contactPhoneVerified\": true,\n \"removeTags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"contact": {
"contactBlock": true,
"contactChannels": [
"<string>"
],
"contactEmail": "<string>",
"contactEmailVerified": true,
"contactExternal": {},
"contactFirstname": "<string>",
"contactID": "<string>",
"contactLastSessionID": "<string>",
"contactLastname": "<string>",
"contactMeta": {},
"contactNameVerified": true,
"contactPhone": "<string>",
"contactPhoneVerified": true,
"contactPhoto": "<string>",
"contactSummary": "<string>",
"contactTags": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"organizationID": "<string>",
"tenantID": "<string>",
"updatedAt": "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": "ContactNotFoundError",
"error_code": 1204,
"message": "Contact not found.",
"statusCode": 404
}
]
}{
"errors": [
{
"error": "UnknownError",
"error_code": 5999,
"message": "For some unknown reason your request has not succeeded.",
"statusCode": 500
}
]
}Path Parameters
The tenant the contact belongs to.
^([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 contact to edit.
^([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
Tags to add (kept as typed; existing ones are ignored).
501 - 60Blocked contacts cannot start new conversations.
Email, stored lowercase; an empty string clears it.
Whether the email was confirmed by an operator.
First name. Cannot be emptied.
1 - 120Last name; an empty string clears it.
120Whether the name was confirmed by an operator.
Phone; stored canonical (digits-only E.164). Numbers outside Brazil need the +country code. An empty string clears it. Does not change the WhatsApp address.
40Whether the phone was confirmed by an operator.
Tags to remove.
501 - 60Response
Response for status 200.
The contact as stored after the change.
Show child attributes
Show child attributes