Create Account
curl --request POST \
--url https://api.example.com/accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"domain": "<string>",
"website": "<string>",
"owner_id": "<string>",
"lifecycle_stage": "<string>",
"notes": "<string>"
}
'import requests
url = "https://api.example.com/accounts"
payload = {
"name": "<string>",
"domain": "<string>",
"website": "<string>",
"owner_id": "<string>",
"lifecycle_stage": "<string>",
"notes": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
domain: '<string>',
website: '<string>',
owner_id: '<string>',
lifecycle_stage: '<string>',
notes: '<string>'
})
};
fetch('https://api.example.com/accounts', 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",
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([
'name' => '<string>',
'domain' => '<string>',
'website' => '<string>',
'owner_id' => '<string>',
'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"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"website\": \"<string>\",\n \"owner_id\": \"<string>\",\n \"lifecycle_stage\": \"<string>\",\n \"notes\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.example.com/accounts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"website\": \"<string>\",\n \"owner_id\": \"<string>\",\n \"lifecycle_stage\": \"<string>\",\n \"notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"website\": \"<string>\",\n \"owner_id\": \"<string>\",\n \"lifecycle_stage\": \"<string>\",\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Accounts
Create an Account
POST
/
accounts
Create Account
curl --request POST \
--url https://api.example.com/accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"domain": "<string>",
"website": "<string>",
"owner_id": "<string>",
"lifecycle_stage": "<string>",
"notes": "<string>"
}
'import requests
url = "https://api.example.com/accounts"
payload = {
"name": "<string>",
"domain": "<string>",
"website": "<string>",
"owner_id": "<string>",
"lifecycle_stage": "<string>",
"notes": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
domain: '<string>',
website: '<string>',
owner_id: '<string>',
lifecycle_stage: '<string>',
notes: '<string>'
})
};
fetch('https://api.example.com/accounts', 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",
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([
'name' => '<string>',
'domain' => '<string>',
'website' => '<string>',
'owner_id' => '<string>',
'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"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"website\": \"<string>\",\n \"owner_id\": \"<string>\",\n \"lifecycle_stage\": \"<string>\",\n \"notes\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.example.com/accounts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"website\": \"<string>\",\n \"owner_id\": \"<string>\",\n \"lifecycle_stage\": \"<string>\",\n \"notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"website\": \"<string>\",\n \"owner_id\": \"<string>\",\n \"lifecycle_stage\": \"<string>\",\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Only a subset of account fields can be set at creation time (
domain, industry, website, owner_id, lifecycle_stage, notes) — fields like size_range, annual_revenue, linkedin_url, address, tags, and custom_fields can only be set afterward via Update an Account.
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 “not set” rather than a validation error, since the account form’s clear option submits "".
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
| Field | Type | Description |
|---|---|---|
id | string (uuid) | The new account’s id. |
schema_version | integer | Always 1 today — reserved for a future breaking change to this response shape. |
Errors
| Status | Cause |
|---|---|
400 Bad Request | lifecycle_stage isn’t one of the four allowed values, or no active organization on the token. |
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Account/company name; required, non-empty.
Minimum string length:
1Primary domain, e.g. acme.com.
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 Company website URL.
Owning user id; defaults to the caller if omitted.
One of prospect, customer, churned, inactive.
Free-text notes.
Response
Successful Response