Skip to main content

Create CRM custom field

Create an organization CRM field definition for leads, companies, or deals.

POST/api/crm/custom-fields
HTTP referenceScope leads:write OR companies:write OR deals:writeUpdated September 27, 2026

This page documents the canonical HTTP contract for this endpoint.

The developer-key route scope expression is leads:write|companies:write|deals:write. The handler also requires the write scope matching the field entity: leads:write for lead, companies:write for company, or deals:write for deal. The caller must also have user-admin or internal-admin permission. For a developer key, this permission is loaded from its creator; the scope alone is insufficient. Each options item has required value and label, with optional validated color. ai_autofill supports enabled, mode (basic/agent), prompt (maximum 8,000 chars), run_when_created, only_if_empty, allow_new_options, and depends_on. sync_to_leads_write_policy is manual, autofill_only, manual_or_autofill, or disabled. This handler returns the serialized definition JSON object. See the CRM field catalog for organization-defined fields and option values.

Body parameters

  • entity_typerequired

    string

    lead, company, or deal.

  • labelrequired

    string

    Non-empty, at most 80 characters.

  • data_typerequired

    string

    text, number, date, boolean, select, or multi_select.

  • key · optional

    string

    Optional normalized field key.

  • description · optional

    string

    At most 2,000 characters.

  • options · optional

    array

    CustomFieldOption items; defaults to an empty list.

  • is_filterable · optional

    boolean

  • is_sortable · optional

    boolean

  • is_searchable · optional

    boolean

  • include_in_task_context · optional

    boolean

    Defaults false.

  • include_in_sequence_variables · optional

    boolean

  • include_in_ai_context · optional

    boolean

    Defaults false.

  • ai_autofill · optional

    object

  • sync_to_leads_write_policy · optional

    string

    manual, autofill_only, manual_or_autofill, or disabled.

Errors

StatusMeaning
401Missing or invalid authentication.
403The key lacks the write scope matching the field entity, or the authenticated user lacks user-admin permission.
422Invalid field definition or enum value.

Docs