curl --request PATCH \
--url https://api.chatsailer.com/v1/contacts/{contact_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"address": "<string>",
"city": "<string>",
"company_name": "<string>",
"custom_fields": {},
"email": "<string>",
"external_id": "crm-48213",
"first_name": "<string>",
"job_title": "<string>",
"last_name": "<string>",
"organization": {
"id": "org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"name": "<string>"
},
"organization_id": "org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"owner_id": "usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"state": "<string>",
"tag_ids": [
"tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
]
}
'import requests
url = "https://api.chatsailer.com/v1/contacts/{contact_id}"
payload = {
"address": "<string>",
"city": "<string>",
"company_name": "<string>",
"custom_fields": {},
"email": "<string>",
"external_id": "crm-48213",
"first_name": "<string>",
"job_title": "<string>",
"last_name": "<string>",
"organization": {
"id": "org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"name": "<string>"
},
"organization_id": "org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"owner_id": "usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"state": "<string>",
"tag_ids": ["tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"]
}
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({
address: '<string>',
city: '<string>',
company_name: '<string>',
custom_fields: {},
email: '<string>',
external_id: 'crm-48213',
first_name: '<string>',
job_title: '<string>',
last_name: '<string>',
organization: {id: 'org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4', name: '<string>'},
organization_id: 'org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
owner_id: 'usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
state: '<string>',
tag_ids: ['tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4']
})
};
fetch('https://api.chatsailer.com/v1/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://api.chatsailer.com/v1/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([
'address' => '<string>',
'city' => '<string>',
'company_name' => '<string>',
'custom_fields' => [
],
'email' => '<string>',
'external_id' => 'crm-48213',
'first_name' => '<string>',
'job_title' => '<string>',
'last_name' => '<string>',
'organization' => [
'id' => 'org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
'name' => '<string>'
],
'organization_id' => 'org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
'owner_id' => 'usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
'state' => '<string>',
'tag_ids' => [
'tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4'
]
]),
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.chatsailer.com/v1/contacts/{contact_id}"
payload := strings.NewReader("{\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"company_name\": \"<string>\",\n \"custom_fields\": {},\n \"email\": \"<string>\",\n \"external_id\": \"crm-48213\",\n \"first_name\": \"<string>\",\n \"job_title\": \"<string>\",\n \"last_name\": \"<string>\",\n \"organization\": {\n \"id\": \"org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"name\": \"<string>\"\n },\n \"organization_id\": \"org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"owner_id\": \"usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"state\": \"<string>\",\n \"tag_ids\": [\n \"tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\"\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.chatsailer.com/v1/contacts/{contact_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"company_name\": \"<string>\",\n \"custom_fields\": {},\n \"email\": \"<string>\",\n \"external_id\": \"crm-48213\",\n \"first_name\": \"<string>\",\n \"job_title\": \"<string>\",\n \"last_name\": \"<string>\",\n \"organization\": {\n \"id\": \"org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"name\": \"<string>\"\n },\n \"organization_id\": \"org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"owner_id\": \"usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"state\": \"<string>\",\n \"tag_ids\": [\n \"tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chatsailer.com/v1/contacts/{contact_id}")
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 \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"company_name\": \"<string>\",\n \"custom_fields\": {},\n \"email\": \"<string>\",\n \"external_id\": \"crm-48213\",\n \"first_name\": \"<string>\",\n \"job_title\": \"<string>\",\n \"last_name\": \"<string>\",\n \"organization\": {\n \"id\": \"org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"name\": \"<string>\"\n },\n \"organization_id\": \"org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"owner_id\": \"usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"state\": \"<string>\",\n \"tag_ids\": [\n \"tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"id": "con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"status": "open",
"updated_at": "2023-11-07T05:31:56Z",
"visibility": "private",
"address": "<string>",
"avatar_url": "<string>",
"channels": [
{
"identifier": "<string>",
"platform": "<string>",
"status": "<string>",
"username": "<string>"
}
],
"city": "<string>",
"company_name": "<string>",
"custom_fields": {},
"email": "<string>",
"external_id": "<string>",
"first_name": "<string>",
"job_title": "<string>",
"last_name": "<string>",
"lost_reason": "<string>",
"name": "<string>",
"object": "contact",
"organization": {
"created_at": "2023-11-07T05:31:56Z",
"id": "org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"name": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"visibility": "private",
"custom_fields": {},
"external_id": "<string>",
"object": "organization",
"owner": {
"id": "<string>",
"kind": "user",
"name": "<string>",
"object": "owner"
},
"owner_id": "usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"tags": [
{
"id": "tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"name": "<string>",
"color": "<string>",
"object": "tag"
}
],
"website": "<string>"
},
"organization_id": "org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"organization_resolution": {
"outcome": "linked",
"candidates": [
{
"id": "org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"name": "<string>"
}
],
"organization": {
"id": "org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"name": "<string>"
},
"reason": "<string>"
},
"owner": {
"id": "<string>",
"kind": "user",
"name": "<string>",
"object": "owner"
},
"owner_id": "usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"phone": "<string>",
"score": "cold",
"state": "<string>",
"tags": [
{
"id": "tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"name": "<string>",
"color": "<string>",
"object": "tag"
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}Update a contact
Only the fields you send are changed. Send null to clear a field; omit it to leave it alone. custom_fields merges the same way.
To change the company, send organization. An id moves the contact to that organization; a name only links a contact that has no organization yet. organization_resolution in the response says what happened.
curl --request PATCH \
--url https://api.chatsailer.com/v1/contacts/{contact_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"address": "<string>",
"city": "<string>",
"company_name": "<string>",
"custom_fields": {},
"email": "<string>",
"external_id": "crm-48213",
"first_name": "<string>",
"job_title": "<string>",
"last_name": "<string>",
"organization": {
"id": "org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"name": "<string>"
},
"organization_id": "org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"owner_id": "usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"state": "<string>",
"tag_ids": [
"tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
]
}
'import requests
url = "https://api.chatsailer.com/v1/contacts/{contact_id}"
payload = {
"address": "<string>",
"city": "<string>",
"company_name": "<string>",
"custom_fields": {},
"email": "<string>",
"external_id": "crm-48213",
"first_name": "<string>",
"job_title": "<string>",
"last_name": "<string>",
"organization": {
"id": "org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"name": "<string>"
},
"organization_id": "org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"owner_id": "usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"state": "<string>",
"tag_ids": ["tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"]
}
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({
address: '<string>',
city: '<string>',
company_name: '<string>',
custom_fields: {},
email: '<string>',
external_id: 'crm-48213',
first_name: '<string>',
job_title: '<string>',
last_name: '<string>',
organization: {id: 'org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4', name: '<string>'},
organization_id: 'org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
owner_id: 'usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
state: '<string>',
tag_ids: ['tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4']
})
};
fetch('https://api.chatsailer.com/v1/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://api.chatsailer.com/v1/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([
'address' => '<string>',
'city' => '<string>',
'company_name' => '<string>',
'custom_fields' => [
],
'email' => '<string>',
'external_id' => 'crm-48213',
'first_name' => '<string>',
'job_title' => '<string>',
'last_name' => '<string>',
'organization' => [
'id' => 'org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
'name' => '<string>'
],
'organization_id' => 'org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
'owner_id' => 'usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
'state' => '<string>',
'tag_ids' => [
'tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4'
]
]),
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.chatsailer.com/v1/contacts/{contact_id}"
payload := strings.NewReader("{\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"company_name\": \"<string>\",\n \"custom_fields\": {},\n \"email\": \"<string>\",\n \"external_id\": \"crm-48213\",\n \"first_name\": \"<string>\",\n \"job_title\": \"<string>\",\n \"last_name\": \"<string>\",\n \"organization\": {\n \"id\": \"org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"name\": \"<string>\"\n },\n \"organization_id\": \"org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"owner_id\": \"usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"state\": \"<string>\",\n \"tag_ids\": [\n \"tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\"\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.chatsailer.com/v1/contacts/{contact_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"company_name\": \"<string>\",\n \"custom_fields\": {},\n \"email\": \"<string>\",\n \"external_id\": \"crm-48213\",\n \"first_name\": \"<string>\",\n \"job_title\": \"<string>\",\n \"last_name\": \"<string>\",\n \"organization\": {\n \"id\": \"org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"name\": \"<string>\"\n },\n \"organization_id\": \"org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"owner_id\": \"usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"state\": \"<string>\",\n \"tag_ids\": [\n \"tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chatsailer.com/v1/contacts/{contact_id}")
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 \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"company_name\": \"<string>\",\n \"custom_fields\": {},\n \"email\": \"<string>\",\n \"external_id\": \"crm-48213\",\n \"first_name\": \"<string>\",\n \"job_title\": \"<string>\",\n \"last_name\": \"<string>\",\n \"organization\": {\n \"id\": \"org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"name\": \"<string>\"\n },\n \"organization_id\": \"org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"owner_id\": \"usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"state\": \"<string>\",\n \"tag_ids\": [\n \"tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"id": "con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"status": "open",
"updated_at": "2023-11-07T05:31:56Z",
"visibility": "private",
"address": "<string>",
"avatar_url": "<string>",
"channels": [
{
"identifier": "<string>",
"platform": "<string>",
"status": "<string>",
"username": "<string>"
}
],
"city": "<string>",
"company_name": "<string>",
"custom_fields": {},
"email": "<string>",
"external_id": "<string>",
"first_name": "<string>",
"job_title": "<string>",
"last_name": "<string>",
"lost_reason": "<string>",
"name": "<string>",
"object": "contact",
"organization": {
"created_at": "2023-11-07T05:31:56Z",
"id": "org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"name": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"visibility": "private",
"custom_fields": {},
"external_id": "<string>",
"object": "organization",
"owner": {
"id": "<string>",
"kind": "user",
"name": "<string>",
"object": "owner"
},
"owner_id": "usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"tags": [
{
"id": "tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"name": "<string>",
"color": "<string>",
"object": "tag"
}
],
"website": "<string>"
},
"organization_id": "org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"organization_resolution": {
"outcome": "linked",
"candidates": [
{
"id": "org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"name": "<string>"
}
],
"organization": {
"id": "org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"name": "<string>"
},
"reason": "<string>"
},
"owner": {
"id": "<string>",
"kind": "user",
"name": "<string>",
"object": "owner"
},
"owner_id": "usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"phone": "<string>",
"score": "cold",
"state": "<string>",
"tags": [
{
"id": "tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"name": "<string>",
"color": "<string>",
"object": "tag"
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}Authorizations
A workspace API token (sk_live_...) or an OAuth access token (oat_live_...). Create workspace tokens in Settings > API. Send either as Authorization: Bearer <token>.
Headers
A unique value (a UUID works) that makes retrying this request safe. A repeat with the same key and body within 24 hours returns the original response instead of acting twice; the same key with a different body is a 409 idempotency_key_reused.
255Path Parameters
Unique identifier for a contact.
^con_[0-9a-f]{32}$"con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
Query Parameters
Comma-separated relationships to inline in the response, e.g. organization. Unexpanded relations are still identified by their *_id field.
"organization"
Body
Body for PATCH /v1/contacts/{contact_id}.
Only the fields you send change. Send null to clear one; omit it to leave
it alone. custom_fields merges the same way.
Legacy alias for organization. The text is kept on the contact, and a contact that has no organization yet is also linked to the organization this name matches, or to a new one when none does. To say which organization a contact belongs to, send organization, which also tells you how the name was resolved.
Your own id for this record, e.g. its id in your system. Unique per workspace and resource; send null to clear it.
1 - 255"crm-48213"
The organization this contact belongs to: {"id": ...} to link one you picked, or {"name": ...} to match or create it by name. Send exactly one. The response carries organization_resolution. Do not combine with organization_id. A name only links a contact that has no organization yet; send id to move it. null removes the organization.
Show child attributes
Show child attributes
Unique identifier for an organization.
^org_[0-9a-f]{32}$"org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
Unique identifier for an user.
^usr_[0-9a-f]{32}$"usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
How warm a contact is.
cold, warm, hot Where a contact stands commercially.
open, on_hold, won, lost The complete set of tags this contact should carry, from GET /v1/tags?resource=contact. Replaces the current set: send [] to remove every tag, omit the field to leave tags unchanged.
Unique identifier for a tag.
^tag_[0-9a-f]{32}$Who in the workspace can see a record: only its owner, the owner's team, the team and its sub-teams, or everyone.
private, team, team_and_subteams, company Response
Successful Response
A contact as returned by create, update and upsert.
The same object as on reads, plus organization_resolution when the request
carried organization.
Unique identifier for a contact.
^con_[0-9a-f]{32}$"con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
Where the contact stands.
open, on_hold, won, lost Who in the workspace can see this record. A workspace token sees every record regardless; an OAuth token sees what the person who authorized it can see.
private, team, team_and_subteams, company Short-lived signed URL; do not store it.
Show child attributes
Show child attributes
Legacy alias for organization. The text is kept on the contact, and a contact that has no organization yet is also linked to the organization this name matches, or to a new one when none does. To say which organization a contact belongs to, send organization, which also tells you how the name was resolved.
Every custom field defined on contacts in this workspace, keyed by field key and typed from its definition. Unset fields are null, so reading any contact shows the full set of keys in use.
Your own id for this record, when you set one.
Name of the reason, when status is lost.
Display name. Derived from first_name and last_name.
"contact"Populated only when organization is in expand.
Show child attributes
Show child attributes
Unique identifier for an organization.
^org_[0-9a-f]{32}$"org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
How organization was resolved. Present only when the request sent organization.
Show child attributes
Show child attributes
Whoever is responsible for this record. Always populated when the record has an owner — this is not an expand target.
Show child attributes
Show child attributes
Unique identifier for an user.
^usr_[0-9a-f]{32}$"usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
E.164. Normalized on write.
How warm a contact is.
cold, warm, hot Show child attributes
Show child attributes