Update a contact
curl --request PATCH \
--url https://api.inbox.adraa.ai/api/v1/contacts/{contactId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Sara Al-Harbi",
"customFields": {
"crmId": "LEAD-2041",
"plan": "pro",
"legacyField": null
}
}
'import requests
url = "https://api.inbox.adraa.ai/api/v1/contacts/{contactId}"
payload = {
"name": "Sara Al-Harbi",
"customFields": {
"crmId": "LEAD-2041",
"plan": "pro",
"legacyField": None
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Sara Al-Harbi',
customFields: {crmId: 'LEAD-2041', plan: 'pro', legacyField: null}
})
};
fetch('https://api.inbox.adraa.ai/api/v1/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://api.inbox.adraa.ai/api/v1/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([
'name' => 'Sara Al-Harbi',
'customFields' => [
'crmId' => 'LEAD-2041',
'plan' => 'pro',
'legacyField' => null
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.inbox.adraa.ai/api/v1/contacts/{contactId}"
payload := strings.NewReader("{\n \"name\": \"Sara Al-Harbi\",\n \"customFields\": {\n \"crmId\": \"LEAD-2041\",\n \"plan\": \"pro\",\n \"legacyField\": null\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.inbox.adraa.ai/api/v1/contacts/{contactId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Sara Al-Harbi\",\n \"customFields\": {\n \"crmId\": \"LEAD-2041\",\n \"plan\": \"pro\",\n \"legacyField\": null\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.inbox.adraa.ai/api/v1/contacts/{contactId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Sara Al-Harbi\",\n \"customFields\": {\n \"crmId\": \"LEAD-2041\",\n \"plan\": \"pro\",\n \"legacyField\": null\n }\n}"
response = http.request(request)
puts response.read_body{
"contact": {
"id": "cmbxgy7kq0002ph01u2v3w4x5",
"name": "Sara Al-Harbi",
"email": "[email protected]",
"phone": "+966501234567",
"countryIso": "SA",
"avatarUrl": null,
"channels": [
"whatsapp",
"web"
],
"conversationCount": 3,
"openCount": 1,
"firstContactAt": "2026-04-18T09:12:00.000Z",
"customFields": {
"crmId": "LEAD-2041",
"plan": "pro"
}
},
"flows": [
{
"runId": "cmbxh4n3c0005ph01c0d1e2f3",
"flowId": "cmbxh5o4d0006ph01g4h5i6j7",
"flowName": "Order status lookup",
"conversationId": "cmbxgz9pq0003ph01m4n5o6p7",
"status": "completed",
"startedAt": "2026-06-11T08:30:00.000Z",
"completedAt": "2026-06-11T08:31:12.000Z"
}
],
"notes": [
{
"id": "cmbxh3m2b0004ph01y6z7a8b9",
"body": "VIP customer — fast-track any shipping issues.",
"createdAt": "2026-06-10T14:02:00.000Z",
"agent": {
"id": "cmbxgwq1e0000ph01i0j1k2l3",
"nickname": "sara"
}
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "INVALID_API_TOKEN",
"message": "Invalid or revoked API token"
}
}{
"error": {
"code": "CONTACT_NOT_FOUND",
"message": "Contact not found"
}
}Contacts
Update a contact
Updates a contact’s display name and/or custom fields — useful for enriching contacts from a CRM. Custom fields are merged key by key: provided keys overwrite, a null value removes the key, and keys you don’t send are kept. At least one of name or customFields is required.
Rate limit: 30 requests per minute.
PATCH
/
api
/
v1
/
contacts
/
{contactId}
Update a contact
curl --request PATCH \
--url https://api.inbox.adraa.ai/api/v1/contacts/{contactId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Sara Al-Harbi",
"customFields": {
"crmId": "LEAD-2041",
"plan": "pro",
"legacyField": null
}
}
'import requests
url = "https://api.inbox.adraa.ai/api/v1/contacts/{contactId}"
payload = {
"name": "Sara Al-Harbi",
"customFields": {
"crmId": "LEAD-2041",
"plan": "pro",
"legacyField": None
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Sara Al-Harbi',
customFields: {crmId: 'LEAD-2041', plan: 'pro', legacyField: null}
})
};
fetch('https://api.inbox.adraa.ai/api/v1/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://api.inbox.adraa.ai/api/v1/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([
'name' => 'Sara Al-Harbi',
'customFields' => [
'crmId' => 'LEAD-2041',
'plan' => 'pro',
'legacyField' => null
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.inbox.adraa.ai/api/v1/contacts/{contactId}"
payload := strings.NewReader("{\n \"name\": \"Sara Al-Harbi\",\n \"customFields\": {\n \"crmId\": \"LEAD-2041\",\n \"plan\": \"pro\",\n \"legacyField\": null\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.inbox.adraa.ai/api/v1/contacts/{contactId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Sara Al-Harbi\",\n \"customFields\": {\n \"crmId\": \"LEAD-2041\",\n \"plan\": \"pro\",\n \"legacyField\": null\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.inbox.adraa.ai/api/v1/contacts/{contactId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Sara Al-Harbi\",\n \"customFields\": {\n \"crmId\": \"LEAD-2041\",\n \"plan\": \"pro\",\n \"legacyField\": null\n }\n}"
response = http.request(request)
puts response.read_body{
"contact": {
"id": "cmbxgy7kq0002ph01u2v3w4x5",
"name": "Sara Al-Harbi",
"email": "[email protected]",
"phone": "+966501234567",
"countryIso": "SA",
"avatarUrl": null,
"channels": [
"whatsapp",
"web"
],
"conversationCount": 3,
"openCount": 1,
"firstContactAt": "2026-04-18T09:12:00.000Z",
"customFields": {
"crmId": "LEAD-2041",
"plan": "pro"
}
},
"flows": [
{
"runId": "cmbxh4n3c0005ph01c0d1e2f3",
"flowId": "cmbxh5o4d0006ph01g4h5i6j7",
"flowName": "Order status lookup",
"conversationId": "cmbxgz9pq0003ph01m4n5o6p7",
"status": "completed",
"startedAt": "2026-06-11T08:30:00.000Z",
"completedAt": "2026-06-11T08:31:12.000Z"
}
],
"notes": [
{
"id": "cmbxh3m2b0004ph01y6z7a8b9",
"body": "VIP customer — fast-track any shipping issues.",
"createdAt": "2026-06-10T14:02:00.000Z",
"agent": {
"id": "cmbxgwq1e0000ph01i0j1k2l3",
"nickname": "sara"
}
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "INVALID_API_TOKEN",
"message": "Invalid or revoked API token"
}
}{
"error": {
"code": "CONTACT_NOT_FOUND",
"message": "Contact not found"
}
}Authorizations
Workspace API token created in Settings → API. Tokens start with adraa_.
Path Parameters
ID of the contact. List contacts with GET /api/v1/contacts to find it.
Example:
"cmbxgy7kq0002ph01u2v3w4x5"
Body
application/json
New display name.
Maximum string length:
120Example:
"Sara Al-Harbi"
Keys to merge into the contact's custom fields (max 50 per request). Values may be strings (max 500 chars), numbers, booleans, or null to remove the key.
Show child attributes
Show child attributes
Example:
{ "crmId": "LEAD-2041", "plan": "pro", "legacyField": null }
⌘I