Allo

Mettre à jour un attribut d'entreprise

Cet endpoint effectue une mise à jour partielle. Seuls les champs envoyés sont modifiés. key et type ne peuvent pas être modifiés.

PATCH/v2/api/crm/companies/attributes/{key}

Cet endpoint effectue une mise à jour partielle. Seuls les champs envoyés sont modifiés. key et type ne peuvent pas être modifiés.

Champs du body

ChampTypeDescription
labelstringNouveau nom affiché
optionsarrayRemplace toute la liste d'options avec des objets { label, key? }. Attributs DROPDOWN uniquement
promptstringConsigne pour l'AI CRM Manager. Une valeur vide l'efface
should_prompt_overridebooleanIndique si l'IA peut écraser une valeur déjà renseignée
is_visiblebooleanAffiche ou masque l'attribut dans les apps Allo

Renommer des options

Les clés d'options restent stables. Pour renommer une option, envoyez sa key actuelle avec le nouveau label. Une option envoyée sans key correspondante est considérée comme nouvelle et reçoit une clé dérivée de son label. Les options absentes de la liste sont supprimées.

Attributs synchronisés depuis un CRM

Un attribut dont la source n'est pas allo est géré par votre intégration CRM. Seuls prompt, should_prompt_override et is_visible peuvent être modifiés. Envoyer label ou options renvoie 409 ATTRIBUTE_MANAGED_BY_INTEGRATION.

Réponse

Renvoie 200 avec l'attribut mis à jour, dans le même format que Lister les attributs d'entreprise.

Erreurs

StatutCodeQuand
400ATTRIBUTE_LABEL_INVALIDlabel est vide, dépasse 255 caractères ou ne contient ni lettre ni chiffre
400ATTRIBUTE_OPTION_INVALIDoptions est vide, ou un label d'option est vide, dépasse 255 caractères ou est en doublon
400ATTRIBUTE_OPTIONS_NOT_SUPPORTEDoptions envoyé pour un attribut qui n'est pas DROPDOWN
403API_KEY_INSUFFICIENT_SCOPELa clé n'a pas le scope CRM_WRITE
404TEAM_NOT_FOUNDLe workspace n'utilise pas le nouveau modèle de contacts
404ATTRIBUTE_NOT_FOUNDAucun attribut avec cette clé
409ATTRIBUTE_MANAGED_BY_INTEGRATIONlabel ou options envoyés pour un attribut géré par une intégration CRM
409ATTRIBUTE_CONCURRENT_MODIFICATIONLes attributs ont été modifiés en même temps. Relancez la requête

Autorisation

Authorizationstring · headerrequis

Api-Key ak_live_…

Paramètres de chemin

keystringrequis

Attribute key, as returned by the list endpoint

Corps

labelstring

New display name

optionsobject[]

Replaces the full option list. DROPDOWN attributes only. Send an option's current key to keep it when renaming its label.

2 champs
labelstringrequis

Display name of the option

keystring

Existing option key. Send it when editing an attribute to keep the option's key stable while its label changes. Keys that do not match an existing option are ignored and a key is derived from the label.

promptstring | null

Instruction the AI CRM Manager follows to fill this attribute from calls. A blank value clears it.

should_prompt_overrideboolean

Whether the AI may overwrite a value that is already set

is_visibleboolean

Show or hide the attribute in the Allo apps

Réponses

200The updated attribute
dataobject

A custom attribute on companies

10 champs
keystring

Unique key within your team

labelstring | null

Display name

typeenum<string>

TEXTNUMBERDATEBOOLEANDROPDOWN

optionsobject[]

Allowed values. Only set for DROPDOWN attributes.

2 champs
keystring
labelstring
is_visibleboolean

Whether the attribute is shown in the Allo apps

promptstring | null

Instruction the AI CRM Manager follows to fill this attribute from calls. A blank value clears it.

should_prompt_overrideboolean | null

Whether the AI may overwrite a value that is already set

sourcestring

allo for attributes created in Allo or with the API, otherwise the lowercase name of the integration that manages it, such as hubspot

created_atstring<date-time>
updated_atstring<date-time>
400
401
403
404
409
429