Allo

Creer une entreprise

Champ Type Requis Description ------- ------ -------- ------------- name string oui Nom de l'entreprise website string non URL du site web industry string…

POST/v2/api/crm/companies

Champs du body

ChampTypeRequisDescription
namestringouiNom de l'entreprise
websitestringnonURL du site web
industrystringnonSecteur d'activite
custom_attributesobjectnonValeurs de vos attributs d'entreprise, indexées par clé d'attribut

Attributs personnalisés

custom_attributes définit les valeurs de vos attributs d'entreprise. Créez d'abord l'attribut, puis utilisez sa key ici.

Type d'attributValeur acceptée
TEXTUne chaîne
NUMBERUn nombre JSON fini. Les chaînes sont rejetées. Relu comme un décimal : 180 est renvoyé sous la forme 180.0
BOOLEANUn booléen JSON
DATEYYYY-MM-DD ou une date-heure ISO. Stockée comme date et renvoyée au format YYYY-MM-DD
DROPDOWNUne clé ou un label d'option, sans distinction de casse. Toujours renvoyée sous forme de clé d'option
  • Envoyez null pour une clé afin d'effacer sa valeur.
  • Les clés absentes de la requête ne changent pas. {}, ou l'absence de custom_attributes, ne change rien.
  • Une clé inconnue ou archivée renvoie 400 CUSTOM_ATTRIBUTE_KEY_UNKNOWN. Une valeur du mauvais type renvoie 400 CUSTOM_ATTRIBUTE_VALUE_INVALID. Dans les deux cas, param vaut custom_attributes.<key>.
  • La requête entière est validée avant toute écriture : une requête rejetée ne crée rien.
  • La réponse inclut toujours custom_attributes, {} si l'entreprise n'en a pas. Les attributs archivés et les valeurs vides sont omis.
  • Les valeurs sont aussi synchronisées vers vos HubSpot et Attio connectés. Une valeur d'un attribut synchronisé depuis un CRM peut être écrasée par la prochaine synchronisation du CRM.
  • Les équipes sur l'ancien modèle de contacts reçoivent 404 TEAM_NOT_FOUND.

Exemple

Le label Advanced de la liste déroulante est stocké et renvoyé sous sa clé advanced. Les autres champs de l'entreprise sont omis de la réponse ci-dessous.

{
  "name": "Acme Corp",
  "custom_attributes": {
    "ping_pong_level": "Advanced",
    "renewal_date": "2026-12-01"
  }
}
{
  "data": {
    "id": "com-xyz789",
    "name": "Acme Corp",
    "custom_attributes": {
      "ping_pong_level": "advanced",
      "renewal_date": "2026-12-01"
    }
  }
}

Autorisation

Authorizationstring · headerrequis

Api-Key ak_live_…

Corps

namestringrequis

Company name

websitestring | null

Company website URL

industrystring | null

Industry sector

numbersstring[]

Phone numbers of the company. Each number is normalized to E.164 and duplicates are merged. An invalid number rejects the request with 400 INVALID_REQUEST_BODY, and the offending value is named in errors.

custom_attributesobject | null

Values for the company's custom attributes, keyed by attribute key. TEXT takes a string, NUMBER a finite JSON number (numeric strings are rejected), BOOLEAN a JSON boolean, DATE a YYYY-MM-DD string or ISO datetime, and DROPDOWN an option key or label (case-insensitive). Send null to clear a value; keys you omit are left untouched, and {} or omitting the field changes nothing. An unknown or archived key, or a value of the wrong type, rejects the whole request with CUSTOM_ATTRIBUTE_KEY_UNKNOWN or CUSTOM_ATTRIBUTE_VALUE_INVALID.

Réponses

201Company created
dataobject

A company in the CRM

11 champs
idstring

Unique company identifier

namestring

Company name

websitestring | null

Company website URL

industrystring | null

Industry sector

numbersstring[]

Phone numbers of the company, in E.164 format

person_countinteger

Number of people linked to this company

interactionsinteger

Total number of interactions across all people in this company

last_activity_atstring<date-time> | null

Timestamp of the last activity

created_atstring<date-time>

When the company was created

updated_atstring<date-time>

When the company was last updated

custom_attributesobject

Values of the company's custom attributes, keyed by attribute key. Always present, {} when there are none. Archived attributes and empty values are omitted. NUMBER values are decimals (180 is returned as 180.0), DATE values are YYYY-MM-DD and DROPDOWN values are the option key. Create the attributes first with POST /v2/api/crm/companies/attributes.

400
401
422
429