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

# Update a custom field

> Renames a custom field and/or replaces the option set of a multiSelect
custom field. A custom field's key, type, and entityType cannot be changed;
supplying a type or entityType that differs from the field's current value
is rejected.



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/custom-fields/{id}
openapi: 3.0.0
info:
  contact: {}
  title: Assembly API
  version: 0.0.1
servers:
  - url: https://api.assembly.com
security: []
paths:
  /v1/custom-fields/{id}:
    patch:
      tags:
        - Custom Fields
      summary: Update a custom field
      description: >-
        Renames a custom field and/or replaces the option set of a multiSelect

        custom field. A custom field's key, type, and entityType cannot be
        changed;

        supplying a type or entityType that differs from the field's current
        value

        is rejected.
      operationId: update-custom-field
      parameters:
        - description: Custom field ID
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/customfields.patchCustomFieldRequest'
        description: Custom field updates
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/customfields.ClientCustomField'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dispatcher.Error'
          description: >-
            Invalid request body, attempted type/entityType change, or options
            provided for a non-multiSelect field
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dispatcher.Error'
          description: Missing or invalid API key
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dispatcher.Error'
          description: Custom field not found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dispatcher.Error'
          description: Unexpected server error
      security:
        - APIKeyHeader: []
components:
  schemas:
    customfields.patchCustomFieldRequest:
      properties:
        entityType:
          description: >-
            EntityType, if provided, must match the field's current entityType;
            it cannot be changed.
          enum:
            - client
            - company
          example: client
          type: string
        name:
          description: Name renames the custom field; omit to leave the name unchanged.
          example: Account tier
          type: string
        options:
          description: >-
            Options replaces the option set of a multiSelect custom field; omit
            to leave options

            unchanged. Any existing option not referenced by id is removed. Only
            valid for

            multiSelect custom fields.
          items:
            $ref: '#/components/schemas/customfields.patchCustomFieldOption'
          type: array
        type:
          description: >-
            Type, if provided, must match the field's current type; the field's
            type cannot be changed.
          enum:
            - text
            - number
            - email
            - url
            - phoneNumber
            - address
            - multiSelect
          example: multiSelect
          type: string
      type: object
    customfields.ClientCustomField:
      properties:
        entityType:
          description: EntityType is the entity the custom field belongs to.
          enum:
            - client
            - company
          example: client
          type: string
        id:
          description: ID is the unique identifier of the custom field.
          example: d8e8fca2-dc0f-4f3b-9a2e-1f6f3c2b7a10
          format: uuid
          type: string
        key:
          description: >-
            Key is a "human-readable" alternative to ID, uniqueness must be
            enforced on this identifier
          example: accountTier
          type: string
        name:
          description: Name is the display name of the custom field.
          example: Account tier
          type: string
        object:
          description: Object is the resource type discriminator.
          example: customField
          type: string
        options:
          description: >-
            Options are the selectable values; only present for multiSelect
            fields.
          items:
            $ref: '#/components/schemas/customfields.ClientCustomFieldOption'
          type: array
        order:
          description: >-
            Order is the position of the custom field relative to others of the
            same entity type.
          example: 0
          type: integer
        type:
          description: Type is the data type of the custom field.
          enum:
            - text
            - number
            - email
            - url
            - phoneNumber
            - address
            - multiSelect
          example: multiSelect
          type: string
      type: object
    dispatcher.Error:
      properties:
        code:
          type: string
        data: {}
        message:
          type: string
      type: object
    customfields.patchCustomFieldOption:
      properties:
        id:
          description: >-
            ID identifies an existing option to relabel; omit to add a new
            option.
          example: option-f1a2b3c4-d5e6-47a8-9b0c-1d2e3f4a5b6c
          type: string
        label:
          description: Label is the option's display text.
          example: High priority
          type: string
      required:
        - label
      type: object
    customfields.ClientCustomFieldOption:
      properties:
        color:
          description: Color is the display color for the option.
          example: rgba(204, 0, 0, 1)
          type: string
        id:
          description: ID is the unique identifier of the option.
          example: f1a2b3c4-d5e6-47a8-9b0c-1d2e3f4a5b6c
          format: uuid
          type: string
        key:
          description: >-
            Key is a "human-readable" alternative to ID

            uniqueness must be enforced against other option key values for a
            given custom field
          example: highPriority
          type: string
        label:
          description: Label is the human-readable text shown for the option.
          example: High priority
          type: string
        object:
          description: Object is the resource type discriminator.
          example: customFieldOption
          type: string
      type: object
  securitySchemes:
    APIKeyHeader:
      in: header
      name: X-API-KEY
      type: apiKey

````

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