Create a conversation
curl --request POST \
--url https://chat.domix.ai/api/v1/accounts/{account_id}/conversations \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--header 'api_account_id: <api-key>' \
--data '
{
"inbox_id": 1,
"contact_id": 160,
"status": "open",
"custom_attributes": {
"inquiry_type": "sales"
}
}
'import requests
url = "https://chat.domix.ai/api/v1/accounts/{account_id}/conversations"
payload = {
"inbox_id": 1,
"contact_id": 160,
"status": "open",
"custom_attributes": { "inquiry_type": "sales" }
}
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({
inbox_id: 1,
contact_id: 160,
status: 'open',
custom_attributes: {inquiry_type: 'sales'}
})
};
fetch('https://chat.domix.ai/api/v1/accounts/{account_id}/conversations', 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}/conversations",
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([
'inbox_id' => 1,
'contact_id' => 160,
'status' => 'open',
'custom_attributes' => [
'inquiry_type' => 'sales'
]
]),
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}/conversations"
payload := strings.NewReader("{\n \"inbox_id\": 1,\n \"contact_id\": 160,\n \"status\": \"open\",\n \"custom_attributes\": {\n \"inquiry_type\": \"sales\"\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}/conversations")
.header("api_access_token", "<api-key>")
.header("api_account_id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"inbox_id\": 1,\n \"contact_id\": 160,\n \"status\": \"open\",\n \"custom_attributes\": {\n \"inquiry_type\": \"sales\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://chat.domix.ai/api/v1/accounts/{account_id}/conversations")
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 \"inbox_id\": 1,\n \"contact_id\": 160,\n \"status\": \"open\",\n \"custom_attributes\": {\n \"inquiry_type\": \"sales\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 102,
"account_id": 16,
"inbox_id": 1,
"status": "open",
"unread_count": 0,
"meta": {
"sender": {
"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>"
]
},
"assignee": {},
"team": {}
},
"custom_attributes": {},
"created_at": 1693500000
}Core CRM & Conversation APIs
Create a conversation
Start a new conversation for an existing contact inside a specific inbox.
POST
https://chat.domix.ai
/
api
/
v1
/
accounts
/
{account_id}
/
conversations
Create a conversation
curl --request POST \
--url https://chat.domix.ai/api/v1/accounts/{account_id}/conversations \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--header 'api_account_id: <api-key>' \
--data '
{
"inbox_id": 1,
"contact_id": 160,
"status": "open",
"custom_attributes": {
"inquiry_type": "sales"
}
}
'import requests
url = "https://chat.domix.ai/api/v1/accounts/{account_id}/conversations"
payload = {
"inbox_id": 1,
"contact_id": 160,
"status": "open",
"custom_attributes": { "inquiry_type": "sales" }
}
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({
inbox_id: 1,
contact_id: 160,
status: 'open',
custom_attributes: {inquiry_type: 'sales'}
})
};
fetch('https://chat.domix.ai/api/v1/accounts/{account_id}/conversations', 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}/conversations",
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([
'inbox_id' => 1,
'contact_id' => 160,
'status' => 'open',
'custom_attributes' => [
'inquiry_type' => 'sales'
]
]),
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}/conversations"
payload := strings.NewReader("{\n \"inbox_id\": 1,\n \"contact_id\": 160,\n \"status\": \"open\",\n \"custom_attributes\": {\n \"inquiry_type\": \"sales\"\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}/conversations")
.header("api_access_token", "<api-key>")
.header("api_account_id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"inbox_id\": 1,\n \"contact_id\": 160,\n \"status\": \"open\",\n \"custom_attributes\": {\n \"inquiry_type\": \"sales\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://chat.domix.ai/api/v1/accounts/{account_id}/conversations")
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 \"inbox_id\": 1,\n \"contact_id\": 160,\n \"status\": \"open\",\n \"custom_attributes\": {\n \"inquiry_type\": \"sales\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 102,
"account_id": 16,
"inbox_id": 1,
"status": "open",
"unread_count": 0,
"meta": {
"sender": {
"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>"
]
},
"assignee": {},
"team": {}
},
"custom_attributes": {},
"created_at": 1693500000
}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
200 - application/json
Conversation created successfully
Example:
102
Example:
16
Example:
1
Example:
"open"
Example:
0
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
Example:
1693500000