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

# Update an attribute

> Updates a single attribute on a given object.



## OpenAPI

````yaml patch /v1/{target}/{identifier}/attributes/{attribute}
openapi: 3.1.0
info:
  version: 0.1.0
  title: Connect-CRM Backend API
servers:
  - url: https://api.connect-crm.com
security:
  - Bearer: []
paths:
  /v1/{target}/{identifier}/attributes/{attribute}:
    patch:
      tags:
        - Attributes
      summary: Update an attribute
      description: Updates a single attribute on a given object.
      operationId: updateAttribute
      parameters:
        - schema:
            type: string
            description: Whether the attributes are on an object.
            enum:
              - objects
          required: true
          description: Whether the attributes are on an object.
          name: target
          in: path
        - schema:
            type: string
            description: A UUID or slug to identify the object.
          required: true
          description: A UUID or slug to identify the object.
          name: identifier
          in: path
        - schema:
            type: string
            format: uuid
            description: A UUID or slug to identify the attribute.
          required: true
          description: A UUID or slug to identify the attribute.
          name: attribute
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AttributeBody'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttributeResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  type:
                    type: string
                    example: invalid_request_error
                  code:
                    type: string
                    example: validation_type
                  requestId:
                    type: string
                    example: 123e4567-e89b-12d3-a456-426655440000
                required:
                  - statusCode
                  - type
                  - code
                  - requestId
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  type:
                    type: string
                    example: not_authorized_error
                  code:
                    type: string
                    example: not_authorized
                  requestId:
                    type: string
                    example: 123e4567-e89b-12d3-a456-426655440000
                required:
                  - statusCode
                  - type
                  - code
                  - requestId
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 403
                  type:
                    type: string
                    example: forbidden_error
                  code:
                    type: string
                    example: forbidden
                  requestId:
                    type: string
                    example: 123e4567-e89b-12d3-a456-426655440000
                required:
                  - statusCode
                  - type
                  - code
                  - requestId
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  type:
                    type: string
                    example: invalid_request_error
                  code:
                    type: string
                    example: not_found
                  requestId:
                    type: string
                    example: 123e4567-e89b-12d3-a456-426655440000
                required:
                  - statusCode
                  - type
                  - code
                  - requestId
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 409
                  type:
                    type: string
                    example: invalid_request_error
                  code:
                    type: string
                    example: ''
                  requestId:
                    type: string
                    example: 123e4567-e89b-12d3-a456-426655440000
                required:
                  - statusCode
                  - type
                  - code
                  - requestId
        '500':
          description: Invalid Server
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 500
                  type:
                    type: string
                    example: invalid_error
                  code:
                    type: string
                    example: ''
                  requestId:
                    type: string
                    example: 123e4567-e89b-12d3-a456-426655440000
                required:
                  - statusCode
                  - type
                  - code
                  - requestId
components:
  schemas:
    AttributeBody:
      type: object
      properties:
        title:
          type: string
          maxLength: 255
          description: The name of the attribute.
        description:
          type:
            - string
            - 'null'
          maxLength: 2000
          description: A text description for the attribute.
        type:
          type: string
          enum:
            - name
            - personal-name
            - website
            - email-address
            - text
            - date
            - timestamp
            - number
            - checkbox
            - select
            - multi-select
            - currency
            - record-reference
            - actor-reference
            - location
            - phone-number
            - pipeline
            - relationship
          description: >-
            The type of the attribute. This value affects the possible config
            values.
        is_required:
          type: boolean
          description: >-
            When is_required is true, new records/entries must have a value for
            this attribute. If false, values may be null. This value does not
            affect existing data and you do not need to back-fill null values if
            changing is_required from false to true.
        is_unique:
          type: boolean
          description: >-
            Whether or not new values for this attribute must be unique.
            Uniqueness restrictions are only applied to new data and do not
            apply retroactively to previously created data.
        is_multi_select:
          type: boolean
          description: >-
            Whether or not this attribute can have multiple values. Multiselect
            is only available on some value types.
        default_value:
          type:
            - string
            - 'null'
          description: The default value for the attribute.
        config:
          $ref: '#/components/schemas/AttributeConfig'
        relationship:
          type:
            - object
            - 'null'
          properties:
            target_object_id:
              type: string
              format: uuid
              description: The UUID of the target object this relationship points to.
              example: 9293961c-df93-4d6d-a2cc-fc3e353b2d10
            inverse_title:
              type: string
              maxLength: 255
              description: >-
                The title of the inverse attribute that will be created on the
                target object.
              example: Related Companies
            cardinality:
              type: string
              enum:
                - one-to-one
                - one-to-many
                - many-to-one
                - many-to-many
              description: >-
                The cardinality of the relationship. Determines whether the
                primary and inverse sides allow multiple values.
              example: many-to-many
          required:
            - target_object_id
            - inverse_title
            - cardinality
          description: Relationship configuration. Required when type is "relationship".
        sort_order:
          type: integer
          minimum: 0
          maximum: 10000
          description: The sort order of the attribute. Used to control display order.
          example: 1
        stages:
          type: array
          items:
            $ref: '#/components/schemas/StageDelta'
          description: >-
            Stage deltas to reconcile against this Attribute. Required for new
            pipeline Attributes (≥1 non-archived stage).
        options:
          type: array
          items:
            $ref: '#/components/schemas/OptionDelta'
          description: >-
            Option deltas to reconcile against this Attribute. Required for new
            select / multi-select Attributes (≥1 non-archived option).
      required:
        - title
        - description
        - type
        - is_required
        - is_unique
        - is_multi_select
        - default_value
        - config
    AttributeResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Attribute'
      required:
        - data
    AttributeConfig:
      anyOf:
        - type: object
          properties:
            currency:
              type: 'null'
            record_reference:
              type: object
              properties:
                allowed_object_ids:
                  type: array
                  items:
                    type: string
                    format: uuid
                  maxItems: 50
                  description: An array of object IDs that this attribute can reference.
                  example:
                    - 9293961c-df93-4d6d-a2cc-fc3e353b2d10
              required:
                - allowed_object_ids
          required:
            - currency
            - record_reference
        - type: object
          properties:
            currency:
              $ref: '#/components/schemas/CurrencyConfig'
            record_reference:
              type: 'null'
          required:
            - currency
            - record_reference
        - type: object
          properties:
            currency:
              type: 'null'
            record_reference:
              type: 'null'
          required:
            - currency
            - record_reference
    StageDelta:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: A UUID v4 identifying the stage.
        title:
          type: string
          minLength: 1
          description: The title of the stage. Required when creating a stage.
        sort_order:
          type: integer
          minimum: 0
          description: The sort order of the stage.
        config:
          type:
            - object
            - 'null'
          properties:
            is_closed:
              type: boolean
            is_won:
              type: boolean
            is_lost:
              type: boolean
          description: Configuration for the attribute stage.
        archived_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            When the stage was archived. Null unarchives; absent leaves the
            archive state unchanged.
      required:
        - id
    OptionDelta:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: A UUID v4 identifying the option.
        title:
          type: string
          minLength: 1
          description: The title of the option. Required when creating an option.
        sort_order:
          type: integer
          minimum: 0
          description: The sort order of the option.
        archived_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            When the option was archived. Null unarchives; absent leaves the
            archive state unchanged.
      required:
        - id
    Attribute:
      type: object
      properties:
        id:
          type: object
          properties:
            workspace_id:
              type: string
              example: 9293961c-df93-4d6d-a2cc-fc3e353b2d10
              description: A UUID to identify the workspace this object belongs to.
            object_id:
              type: string
              example: 9293961c-df93-4d6d-a2cc-fc3e353b2d10
              description: A UUID to identify the object.
            attribute_id:
              type: string
              example: 9293961c-df93-4d6d-a2cc-fc3e353b2d10
              description: A UUID to identify the attribute.
          required:
            - workspace_id
            - object_id
            - attribute_id
        created_at:
          type: string
          format: date-time
          example: '2024-09-04T20:45:09Z'
          description: When the attribute was created.
        archived_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the attribute was archived. Null if not archived.
          example: '2024-09-04T20:45:09Z'
        slug:
          type: string
          description: >-
            A unique, human readable slug to access the object through URLs and
            API calls. Formatted in snake case.
        title:
          type: string
          description: A title for the attribute, to be displayed across the app.
        type:
          type: string
          enum:
            - name
            - personal-name
            - website
            - email-address
            - text
            - date
            - timestamp
            - number
            - checkbox
            - select
            - multi-select
            - currency
            - record-reference
            - actor-reference
            - location
            - phone-number
            - pipeline
            - relationship
          description: >-
            The type of the attribute. This value affects the possible config
            values.
        description:
          type:
            - string
            - 'null'
          description: A text description of the attribute.
        is_required:
          type: boolean
          description: >-
            When is_required is true, new records/entries must have a value for
            this attribute. If false, values may be null. This value does not
            affect existing data and you do not need to back-fill null values if
            changing is_required from false to true.
        is_unique:
          type: boolean
          description: >-
            Whether or not new values for this attribute must be unique.
            Uniqueness restrictions are only applied to new data and do not
            apply retroactively to previously created data.
        is_multi_select:
          type: boolean
          description: >-
            Whether or not this attribute can have multiple values. Multiselect
            is only available on some value types.
        is_system_attribute:
          type: boolean
          description: >-
            Whether or not this attribute is a system attribute. System
            attributes are created by the system and cannot be deleted or
            modified.
        config:
          $ref: '#/components/schemas/AttributeConfig'
        relationship:
          anyOf:
            - type: object
              properties:
                id:
                  type: object
                  properties:
                    attribute_id:
                      type: string
                      example: 9293961c-df93-4d6d-a2cc-fc3e353b2d10
                      description: A UUID to identify the attribute.
                    object_id:
                      type: string
                      example: 9293961c-df93-4d6d-a2cc-fc3e353b2d10
                      description: A UUID to identify the object.
                  required:
                    - attribute_id
                    - object_id
              required:
                - id
            - type: 'null'
        sort_order:
          type: number
          description: The sort order of the attribute.
          example: 1
        default_value:
          type:
            - string
            - 'null'
          description: The default value for the attribute.
          example: Default Value
      required:
        - id
        - created_at
        - archived_at
        - slug
        - title
        - type
        - description
        - is_required
        - is_unique
        - is_multi_select
        - is_system_attribute
        - config
        - relationship
        - sort_order
        - default_value
    CurrencyConfig:
      type: object
      properties:
        default_currency_code:
          type: string
          description: The default currency code for this attribute.
          example: USD
        display_type:
          type: string
          description: The display type for the currency attribute.
          example: symbol
      required:
        - default_currency_code
        - display_type
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer

````