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

# Delete a hierarchy level

<Warning>
  Only users with the <b>ADMINISTRATOR</b> scope in the current context can delete hierarchy levels. Make sure your API token grants administrator privileges.
  See [Understanding Scopes](/OpignoEnterpriseAPI/UserContextManagement#understanding-scopes) for more information.
</Warning>

To delete a hierarchy level, use the `deleteHierarchyLevel` mutation.

<Note>
  <b>Important:</b> this operation is irreversible. After deletion, the hierarchy level is removed and will no longer appear in the hierarchy tree or any assignments where it was used.
</Note>

**Access policy:**

* The API user context must have permission to manage hierarchy levels.
* A hierarchy level with the given `id` must exist.

The mutation accepts the following argument:

| Argument | Type | Description                                        | Default |
| :------- | :--- | :------------------------------------------------- | :------ |
| `id`     | `ID` | Required. The ID of the hierarchy level to delete. | —       |

<CodeGroup>
  ```filename GraphQL [expandable] theme={null}
  mutation deleteHierarchyLevel {
    deleteHierarchyLevel(
      id: "23"
    ){
      errors
      response 
    }
  }
  ```

  ```File Query result [expandable] theme={null}
  {
    "data": {
      "deleteHierarchyLevel": {
        "errors": [],
        "response": true
      }
    }
  }
  ```
</CodeGroup>
