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

# Create a hierarchy level

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

To create a new hierarchy level, use the `createHierarchyLevel` mutation.

**Access policy:**

* The API user context must have permission to create hierarchy levels.
* If `parentId` is provided and is not `0`, a hierarchy level with this ID must exist.

The single argument accepted by this mutation is `hierarchyLevel`, an object with the following properties:

| Argument   | Type     | Description                                                                               | Default |
| :--------- | :------- | :---------------------------------------------------------------------------------------- | :------ |
| `label`    | `String` | Required. The display name of the hierarchy level to create.                              | —       |
| `parentId` | `ID`     | The parent hierarchy level ID. Use `0` or omit the field to create a top‑level hierarchy. | 0       |

<Note>
  To create a top‑level hierarchy level, set `parentId` to `0` or omit it.
</Note>

<CodeGroup>
  ```filename GraphQL [expandable] theme={null}
  mutation createHierarchyLevel {
    createHierarchyLevel(hierarchyLevel: {
      label: "Advanced Level of Training",
      parentId: "24"
    }){
      errors
      response {
        id
        label
        parent {
          id
          label
        }
      }
    }
  }
  ```

  ```File Query result [expandable] theme={null}
  {
    "data": {
      "createHierarchyLevel": {
        "errors": [],
        "response": {
          "id": "42",
          "label": "Advanced Level of Training",
          "parent": {
            "id": "24",
            "label": "Global region"
          }
        }
      }
    }
  }
  ```
</CodeGroup>
