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

# Update CRM Object Attribute

> Update a single attribute definition on a Zeeg CRM object with a partial PATCH that changes only the fields you send, like label, options, or currency

Partially updates a single attribute definition. Only the fields you include are changed.

## Updatable fields

| Field                | Applies to                        | Notes                                                         |
| -------------------- | --------------------------------- | ------------------------------------------------------------- |
| `label`              | All types                         |                                                               |
| `isRequired`         | All types                         |                                                               |
| `isArchived`         | All types                         | Archived attributes are hidden in the UI but data is retained |
| `options`            | `select`, `multiselect`, `status` | Full replacement — see below                                  |
| `relatedObjectLabel` | `relation`                        | Display label shown in the UI for the linked object           |
| `currencyDisplay`    | `currency`                        | `code`, `name`, or `symbol`                                   |
| `currencyDecimal`    | `currency`                        | Show decimal places                                           |
| `currencyGrouping`   | `currency`                        | Use thousands separator                                       |

## Immutable fields

| Field               | Reason                                                          |
| ------------------- | --------------------------------------------------------------- |
| `type`              | Changing type would corrupt existing record data                |
| `key`               | Used as the stable identifier in all record values              |
| `relatedObjectSlug` | Changing the target would orphan existing linked records        |
| `currency`          | Changing the currency code would make stored amounts misleading |

## Updating options (`select` / `multiselect` / `status`)

When you send `options`, the list **fully replaces** the current options:

* **Include `id`** on existing options you want to keep — existing record values are preserved.
* **Omit `id`** for new options — the server assigns a new ID.
* **Exclude** an option entirely to delete it — existing records that held that value will have the value cleared.

```json theme={null}
{
  "options": [
    { "id": 12, "value": "Active",   "color": "success" },
    { "id": 13, "value": "On Hold",  "color": "warning" },
    {           "value": "Churned",  "color": "gray"    }
  ]
}
```

## Standard attributes

Standard attributes (e.g. `first_name`, `emails` on `people`) cannot be updated and return `400`.


## OpenAPI

````yaml PATCH /crm/objects/{slug}/attributes/{attributeKey}
openapi: 3.0.0
info:
  title: Zeeg Public API
  description: >-
    Zeeg public API documentation.


    ## Authentication

    All endpoints require a Bearer token. You can generate an API token from
    [your Zeeg dashboard](https://app.zeeg.me/account/settings/api-access).


    Each token is scoped to specific permissions (e.g. `events:read`,
    `webhooks:write`). Make sure your token has the required scopes for the
    endpoints you want to use.


    ## Recommended Headers

    We recommend including the `Accept: application/json` header in all API
    requests to ensure you receive JSON responses.
  version: 2.0.0
  x-logo:
    url: https://app.zeeg.me/img/logo-dark.2ca83593.svg
    backgroundColor: '#f7f7f9'
    altText: zeeg
  contact:
    name: Zeeg Support
    email: support@zeeg.me
    url: https://zeeg.me/en/contact
  license:
    name: Proprietary
    url: https://zeeg.me/en/legal/terms
  termsOfService: https://zeeg.me/en/legal/terms
servers:
  - url: https://api.zeeg.me/v2
    description: Production
security:
  - bearer: []
tags:
  - name: Scheduled Events
    description: Management of events scheduled via Zeeg
  - name: Scheduling Pages
    description: Scheduling pages information and management
  - name: Availability Schedule
    description: Read and change availability for users
  - name: Webhooks
    description: Webhooks management
  - name: Notes
    description: Notes for scheduled events
  - name: Workspaces & Teams
    description: Workspace users and team member management
  - name: AI Agent
    description: AI Agent integration endpoints
  - name: Payloads
    description: Webhook payload schemas
  - name: CRM - Objects
    description: >-
      Discover the schema of CRM objects (standard and custom) including all
      attribute definitions
  - name: CRM - Companies
    description: Create, read, update, and delete CRM company records
  - name: CRM - People
    description: Create, read, update, and delete CRM person records
paths:
  /crm/objects/{slug}/attributes/{attributeKey}:
    patch:
      tags:
        - CRM - Objects
      summary: Update an attribute on a CRM object
      description: >-
        Partially updates an existing attribute on a CRM object. Only fields you
        provide are updated — omitted fields retain their current values.


        **Constraints:**

        - The attribute `type` cannot be changed after creation.

        - Standard attributes (`isStandard: true`) cannot be updated.

        - The attribute `key` cannot be changed.


        **Required scope:** `crm:write`
      operationId: patch-crm-object-attribute
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            example: people
          description: The object slug.
        - name: attributeKey
          in: path
          required: true
          schema:
            type: string
            example: customer_status
          description: >-
            The attribute key (slug) to update. Retrieve available keys from
            `GET /crm/objects/{slug}`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                label:
                  type: string
                  description: New display label.
                  example: Status
                  maxLength: 255
                isRequired:
                  type: boolean
                  description: Whether a value is required when creating a record.
                  example: true
                isArchived:
                  type: boolean
                  description: >-
                    Set to `true` to hide this attribute from the UI without
                    deleting data.
                  example: false
                options:
                  type: array
                  description: >-
                    Replacement options list for `select`, `multiselect`, and
                    `status` types. Include existing option `id` values to
                    preserve them.
                  items:
                    $ref: '#/components/schemas/CrmAttributeOption'
                relatedObjectLabel:
                  type: string
                  description: >-
                    `relation` only — updated display label for the linked
                    object. The target object (`relatedObjectSlug`) cannot
                    change.
                  example: Contact Person
                  maxLength: 255
                currencyDisplay:
                  type: string
                  description: >-
                    `currency` only — how the currency value is shown: `code`,
                    `name`, or `symbol`.
                  enum:
                    - code
                    - name
                    - symbol
                  example: code
                currencyDecimal:
                  type: boolean
                  description: '`currency` only — show decimal places.'
                  example: false
                currencyGrouping:
                  type: boolean
                  description: '`currency` only — use a thousands separator.'
                  example: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  status:
                    type: integer
                    example: 200
                  attribute:
                    $ref: '#/components/schemas/CrmAttribute'
              examples:
                Updated label:
                  value:
                    success: true
                    status: 200
                    attribute:
                      key: customer_status
                      label: Status
                      type: select
                      isRequired: true
                      isStandard: false
                      isUnique: false
                      isArchived: false
                      options:
                        - id: 1
                          value: Lead
                          color: warning
                        - id: 2
                          value: Active
                          color: success
                        - id: 3
                          value: Churned
                          color: red
                      createdAt: '2025-06-15T10:00:00+00:00'
                      updatedAt: '2025-06-20T14:00:00+00:00'
        '400':
          description: Bad Request — attempt to change attribute type
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  status:
                    type: integer
              examples:
                Type change attempt:
                  value:
                    success: false
                    message: Attribute type cannot be changed.
                    status: 400
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          description: Object or attribute not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  status:
                    type: integer
        '422':
          $ref: '#/components/responses/422'
      security:
        - bearer: []
components:
  schemas:
    CrmAttributeOption:
      type: object
      description: >-
        A selectable option for a `select`, `multiselect`, or `status`
        attribute.
      required:
        - value
        - color
      properties:
        id:
          type: integer
          nullable: true
          description: >-
            Server-assigned option ID. Omit when adding a new option; include
            when updating an existing one to preserve it.
          example: 1
        value:
          type: string
          description: The option label shown in the UI and stored as the attribute value.
          example: Active
          maxLength: 512
        color:
          type: string
          description: >-
            Color name for the option. Allowed values: `gray`, `primary`,
            `warning`, `success`, `cyan`, `sky`, `violet`, `fuchsia`, `rose`,
            `blue`, `green`, `red`, `pink`, `black`, `yellow`, `orange`.
          example: success
    CrmAttribute:
      type: object
      description: Definition of a single attribute on a CRM object.
      required:
        - key
        - label
        - type
        - isRequired
        - isStandard
        - isUnique
        - isArchived
        - createdAt
        - updatedAt
      properties:
        key:
          type: string
          description: Attribute key used when reading or writing record values.
          example: job_title
        label:
          type: string
          description: Human-readable label shown in the UI.
          example: Job Title
        type:
          type: string
          description: Attribute data type. Cannot be changed after creation.
          enum:
            - text
            - number
            - phone_number
            - date
            - datetime
            - checkbox
            - select
            - multiselect
            - rating
            - relation
            - status
            - user
            - currency
          example: text
        isRequired:
          type: boolean
          description: Whether a value is required when creating a record.
          example: false
        isStandard:
          type: boolean
          description: >-
            `true` for built-in attributes, `false` for custom attributes added
            by your workspace.
          example: false
        isUnique:
          type: boolean
          description: >-
            Whether values must be unique across all records. Applies to `text`,
            `phone`, and `number` types.
          example: false
        isArchived:
          type: boolean
          description: >-
            Whether the attribute is archived. Archived attributes are hidden
            from the UI but their data is preserved.
          example: false
        options:
          type: array
          description: >-
            Available options. Present only for `select`, `multiselect`, and
            `status` attributes.
          items:
            $ref: '#/components/schemas/CrmAttributeOption'
        relatedObjectSlug:
          type: string
          nullable: true
          description: >-
            Slug of the related object. Present only for `relation` attributes.
            Immutable after creation.
          example: companies
        relatedObjectLabel:
          type: string
          nullable: true
          description: >-
            Display label for the relation. Present only for `relation`
            attributes. Can be updated via PATCH.
          example: Company
        relationType:
          type: string
          nullable: true
          description: Cardinality of the relation. Present only for `relation` attributes.
          enum:
            - one_to_one
            - many_to_one
            - one_to_many
            - many_to_many
          example: many_to_one
        isMultipleSelection:
          type: boolean
          description: >-
            `true` when `relationType` is `one_to_many` or `many_to_many`.
            Present only for `relation` attributes.
          example: false
        currency:
          type: string
          nullable: true
          description: >-
            ISO 4217 currency code. Present only for `currency` attributes.
            Immutable after creation.
          example: EUR
        currencyDisplay:
          type: string
          nullable: true
          description: >-
            How the currency value is displayed. Present only for `currency`
            attributes.
          enum:
            - code
            - name
            - symbol
          example: symbol
        currencyDecimal:
          type: boolean
          nullable: true
          description: >-
            Whether decimal places are shown. Present only for `currency`
            attributes.
          example: true
        currencyGrouping:
          type: boolean
          nullable: true
          description: >-
            Whether a thousands separator is used. Present only for `currency`
            attributes.
          example: true
        createdAt:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the attribute was created.
          example: '2025-06-01T10:00:00+00:00'
        updatedAt:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the attribute was last updated.
          example: '2025-06-01T10:00:00+00:00'
  responses:
    '401':
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: Unauthenticated.
          examples:
            Unauthenticated:
              value:
                message: Unauthenticated.
    '403':
      description: Forbidden
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                example: false
              message:
                type: string
                example: You cannot access this resource.
              status:
                type: integer
                example: 403
    '422':
      description: Unprocessable Entity
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: The given data was invalid.
              errors:
                type: object
                additionalProperties:
                  type: array
                  items:
                    type: string
                example:
                  field_name:
                    - The field_name field is required.
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: ''

````