Update Account
curl --request PATCH \
--url https://api.example.com/accounts/{account_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"domain": "<string>",
"website": "<string>",
"size_range": "<string>",
"annual_revenue": 123,
"linkedin_url": "<string>",
"address": {},
"tags": [
"<string>"
],
"custom_fields": {},
"lifecycle_stage": "<string>",
"notes": "<string>"
}
'import requests
url = "https://api.example.com/accounts/{account_id}"
payload = {
"name": "<string>",
"domain": "<string>",
"website": "<string>",
"size_range": "<string>",
"annual_revenue": 123,
"linkedin_url": "<string>",
"address": {},
"tags": ["<string>"],
"custom_fields": {},
"lifecycle_stage": "<string>",
"notes": "<string>"
}
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: '<string>',
domain: '<string>',
website: '<string>',
size_range: '<string>',
annual_revenue: 123,
linkedin_url: '<string>',
address: {},
tags: ['<string>'],
custom_fields: {},
lifecycle_stage: '<string>',
notes: '<string>'
})
};
fetch('https://api.example.com/accounts/{account_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.example.com/accounts/{account_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([
'name' => '<string>',
'domain' => '<string>',
'website' => '<string>',
'size_range' => '<string>',
'annual_revenue' => 123,
'linkedin_url' => '<string>',
'address' => [
],
'tags' => [
'<string>'
],
'custom_fields' => [
],
'lifecycle_stage' => '<string>',
'notes' => '<string>'
]),
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.example.com/accounts/{account_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"website\": \"<string>\",\n \"size_range\": \"<string>\",\n \"annual_revenue\": 123,\n \"linkedin_url\": \"<string>\",\n \"address\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"custom_fields\": {},\n \"lifecycle_stage\": \"<string>\",\n \"notes\": \"<string>\"\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.example.com/accounts/{account_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"website\": \"<string>\",\n \"size_range\": \"<string>\",\n \"annual_revenue\": 123,\n \"linkedin_url\": \"<string>\",\n \"address\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"custom_fields\": {},\n \"lifecycle_stage\": \"<string>\",\n \"notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/accounts/{account_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 \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"website\": \"<string>\",\n \"size_range\": \"<string>\",\n \"annual_revenue\": 123,\n \"linkedin_url\": \"<string>\",\n \"address\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"custom_fields\": {},\n \"lifecycle_stage\": \"<string>\",\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Accounts
Update an Account
PATCH
/
accounts
/
{account_id}
Update Account
curl --request PATCH \
--url https://api.example.com/accounts/{account_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"domain": "<string>",
"website": "<string>",
"size_range": "<string>",
"annual_revenue": 123,
"linkedin_url": "<string>",
"address": {},
"tags": [
"<string>"
],
"custom_fields": {},
"lifecycle_stage": "<string>",
"notes": "<string>"
}
'import requests
url = "https://api.example.com/accounts/{account_id}"
payload = {
"name": "<string>",
"domain": "<string>",
"website": "<string>",
"size_range": "<string>",
"annual_revenue": 123,
"linkedin_url": "<string>",
"address": {},
"tags": ["<string>"],
"custom_fields": {},
"lifecycle_stage": "<string>",
"notes": "<string>"
}
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: '<string>',
domain: '<string>',
website: '<string>',
size_range: '<string>',
annual_revenue: 123,
linkedin_url: '<string>',
address: {},
tags: ['<string>'],
custom_fields: {},
lifecycle_stage: '<string>',
notes: '<string>'
})
};
fetch('https://api.example.com/accounts/{account_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.example.com/accounts/{account_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([
'name' => '<string>',
'domain' => '<string>',
'website' => '<string>',
'size_range' => '<string>',
'annual_revenue' => 123,
'linkedin_url' => '<string>',
'address' => [
],
'tags' => [
'<string>'
],
'custom_fields' => [
],
'lifecycle_stage' => '<string>',
'notes' => '<string>'
]),
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.example.com/accounts/{account_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"website\": \"<string>\",\n \"size_range\": \"<string>\",\n \"annual_revenue\": 123,\n \"linkedin_url\": \"<string>\",\n \"address\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"custom_fields\": {},\n \"lifecycle_stage\": \"<string>\",\n \"notes\": \"<string>\"\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.example.com/accounts/{account_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"website\": \"<string>\",\n \"size_range\": \"<string>\",\n \"annual_revenue\": 123,\n \"linkedin_url\": \"<string>\",\n \"address\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"custom_fields\": {},\n \"lifecycle_stage\": \"<string>\",\n \"notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/accounts/{account_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 \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"website\": \"<string>\",\n \"size_range\": \"<string>\",\n \"annual_revenue\": 123,\n \"linkedin_url\": \"<string>\",\n \"address\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"custom_fields\": {},\n \"lifecycle_stage\": \"<string>\",\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Every field is optional — send only what you want to change.
tags, address, and custom_fields are wholesale replacements of the column, not merges.
PATCH only ever sets fields you explicitly include with a non-null value. The patch body is built by dropping every null/omitted field before sending it to the database — so {"domain": null} does not clear the domain, it’s indistinguishable from not sending domain at all. There’s currently no way to null out a previously-set field through this endpoint.industry is a closed enum, not free text — it accepts exactly one of the AccountIndustry values, and anything else fails validation with 422. An empty string ("") is treated as unset (i.e. a no-op, per the note above), not a validation error.
lifecycle_stage is checked in application code, not just the DB. Valid values are prospect, customer, churned, inactive — anything else is rejected with 400 before the write happens (the same values are also enforced by a CHECK constraint on the table).
Auth
Requires a CRM manage scope and an active organization on the token. Any*:manage scope qualifies — in practice contacts:manage, deals:manage, companies:manage, or activities:manage.
Response
The full updated account row — every column onaccounts (id, org_id, name, domain, industry, size_range, annual_revenue, health_score, website, linkedin_url, address, tags, custom_fields, created_by, created_at, updated_at, owner_id, lifecycle_stage, notes).
Errors
| Status | Cause |
|---|---|
400 Bad Request | No fields in the body (after dropping nulls), an empty/whitespace-only name, an invalid lifecycle_stage, or no active organization on the token. |
404 Not Found | No account with this id in the caller’s organization. |
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The account's id.
Body
application/json
New name; empty/whitespace-only is rejected.
New primary domain.
One AccountIndustry enum value; blank/omitted means unset.
Available options:
Food & Beverage, Technology, Healthcare, Financial Services, Retail, Manufacturing, Professional Services, Real Estate, Education, Media & Entertainment, Transportation & Logistics, Energy, Agriculture, Construction, Hospitality & Travel, Other New company website URL.
Freeform employee-count bucket, e.g. '11-50'.
Annual revenue.
Company LinkedIn profile URL.
Freeform postal address JSON, stored as-is.
Full replacement list of tag name strings.
Full replacement JSON object of custom field values.
One of prospect, customer, churned, inactive.
Free-text notes.
Response
Successful Response