Update a contact
curl --request PATCH \
--url https://chat.domix.ai/api/v1/accounts/{account_id}/contacts/{contact_id} \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--header 'api_account_id: <api-key>' \
--data '
{
"name": "Sara Ahmed Updated",
"custom_attributes": {
"customer_tier": "Platinum"
}
}
'import requests
url = "https://chat.domix.ai/api/v1/accounts/{account_id}/contacts/{contact_id}"
payload = {
"name": "Sara Ahmed Updated",
"custom_attributes": { "customer_tier": "Platinum" }
}
headers = {
"api_access_token": "<api-key>",
"api_account_id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
api_access_token: '<api-key>',
api_account_id: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: 'Sara Ahmed Updated', custom_attributes: {customer_tier: 'Platinum'}})
};
fetch('https://chat.domix.ai/api/v1/accounts/{account_id}/contacts/{contact_id}', 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://chat.domix.ai/api/v1/accounts/{account_id}/contacts/{contact_id}",
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([
'name' => 'Sara Ahmed Updated',
'custom_attributes' => [
'customer_tier' => 'Platinum'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api_access_token: <api-key>",
"api_account_id: <api-key>"
],
]);
$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://chat.domix.ai/api/v1/accounts/{account_id}/contacts/{contact_id}"
payload := strings.NewReader("{\n \"name\": \"Sara Ahmed Updated\",\n \"custom_attributes\": {\n \"customer_tier\": \"Platinum\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("api_access_token", "<api-key>")
req.Header.Add("api_account_id", "<api-key>")
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://chat.domix.ai/api/v1/accounts/{account_id}/contacts/{contact_id}")
.header("api_access_token", "<api-key>")
.header("api_account_id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Sara Ahmed Updated\",\n \"custom_attributes\": {\n \"customer_tier\": \"Platinum\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://chat.domix.ai/api/v1/accounts/{account_id}/contacts/{contact_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["api_access_token"] = '<api-key>'
request["api_account_id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Sara Ahmed Updated\",\n \"custom_attributes\": {\n \"customer_tier\": \"Platinum\"\n }\n}"
response = http.request(request)
puts response.read_body{
"payload": {
"contact": {
"id": 160,
"name": "Sara Ahmed",
"email": "sara.ahmed@example.com",
"phone_number": "+966555555555",
"identifier": "<string>",
"thumbnail": "<string>",
"custom_attributes": {},
"additional_attributes": {},
"created_at": 1693500000,
"labels": [
"<string>"
]
}
}
}Core CRM & Conversation APIs
Update a contact
Update details or custom attributes of an existing contact.
PATCH
https://chat.domix.ai
/
api
/
v1
/
accounts
/
{account_id}
/
contacts
/
{contact_id}
Update a contact
curl --request PATCH \
--url https://chat.domix.ai/api/v1/accounts/{account_id}/contacts/{contact_id} \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--header 'api_account_id: <api-key>' \
--data '
{
"name": "Sara Ahmed Updated",
"custom_attributes": {
"customer_tier": "Platinum"
}
}
'import requests
url = "https://chat.domix.ai/api/v1/accounts/{account_id}/contacts/{contact_id}"
payload = {
"name": "Sara Ahmed Updated",
"custom_attributes": { "customer_tier": "Platinum" }
}
headers = {
"api_access_token": "<api-key>",
"api_account_id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
api_access_token: '<api-key>',
api_account_id: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: 'Sara Ahmed Updated', custom_attributes: {customer_tier: 'Platinum'}})
};
fetch('https://chat.domix.ai/api/v1/accounts/{account_id}/contacts/{contact_id}', 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://chat.domix.ai/api/v1/accounts/{account_id}/contacts/{contact_id}",
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([
'name' => 'Sara Ahmed Updated',
'custom_attributes' => [
'customer_tier' => 'Platinum'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api_access_token: <api-key>",
"api_account_id: <api-key>"
],
]);
$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://chat.domix.ai/api/v1/accounts/{account_id}/contacts/{contact_id}"
payload := strings.NewReader("{\n \"name\": \"Sara Ahmed Updated\",\n \"custom_attributes\": {\n \"customer_tier\": \"Platinum\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("api_access_token", "<api-key>")
req.Header.Add("api_account_id", "<api-key>")
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://chat.domix.ai/api/v1/accounts/{account_id}/contacts/{contact_id}")
.header("api_access_token", "<api-key>")
.header("api_account_id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Sara Ahmed Updated\",\n \"custom_attributes\": {\n \"customer_tier\": \"Platinum\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://chat.domix.ai/api/v1/accounts/{account_id}/contacts/{contact_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["api_access_token"] = '<api-key>'
request["api_account_id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Sara Ahmed Updated\",\n \"custom_attributes\": {\n \"customer_tier\": \"Platinum\"\n }\n}"
response = http.request(request)
puts response.read_body{
"payload": {
"contact": {
"id": 160,
"name": "Sara Ahmed",
"email": "sara.ahmed@example.com",
"phone_number": "+966555555555",
"identifier": "<string>",
"thumbnail": "<string>",
"custom_attributes": {},
"additional_attributes": {},
"created_at": 1693500000,
"labels": [
"<string>"
]
}
}
}Authorizations
ApiAccessToken & ApiAccountIdApiAccessTokenHyphen & ApiAccountIdHyphen
API Access Token (underscore format)
Account ID (underscore format for unified message endpoints)
Path Parameters
ID of the account in Domix AI
Example:
"16"
ID of the contact
Example:
"160"
Body
application/json
Response
200 - application/json
Contact updated successfully
Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
Example:
160
Example:
"Sara Ahmed"
Example:
"sara.ahmed@example.com"
Example:
"+966555555555"
Example:
1693500000