> ## 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 option

> Updates an attribute option on either an object.



## OpenAPI

````yaml patch /v1/objects/{identifier}/attributes/{attribute}/options/{optionId}
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/objects/{identifier}/attributes/{attribute}/options/{optionId}:
    patch:
      tags:
        - AttributeOptions
      summary: Update an attribute option
      description: Updates an attribute option on either an object.
      operationId: updateOption
      parameters:
        - 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
        - schema:
            type: string
            format: uuid
            description: A UUID to identify the attribute option.
          required: true
          description: A UUID to identify the attribute option.
          name: optionId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAttributeOptionBody'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttributeOptionResponse'
        '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:
    UpdateAttributeOptionBody:
      type: object
      properties:
        title:
          type: string
          minLength: 1
          maxLength: 255
          description: The name of the attribute option.
        sort_order:
          type: number
          description: The sort order of the attribute option.
          example: 1
        archived_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the attribute option was archived.
          example: '2024-09-04T20:45:09Z'
      required:
        - title
        - sort_order
        - archived_at
    AttributeOptionResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/AttributeOption'
      required:
        - data
    AttributeOption:
      type: object
      properties:
        archived_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the attribute option was archived.
          example: '2024-09-04T20:45:09Z'
        id:
          type: object
          properties:
            option_id:
              type: string
              example: 9293961c-df93-4d6d-a2cc-fc3e353b2d10
              description: A UUID to identify the attribute option.
            attribute_id:
              type: string
              example: 9293961c-df93-4d6d-a2cc-fc3e353b2d10
              description: A UUID to identify the attribute this option belongs to.
            object_id:
              type: string
              example: 9293961c-df93-4d6d-a2cc-fc3e353b2d10
              description: A UUID to identify the object this option belongs to.
            workspace_id:
              type: string
              example: 9293961c-df93-4d6d-a2cc-fc3e353b2d10
              description: A UUID to identify the workspace this option belongs to.
          required:
            - option_id
            - attribute_id
            - object_id
            - workspace_id
        sort_order:
          type: number
          description: The sort order of the attribute option.
          example: 1
        title:
          type: string
          description: The title of the attribute option.
          example: Option 1
      required:
        - archived_at
        - id
        - sort_order
        - title
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer

````