curl --request PUT \
--url https://chat.domix.ai/api/v1/accounts/{account_id}/contacts/{id} \
--header 'Content-Type: application/json' \
--header 'api-access-token: <api-key>' \
--data '
{
"name": "Alice",
"email": "alice@acme.inc",
"blocked": false,
"phone_number": "+123456789",
"avatar": "<string>",
"avatar_url": "https://example.com/avatar.png",
"identifier": "1234567890",
"additional_attributes": {
"type": "customer",
"age": 30
},
"custom_attributes": {}
}
'import requests
url = "https://chat.domix.ai/api/v1/accounts/{account_id}/contacts/{id}"
payload = {
"name": "Alice",
"email": "alice@acme.inc",
"blocked": False,
"phone_number": "+123456789",
"avatar": "<string>",
"avatar_url": "https://example.com/avatar.png",
"identifier": "1234567890",
"additional_attributes": {
"type": "customer",
"age": 30
},
"custom_attributes": {}
}
headers = {
"api-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'api-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Alice',
email: 'alice@acme.inc',
blocked: false,
phone_number: '+123456789',
avatar: '<string>',
avatar_url: 'https://example.com/avatar.png',
identifier: '1234567890',
additional_attributes: {type: 'customer', age: 30},
custom_attributes: {}
})
};
fetch('https://chat.domix.ai/api/v1/accounts/{account_id}/contacts/{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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Alice',
'email' => 'alice@acme.inc',
'blocked' => false,
'phone_number' => '+123456789',
'avatar' => '<string>',
'avatar_url' => 'https://example.com/avatar.png',
'identifier' => '1234567890',
'additional_attributes' => [
'type' => 'customer',
'age' => 30
],
'custom_attributes' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-access-token: <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/{id}"
payload := strings.NewReader("{\n \"name\": \"Alice\",\n \"email\": \"alice@acme.inc\",\n \"blocked\": false,\n \"phone_number\": \"+123456789\",\n \"avatar\": \"<string>\",\n \"avatar_url\": \"https://example.com/avatar.png\",\n \"identifier\": \"1234567890\",\n \"additional_attributes\": {\n \"type\": \"customer\",\n \"age\": 30\n },\n \"custom_attributes\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("api-access-token", "<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.put("https://chat.domix.ai/api/v1/accounts/{account_id}/contacts/{id}")
.header("api-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Alice\",\n \"email\": \"alice@acme.inc\",\n \"blocked\": false,\n \"phone_number\": \"+123456789\",\n \"avatar\": \"<string>\",\n \"avatar_url\": \"https://example.com/avatar.png\",\n \"identifier\": \"1234567890\",\n \"additional_attributes\": {\n \"type\": \"customer\",\n \"age\": 30\n },\n \"custom_attributes\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://chat.domix.ai/api/v1/accounts/{account_id}/contacts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["api-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Alice\",\n \"email\": \"alice@acme.inc\",\n \"blocked\": false,\n \"phone_number\": \"+123456789\",\n \"avatar\": \"<string>\",\n \"avatar_url\": \"https://example.com/avatar.png\",\n \"identifier\": \"1234567890\",\n \"additional_attributes\": {\n \"type\": \"customer\",\n \"age\": 30\n },\n \"custom_attributes\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"payload": [
{
"additional_attributes": {},
"availability_status": "<string>",
"email": "<string>",
"id": 123,
"name": "<string>",
"phone_number": "<string>",
"blocked": true,
"identifier": "<string>",
"thumbnail": "<string>",
"custom_attributes": {
"attribute_key": "attribute_value",
"signed_up_at": "dd/mm/yyyy"
},
"last_activity_at": 123,
"created_at": 123,
"contact_inboxes": [
{
"source_id": "<string>",
"inbox": {
"id": 123,
"avatar_url": "<string>",
"channel_id": 123,
"name": "<string>",
"channel_type": "<string>",
"provider": "<string>"
}
}
]
}
]
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Update Contact
Update a contact belonging to the account using ID
curl --request PUT \
--url https://chat.domix.ai/api/v1/accounts/{account_id}/contacts/{id} \
--header 'Content-Type: application/json' \
--header 'api-access-token: <api-key>' \
--data '
{
"name": "Alice",
"email": "alice@acme.inc",
"blocked": false,
"phone_number": "+123456789",
"avatar": "<string>",
"avatar_url": "https://example.com/avatar.png",
"identifier": "1234567890",
"additional_attributes": {
"type": "customer",
"age": 30
},
"custom_attributes": {}
}
'import requests
url = "https://chat.domix.ai/api/v1/accounts/{account_id}/contacts/{id}"
payload = {
"name": "Alice",
"email": "alice@acme.inc",
"blocked": False,
"phone_number": "+123456789",
"avatar": "<string>",
"avatar_url": "https://example.com/avatar.png",
"identifier": "1234567890",
"additional_attributes": {
"type": "customer",
"age": 30
},
"custom_attributes": {}
}
headers = {
"api-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'api-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Alice',
email: 'alice@acme.inc',
blocked: false,
phone_number: '+123456789',
avatar: '<string>',
avatar_url: 'https://example.com/avatar.png',
identifier: '1234567890',
additional_attributes: {type: 'customer', age: 30},
custom_attributes: {}
})
};
fetch('https://chat.domix.ai/api/v1/accounts/{account_id}/contacts/{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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Alice',
'email' => 'alice@acme.inc',
'blocked' => false,
'phone_number' => '+123456789',
'avatar' => '<string>',
'avatar_url' => 'https://example.com/avatar.png',
'identifier' => '1234567890',
'additional_attributes' => [
'type' => 'customer',
'age' => 30
],
'custom_attributes' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-access-token: <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/{id}"
payload := strings.NewReader("{\n \"name\": \"Alice\",\n \"email\": \"alice@acme.inc\",\n \"blocked\": false,\n \"phone_number\": \"+123456789\",\n \"avatar\": \"<string>\",\n \"avatar_url\": \"https://example.com/avatar.png\",\n \"identifier\": \"1234567890\",\n \"additional_attributes\": {\n \"type\": \"customer\",\n \"age\": 30\n },\n \"custom_attributes\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("api-access-token", "<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.put("https://chat.domix.ai/api/v1/accounts/{account_id}/contacts/{id}")
.header("api-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Alice\",\n \"email\": \"alice@acme.inc\",\n \"blocked\": false,\n \"phone_number\": \"+123456789\",\n \"avatar\": \"<string>\",\n \"avatar_url\": \"https://example.com/avatar.png\",\n \"identifier\": \"1234567890\",\n \"additional_attributes\": {\n \"type\": \"customer\",\n \"age\": 30\n },\n \"custom_attributes\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://chat.domix.ai/api/v1/accounts/{account_id}/contacts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["api-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Alice\",\n \"email\": \"alice@acme.inc\",\n \"blocked\": false,\n \"phone_number\": \"+123456789\",\n \"avatar\": \"<string>\",\n \"avatar_url\": \"https://example.com/avatar.png\",\n \"identifier\": \"1234567890\",\n \"additional_attributes\": {\n \"type\": \"customer\",\n \"age\": 30\n },\n \"custom_attributes\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"payload": [
{
"additional_attributes": {},
"availability_status": "<string>",
"email": "<string>",
"id": 123,
"name": "<string>",
"phone_number": "<string>",
"blocked": true,
"identifier": "<string>",
"thumbnail": "<string>",
"custom_attributes": {
"attribute_key": "attribute_value",
"signed_up_at": "dd/mm/yyyy"
},
"last_activity_at": 123,
"created_at": 123,
"contact_inboxes": [
{
"source_id": "<string>",
"inbox": {
"id": 123,
"avatar_url": "<string>",
"channel_id": 123,
"name": "<string>",
"channel_type": "<string>",
"provider": "<string>"
}
}
]
}
]
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Authorizations
This token can be obtained by visiting the profile page or via rails console. Provides access to endpoints based on the user permissions levels. This token can be saved by an external system when user is created via API, to perform activities on behalf of the user.
Path Parameters
The numeric ID of the account
ID of the contact
Body
name of the contact
"Alice"
email of the contact
"alice@acme.inc"
whether the contact is blocked or not
false
phone number of the contact
"+123456789"
Send the form data with the avatar image binary or use the avatar_url
The url to a jpeg, png file for the contact avatar
"https://example.com/avatar.png"
A unique identifier for the contact in external system
"1234567890"
An object where you can store additional attributes for contact. example {"type":"customer", "age":30}
{ "type": "customer", "age": 30 }
An object where you can store custom attributes for contact. example {"type":"customer", "age":30}, this should have a valid custom attribute definition.
{}
Response
Success
Hide child attributes
Hide child attributes
The object containing additional attributes related to the contact
The availability status of the contact
The email address of the contact
The ID of the contact
The name of the contact
The phone number of the contact
Whether the contact is blocked
The identifier of the contact
The thumbnail of the contact
The custom attributes of the contact
{
"attribute_key": "attribute_value",
"signed_up_at": "dd/mm/yyyy"
}
The last activity at of the contact
The created at of the contact
Hide child attributes
Hide child attributes
Contact Inbox Source Id
Hide child attributes
Hide child attributes
ID of the inbox
The avatar image of the inbox
The ID of the channel
The name of the inbox
The type of the inbox
The provider of the inbox