> ## Documentation Index
> Fetch the complete documentation index at: https://docs.klatt.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a contact field

> Changes a custom field. Send only the properties you want to change. A field's key and kind cannot be changed. Removing an option of an `enum` field erases that value from the list's contacts, so it requires `confirm_removed_options`.



## OpenAPI

````yaml /api-reference/openapi.json patch /api/v1/contact-lists/{list_uuid}/fields/{field_uuid}
openapi: 3.1.0
info:
  description: >-
    Manage your Klatt voice and chat agents, conversations, contacts and
    knowledge with an organization API key. Start with the
    [introduction](https://docs.klatt.ai/api-reference/introduction).
  title: Klatt API
  version: 1.0.0
servers:
  - url: https://api.klatt.ai
security:
  - bearerAuth: []
tags:
  - description: >-
      Agents that answer and place phone calls, and where they can transfer a
      call.
    name: Voice agents
  - description: Agents that answer WhatsApp chats.
    name: Chat agents
  - description: Calls and chats your agents have handled, with their analysis and state.
    name: Conversations
  - description: Lists of contacts and the custom fields each list defines.
    name: Contact lists
  - description: The people in a contact list.
    name: Contacts
  - description: Documents your agents read from, and their extracted text.
    name: Knowledge documents
  - description: >-
      Short question-and-answer and company-information entries your agents can
      use.
    name: Knowledge entries
paths:
  /api/v1/contact-lists/{list_uuid}/fields/{field_uuid}:
    patch:
      tags:
        - Contact lists
      summary: Update a contact field
      description: >-
        Changes a custom field. Send only the properties you want to change. A
        field's key and kind cannot be changed. Removing an option of an `enum`
        field erases that value from the list's contacts, so it requires
        `confirm_removed_options`.
      operationId: updateContactField
      parameters:
        - description: Unique identifier (UUID) of the contact list.
          in: path
          name: list_uuid
          required: true
          schema:
            format: uuid
            type: string
        - description: Unique identifier (UUID) of the contact field.
          in: path
          name: field_uuid
          required: true
          schema:
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContactFieldUpdate'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactFieldResponse'
          description: Successful Response
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: The contact list or the field does not exist in your organization.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: The request failed validation.
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  schemas:
    ContactFieldUpdate:
      additionalProperties: false
      description: Changes to a custom field. Send only the properties you want to change.
      properties:
        confirm_removed_options:
          default: false
          description: >-
            Set to `true` to confirm that values dropped from `options` are
            erased from the contacts that hold them. Otherwise removing an
            option is refused.
          type: boolean
        description:
          anyOf:
            - maxLength: 500
              type: string
            - type: 'null'
          description: >-
            Explains what the field holds, up to 500 characters. It guides the
            automatic extraction of the value from conversations.
        is_extractable:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the analysis of a conversation may fill this field
            automatically.
        key:
          anyOf:
            - maxLength: 40
              minLength: 1
              pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
              type: string
            - type: 'null'
          description: >-
            Identifier of the field. It cannot be changed: omit it or send the
            current key.
        kind:
          anyOf:
            - enum:
                - text
                - number
                - boolean
                - enum
              type: string
            - type: 'null'
          description: >-
            Type of the field. It cannot be changed: omit it or send the current
            kind.
        label:
          anyOf:
            - maxLength: 80
              minLength: 1
              type: string
            - type: 'null'
          description: Name shown for the field, up to 80 characters.
        options:
          anyOf:
            - items:
                maxLength: 80
                minLength: 1
                type: string
              type: array
            - type: 'null'
          description: >-
            Allowed values of an `enum` field, replacing the current ones: 1 to
            50 distinct values of up to 80 characters. Removing a value requires
            `confirm_removed_options`.
        position:
          anyOf:
            - maximum: 1000
              minimum: 0
              type: integer
            - type: 'null'
          description: Display order of the field, from 0 to 1000.
        update_condition:
          anyOf:
            - maxLength: 500
              type: string
            - type: 'null'
          description: >-
            When an extracted value may be applied, in plain words, up to 500
            characters.
        update_mode:
          anyOf:
            - enum:
                - overwrite
                - set_once
              type: string
            - type: 'null'
          description: >-
            How an extracted value treats an existing one: `overwrite` replaces
            it, `set_once` only fills the field while it is empty.
      type: object
    ContactFieldResponse:
      properties:
        description:
          anyOf:
            - type: string
            - type: 'null'
          description: Explains what the field holds. `null` when not set.
        field_uuid:
          description: Unique identifier (UUID) of the field.
          format: uuid
          type: string
        is_extractable:
          description: >-
            Whether the analysis of a conversation may fill this field
            automatically.
          type: boolean
        key:
          description: >-
            Identifier of the field and key of its value in a contact's
            `additional_fields`.
          type: string
        kind:
          description: >-
            Type of value the field holds: `text`, `number`, `boolean` or
            `enum`.
          enum:
            - text
            - number
            - boolean
            - enum
          type: string
        label:
          description: Name shown for the field.
          type: string
        options:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: Allowed values of an `enum` field. `null` for other kinds.
        position:
          description: Display order of the field.
          type: integer
        update_condition:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            When an extracted value may be applied, in plain words. `null` when
            not set.
        update_mode:
          description: >-
            How an extracted value treats an existing one: `overwrite` or
            `set_once`.
          enum:
            - overwrite
            - set_once
          type: string
      required:
        - field_uuid
        - key
        - label
        - kind
        - options
        - description
        - is_extractable
        - update_mode
        - update_condition
        - position
      type: object
    Error:
      description: Body of an error response.
      properties:
        detail:
          description: >-
            A stable error code such as `agent_not_found`. A few authentication
            errors carry a short text instead, such as `Invalid or expired API
            key`.
          type: string
        message:
          description: >-
            A human-readable explanation. Present only on errors raised before
            the request reaches the API, such as `api_key_wrong_host`.
          type: string
      required:
        - detail
      type: object
    HTTPValidationError:
      description: 'Body of a `422` response: the request failed validation.'
      properties:
        detail:
          anyOf:
            - items:
                $ref: '#/components/schemas/ValidationError'
              type: array
            - type: string
            - type: object
          description: >-
            A list of field errors when the body or a parameter is invalid, a
            string with an error code for some other refusals, or an object with
            a `code` when a knowledge limit is exceeded.
      type: object
    ValidationError:
      description: One invalid field of a request.
      properties:
        ctx:
          description: Extra details about the error, such as the limit that was exceeded.
          type: object
        input:
          description: The value that failed validation, when it is returned.
        loc:
          description: 'Where the error is: `body`, `query` or `path`, then the field names.'
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          description: What is wrong with the value.
          type: string
        type:
          description: A short code for the kind of error.
          type: string
      required:
        - loc
        - msg
        - type
      type: object
  responses:
    Unauthorized:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: >-
        The API key is missing, malformed, unknown, deleted or sent to the wrong
        host. `detail` is a code such as `api_key_required`,
        `console_token_not_accepted` or `api_key_wrong_host`, or a short text
        such as `Invalid or expired API key`. Keys do not expire.
      headers:
        WWW-Authenticate:
          description: Always `Bearer`.
          schema:
            type: string
    Forbidden:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: >-
        The key is valid but may not do this. `detail` is `permission_required`,
        `organization_deleted` or `Organization API keys cannot access this
        operation`.
    RateLimited:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: The key exceeded its request limit. `detail` is `rate_limited`.
      headers:
        Retry-After:
          description: Seconds to wait before sending the next request.
          schema:
            type: integer
    ServiceUnavailable:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: >-
        A dependency the request needs is temporarily unavailable. `detail`
        names it, for example `rate_limit_unavailable` or
        `contacts_unavailable`. Retry with backoff.
  securitySchemes:
    bearerAuth:
      description: >-
        An organization API key created in the Klatt console, sent as
        `Authorization: Bearer <key>`. The key belongs to one organization.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.