---
title: "Update Custom Field"
method: PATCH
path: "/v1/custom-fields/{id}"
tags: ["Custom Fields", "v1"]
---

# Update Custom Field

`PATCH /v1/custom-fields/{id}`

Update an existing custom field's name and/or configuration.

At least one of `name` or `configuration` must be provided. If `name` is present, it must not be blank.
The `configuration` attribute is only meaningful for prompt-capable field types
(`ai_score`, `ai_text`, `ai_number`, `ai_boolean`, `contact_collection`);
it is silently ignored for simple types (`text`, `number`, `boolean`, `date`).

Credit Note: Updating custom fields does not consume credits.

:::info
Requires the `custom_fields:write` OAuth2 scope.
:::

## Path parameters

- `id` string, required

## Query parameters

- `account_id` string, required

## Request body

- object
  - `data` object, required
    - `type` string, required
    - `attributes` object, required — At least one of `name` or `configuration` must be provided.
      - `name` string — The new name of the custom field. Must not be blank if provided.
      - `configuration` union — Configuration for AI and contact_collection field types. Must be a JSON object. Silently ignored for simple field types (`text`, `number`, `boolean`, `date`).
        - object — Configuration for AI field types. The `prompt` property is required.
          - `prompt` string, required — The AI prompt text.
          - `prompt_category` 'job_listings' | 'news' | 'funding' | 'growth' | 'technologies' | 'legal_compliance' | 'marketing' | 'leadership_changes' | 'research_and_development' | 'products' — Optional topical category for the AI prompt. Constrains the prompt to a known group used by xenon to organize prompts across the system.
          - `prompt_with_external_data` boolean — Whether the AI prompt should use external data.
        - object — Configuration for contact_collection field type. All properties are optional. contacts_to_enrich cannot exceed num_contacts_max_per_company.
          - `buyer_persona_id` string — Buyer persona identifier used to scope contact discovery (max 50 characters).
          - `num_contacts_max_per_company` integer — Maximum contacts per company
          - `find_more_contacts_details` boolean — Enable Company Contacts Reveal (CCR) enrichment
          - `contacts_to_enrich` integer — Number of contacts to enrich; required when find_more_contacts_details is true; cannot exceed num_contacts_max_per_company
          - `enrich_emails` boolean — Include email enrichment in CCR
          - `enrich_phones` boolean — Include phone enrichment in CCR

## Response `200`

Success

- object
  - `data` CustomFieldV1, required
    - `type` 'custom_field', required — The type of the object
    - `id` string, required — The internal name of the custom field. It is based on the initial human-readable name of the field and assigned by the system automatically. It cannot be changed later.
    - `attributes` object, required
      - `name` string, required — The human-readable name of the custom field
      - `scope` 'company' | 'contact', required — The entity type this custom field applies to
      - `type` 'text' | 'number' | 'boolean' | 'date' | 'contact_collection' | 'ai_score' | 'ai_text' | 'ai_number' | 'ai_boolean', required — The data type of the custom field
      - `read_only` boolean, required
      - `source` 'system' | 'user' | 'crm' | 'user/ai_refinement', required — The origin of the custom field
      - `created_at` string, date-time, required — Date and time when the custom field was created
      - `updated_at` string, date-time — Date and time when the custom field was last updated
      - `configuration` union
        - object — Type-specific configuration. Present for AI field types (`ai_score`, `ai_text`, `ai_number`, `ai_boolean`) and `contact_collection`. Absent for simple field types (`text`, `number`, `boolean`, `date`).
          - `prompt` string, required — The AI prompt text.
          - `prompt_category` 'job_listings' | 'news' | 'funding' | 'growth' | 'technologies' | 'legal_compliance' | 'marketing' | 'leadership_changes' | 'research_and_development' | 'products' — Optional topical category for the AI prompt. Constrains the prompt to a known group used by xenon to organize prompts across the system.
          - `prompt_with_external_data` boolean — Whether the AI prompt should use external data.
        - object — Type-specific configuration. Present for AI field types (`ai_score`, `ai_text`, `ai_number`, `ai_boolean`) and `contact_collection`. Absent for simple field types (`text`, `number`, `boolean`, `date`).
          - `buyer_persona_id` string — Buyer persona identifier used to scope contact discovery (max 50 characters).
          - `num_contacts_max_per_company` integer — Maximum contacts per company
          - `find_more_contacts_details` boolean — Enable Company Contacts Reveal (CCR) enrichment
          - `contacts_to_enrich` integer — Number of contacts to enrich; required when find_more_contacts_details is true; cannot exceed num_contacts_max_per_company
          - `enrich_emails` boolean — Include email enrichment in CCR
          - `enrich_phones` boolean — Include phone enrichment in CCR
    - `relationships` object, required
      - `created_by` object, required
        - `id` string, required — The Leadfeeder user ID.
        - `type` string, required
  - `meta` object, required
    - `request_id` string, required — A unique identifier assigned to each API request for end-to-end traceability.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
- `403` — Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
- `404` — Not found
- `429` — Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
- `500` — Internal server error
- `504` — Server timeout

---

[API](https://skmtc.net/leadfeeder/apis/leadfeeder-public-api.md) · [All operations](https://skmtc.net/leadfeeder/apis/leadfeeder-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/leadfeeder/leadfeeder-public-api/versions/e494ac05e206/schema)
