Create a contact
curl --request POST \
--url https://chat.domix.ai/api/v1/accounts/{account_id}/contacts \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--header 'api_account_id: <api-key>' \
--data '
{
"name": "Sara Ahmed",
"email": "sara.ahmed@example.com",
"phone_number": "+966555555555",
"custom_attributes": {
"customer_tier": "VIP",
"city": "Riyadh"
},
"labels": [
"lead",
"ecommerce"
]
}
'import requests
url = "https://chat.domix.ai/api/v1/accounts/{account_id}/contacts"
payload = {
"name": "Sara Ahmed",
"email": "sara.ahmed@example.com",
"phone_number": "+966555555555",
"custom_attributes": {
"customer_tier": "VIP",
"city": "Riyadh"
},
"labels": ["lead", "ecommerce"]
}
headers = {
"api_access_token": "<api-key>",
"api_account_id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
api_access_token: '<api-key>',
api_account_id: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Sara Ahmed',
email: 'sara.ahmed@example.com',
phone_number: '+966555555555',
custom_attributes: {customer_tier: 'VIP', city: 'Riyadh'},
labels: ['lead', 'ecommerce']
})
};
fetch('https://chat.domix.ai/api/v1/accounts/{account_id}/contacts', 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",
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([
'name' => 'Sara Ahmed',
'email' => 'sara.ahmed@example.com',
'phone_number' => '+966555555555',
'custom_attributes' => [
'customer_tier' => 'VIP',
'city' => 'Riyadh'
],
'labels' => [
'lead',
'ecommerce'
]
]),
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"
payload := strings.NewReader("{\n \"name\": \"Sara Ahmed\",\n \"email\": \"sara.ahmed@example.com\",\n \"phone_number\": \"+966555555555\",\n \"custom_attributes\": {\n \"customer_tier\": \"VIP\",\n \"city\": \"Riyadh\"\n },\n \"labels\": [\n \"lead\",\n \"ecommerce\"\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://chat.domix.ai/api/v1/accounts/{account_id}/contacts")
.header("api_access_token", "<api-key>")
.header("api_account_id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Sara Ahmed\",\n \"email\": \"sara.ahmed@example.com\",\n \"phone_number\": \"+966555555555\",\n \"custom_attributes\": {\n \"customer_tier\": \"VIP\",\n \"city\": \"Riyadh\"\n },\n \"labels\": [\n \"lead\",\n \"ecommerce\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://chat.domix.ai/api/v1/accounts/{account_id}/contacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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\",\n \"email\": \"sara.ahmed@example.com\",\n \"phone_number\": \"+966555555555\",\n \"custom_attributes\": {\n \"customer_tier\": \"VIP\",\n \"city\": \"Riyadh\"\n },\n \"labels\": [\n \"lead\",\n \"ecommerce\"\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>"
]
}
}
}{
"message": "Validation failed",
"attributes": [
"<string>"
]
}Core CRM & Conversation APIs
Create a contact
Create a new contact record in the specified account.
POST
https://chat.domix.ai
/
api
/
v1
/
accounts
/
{account_id}
/
contacts
Create a contact
curl --request POST \
--url https://chat.domix.ai/api/v1/accounts/{account_id}/contacts \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--header 'api_account_id: <api-key>' \
--data '
{
"name": "Sara Ahmed",
"email": "sara.ahmed@example.com",
"phone_number": "+966555555555",
"custom_attributes": {
"customer_tier": "VIP",
"city": "Riyadh"
},
"labels": [
"lead",
"ecommerce"
]
}
'import requests
url = "https://chat.domix.ai/api/v1/accounts/{account_id}/contacts"
payload = {
"name": "Sara Ahmed",
"email": "sara.ahmed@example.com",
"phone_number": "+966555555555",
"custom_attributes": {
"customer_tier": "VIP",
"city": "Riyadh"
},
"labels": ["lead", "ecommerce"]
}
headers = {
"api_access_token": "<api-key>",
"api_account_id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
api_access_token: '<api-key>',
api_account_id: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Sara Ahmed',
email: 'sara.ahmed@example.com',
phone_number: '+966555555555',
custom_attributes: {customer_tier: 'VIP', city: 'Riyadh'},
labels: ['lead', 'ecommerce']
})
};
fetch('https://chat.domix.ai/api/v1/accounts/{account_id}/contacts', 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",
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([
'name' => 'Sara Ahmed',
'email' => 'sara.ahmed@example.com',
'phone_number' => '+966555555555',
'custom_attributes' => [
'customer_tier' => 'VIP',
'city' => 'Riyadh'
],
'labels' => [
'lead',
'ecommerce'
]
]),
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"
payload := strings.NewReader("{\n \"name\": \"Sara Ahmed\",\n \"email\": \"sara.ahmed@example.com\",\n \"phone_number\": \"+966555555555\",\n \"custom_attributes\": {\n \"customer_tier\": \"VIP\",\n \"city\": \"Riyadh\"\n },\n \"labels\": [\n \"lead\",\n \"ecommerce\"\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://chat.domix.ai/api/v1/accounts/{account_id}/contacts")
.header("api_access_token", "<api-key>")
.header("api_account_id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Sara Ahmed\",\n \"email\": \"sara.ahmed@example.com\",\n \"phone_number\": \"+966555555555\",\n \"custom_attributes\": {\n \"customer_tier\": \"VIP\",\n \"city\": \"Riyadh\"\n },\n \"labels\": [\n \"lead\",\n \"ecommerce\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://chat.domix.ai/api/v1/accounts/{account_id}/contacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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\",\n \"email\": \"sara.ahmed@example.com\",\n \"phone_number\": \"+966555555555\",\n \"custom_attributes\": {\n \"customer_tier\": \"VIP\",\n \"city\": \"Riyadh\"\n },\n \"labels\": [\n \"lead\",\n \"ecommerce\"\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>"
]
}
}
}{
"message": "Validation failed",
"attributes": [
"<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"
Body
application/json
Response
Contact created 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