---
title: "Create custom company attribute"
method: POST
path: "/v2/api/crm/companies/attributes"
tags: ["CRM"]
---

# Create custom company attribute

`POST /v2/api/crm/companies/attributes`

## Request

- Base URL: `https://api.withallo.com`
- URL: `https://api.withallo.com/v2/api/crm/companies/attributes`
- Auth: API key in header `Authorization`

Creates a custom attribute on your team's companies. The key is derived from the label. The call is idempotent: if an attribute with the same key and type already exists, it returns `201` with that attribute and `already_existed` set to `true`. `options` is required for `DROPDOWN` attributes and rejected for other types.

## Request body

- CreateCompanyAttributeRequest
  - `label` string, required: Display name of the attribute. The attribute key is derived from it: lowercase, accents removed, runs of non-alphanumeric characters replaced by `_`, truncated to 64 characters. Labels that resolve to a reserved key are rejected.
  - `type` 'TEXT' | 'NUMBER' | 'DATE' | 'BOOLEAN' | 'DROPDOWN', required
  - `options` CompanyAttributeOptionInput[]: Allowed values. Required, with at least one option, for `DROPDOWN`; rejected for other types.
    - `label` string, required: Display name of the option
    - `key` string: 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.
  - `prompt` string, nullable: Instruction the AI CRM Manager follows to fill this attribute from calls. A blank value clears it.
  - `should_prompt_override` boolean: Whether the AI may overwrite a value that is already set

## Response `201`

The attribute that was created, or the existing one when `already_existed` is `true`

- object
  - `data` object: A custom attribute on companies
    - `key` string: Unique key within your team
    - `label` string, nullable: Display name
    - `type` 'TEXT' | 'NUMBER' | 'DATE' | 'BOOLEAN' | 'DROPDOWN', nullable
    - `options` CompanyAttributeOption[], nullable: Allowed values. Only set for `DROPDOWN` attributes.
      - `key` string
      - `label` string
    - `is_visible` boolean: Whether the attribute is shown in the Allo apps
    - `prompt` string, nullable: Instruction the AI CRM Manager follows to fill this attribute from calls. A blank value clears it.
    - `should_prompt_override` boolean, nullable: Whether the AI may overwrite a value that is already set
    - `source` string: `allo` for attributes created in Allo or with the API, otherwise the lowercase name of the integration that manages it, such as `hubspot`
    - `created_at` string, date-time
    - `updated_at` string, date-time
    - `already_existed` boolean: `true` when an attribute with the same key and type already existed and nothing was created

## Other responses

- `400`: Invalid request parameters
- `401`: Invalid or missing API key
- `403`: API key lacks the required scope or access to the resource
- `404`: Resource not found
- `409`: Conflict with existing resource
- `429`: Rate limit exceeded

## Changes

- **2026-11-03** `46c77103dd14`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/withallo/apis/allo-api/changes/v2/api/crm/companies/attributes/post.md)

---

[API](https://skmtc.dev/withallo/apis/allo-api.md) - [All operations](https://skmtc.dev/withallo/apis/allo-api/llms.txt) - [OpenAPI document](https://skmtc.dev/withallo/apis/allo-api/revisions/46c77103dd14?raw)
