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

# Delete a Location Attribute

> [!WARNING]
>
> **This can't be undone.** Deleting an attribute also:
>
> * clears its value from every location
> * removes it from any project location filter, then updates those projects. Locations that matched only through this attribute have their upcoming tasks archived.
> * removes any template visibility condition that uses it
> * removes it from members' location assignment filters

> [!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`.


## OpenAPI

````yaml DELETE /api/v1/mgt/workspaces/{workspaceId}/location-attributes/{attributeId}
openapi: 3.1.0
info:
  title: Xenia Team API - Delete a Location Attribute
  description: Permanently deletes one location attribute.
  version: 1.0.0
servers:
  - url: https://api.xenia.team
security: []
paths:
  /api/v1/mgt/workspaces/{workspaceId}/location-attributes/{attributeId}:
    delete:
      tags:
        - Location Attributes
      summary: Delete a Location Attribute
      description: >-
        Permanently deletes one location attribute by its Xenia `id`. No request
        body.


        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.


        **This can't be undone.** Deleting an attribute also:


        - clears its value from every location

        - removes it from any project location filter, then updates those
        projects. Locations that matched only through this attribute have their
        upcoming tasks archived.

        - removes any template visibility condition that uses it

        - removes it from members' location assignment filters
      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
      responses:
        '200':
          description: The attribute was deleted.
          content:
            application/json:
              example:
                data: null
                extra_meta:
                  message: Attribute deleted
        '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 - `workspaceId` or `attributeId` is not a valid
            UUID.
        '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.