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

# Update a Location Attribute

> Updates one location attribute by its Xenia `id`.

Send your `x-client-key` and `x-client-secret` headers. To act as another member, add an optional `x-client-user` header with that user's id. The request runs as the key's user (or the `x-client-user`), so that user's permissions apply. The user needs the **Can manage locations** permission.

**How fields are applied**

- `name` is required on every call.
- Leave `description` out to keep it. Send `""` to clear it.
- Leave `options` out to keep the current options.
- Sending `options` replaces the whole list. Include the `id` of every option you want to keep. An option without an `id` is created as a new option.
- An existing option missing from the list is removed. Every location that had it selected loses that value. Sending `[]` removes all options and clears the attribute's values at every location.
- `options` only applies to `single_select` and `multi_select` attributes.
- You can't change an attribute's type. Sending `type` returns `422` with `"type" is not allowed`.

> [!NOTE]
>
> Get the `attributeId` from [List Location Attributes](https://docs.xenia.team/api-reference/endpoints/enterprise-locations/list-attributes.md). Use the `id`, not the `externalId`.

> [!WARNING]
>
> Sending `options` replaces the whole list. Any existing option you leave out is removed, and every location that had it selected loses that value. Leave `options` out to keep the current options.


## OpenAPI

````yaml PUT /api/v1/mgt/workspaces/{workspaceId}/location-attributes/{attributeId}
openapi: 3.1.0
info:
  title: Xenia Team API - Update a Location Attribute
  description: Updates one location attribute's name, description, and options.
  version: 1.0.0
servers:
  - url: https://api.xenia.team
security: []
paths:
  /api/v1/mgt/workspaces/{workspaceId}/location-attributes/{attributeId}:
    put:
      tags:
        - Location Attributes
      summary: Update a Location Attribute
      description: >-
        Updates one location attribute by its Xenia `id`.


        Send your `x-client-key` and `x-client-secret` headers. To act as
        another member, add an optional `x-client-user` header with that user's
        id. The request runs as the key's user (or the `x-client-user`), so that
        user's permissions apply. The user needs the **Can manage locations**
        permission.


        **How fields are applied**


        - `name` is required on every call.

        - Leave `description` out to keep it. Send `""` to clear it.

        - Leave `options` out to keep the current options.

        - Sending `options` replaces the whole list. Include the `id` of every
        option you want to keep. An option without an `id` is created as a new
        option.

        - An existing option missing from the list is removed. Every location
        that had it selected loses that value. Sending `[]` removes all options
        and clears the attribute's values at every location.

        - `options` only applies to `single_select` and `multi_select`
        attributes.

        - You can't change an attribute's type. Sending `type` returns `422`
        with `"type" is not allowed`.
      parameters:
        - name: workspaceId
          in: path
          required: true
          description: >-
            UUID of the workspace. Must be the workspace your API key is bound
            to.
          schema:
            type: string
            format: uuid
        - name: attributeId
          in: path
          required: true
          description: >-
            The attribute's `id` from [List Location
            Attributes](/api-reference/endpoints/enterprise-locations/list-attributes).
            Use the `id`, not the `externalId`.
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 255
                  description: Display name.
                description:
                  type: string
                  maxLength: 1000
                  description: >-
                    Send `""` to clear it. Leave it out to keep the current
                    description.
                options:
                  type: array
                  description: >-
                    Single-select and multi-select attributes only. Replaces the
                    whole option list. Leave it out to keep the current options.
                    Options you don't include are removed, and their values are
                    cleared at every location.
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: >-
                          The existing option's id. Include it to keep that
                          option. Leave it out to create a new option.
                      label:
                        type: string
                        minLength: 1
                        maxLength: 255
                      color:
                        type: string
                        minLength: 1
                        maxLength: 32
                        description: Chip color, for example `#7C5CFC`.
                    required:
                      - label
                      - color
              required:
                - name
              additionalProperties: false
            example:
              name: Region
              description: Sales region
              options:
                - id: 0b6a3c1e-6a4f-4f1e-9a51-2a7d1c3e9f10
                  label: North
                  color: '#7C5CFC'
                - label: South
                  color: '#2BB673'
      responses:
        '200':
          description: The updated attribute.
          content:
            application/json:
              example:
                data:
                  id: 5d1e2f3a-1b2c-4d5e-8f90-a1b2c3d4e5f6
                  name: Region
                  description: Sales region
                  body:
                    type: single_select
                    options:
                      - id: 0b6a3c1e-6a4f-4f1e-9a51-2a7d1c3e9f10
                        label: North
                        color: '#7C5CFC'
                      - id: 9e8d7c6b-5a49-4382-a1b0-c9d8e7f6a5b4
                        label: South
                        color: '#2BB673'
                  createdBy: dfea8b8a-5b22-4668-b68d-dc641eb3a101
                  createdAt: '2026-11-20T10:00:00.000Z'
                extra_meta:
                  message: Attribute updated
        '401':
          description: Unauthorized - `Invalid client credentials`.
          content:
            application/json:
              example:
                status: false
                code: 401
                error:
                  message: Invalid client credentials
        '403':
          description: >-
            Forbidden - `You don't have permission "Can manage locations".` when
            the key's user lacks that permission, or `Forbidden: API key not
            authorized for this route`. Also returned when you hit the request
            volume limit (see [Rate limits](/guides/rate-limits)).
          content:
            application/json:
              example:
                error:
                  message: You don't have permission "Can manage locations".
                  meta: {}
        '404':
          description: Not Found - `Location attribute {attributeId} not found`.
          content:
            application/json:
              example:
                error:
                  message: >-
                    Location attribute 5d1e2f3a-1b2c-4d5e-8f90-a1b2c3d4e5f6 not
                    found
                  meta: {}
        '409':
          description: >-
            Conflict - `Location attributes were modified concurrently; reload
            and retry.` Another change landed at the same time. Fetch the
            attribute again and retry.
          content:
            application/json:
              example:
                error:
                  message: >-
                    Location attributes were modified concurrently; reload and
                    retry.
                  meta: {}
        '422':
          description: >-
            Unprocessable Entity - a field or id is invalid. For example, `name`
            is missing, `type` was sent, or an id is not a UUID.
          content:
            application/json:
              example:
                error:
                  error: 'ValidationError: "name" is required'
                  message: '"name" is required'
                  meta: {}
        '500':
          description: Internal Server Error.
      security:
        - clientKey: []
          clientSecret: []
components:
  securitySchemes:
    clientKey:
      type: apiKey
      in: header
      name: x-client-key
    clientSecret:
      type: apiKey
      in: header
      name: x-client-secret

````

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