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

# rearrangeLabelTypes

> Moves and reorders many label types in one operation. Each sibling group sets the order of the label types under one parent, and listing a label type under a different parent moves it there. All changes are applied together or not at all, and only label types whose parent or position changes are updated. Requires the `labelType:edit` permission.



**mutation** `rearrangeLabelTypes(input: RearrangeLabelTypesInput!): RearrangeLabelTypesOutput!`

## Arguments

**`input`**: `RearrangeLabelTypesInput!` (required)

## Returns

`RearrangeLabelTypesOutput!`

**`labelTypes`**: `[LabelType!]!`

The label types whose parent or position changed.

---

**`error`**: `MutationError`

## Examples

```graphql Mutation
mutation RearrangeLabelTypes($input: RearrangeLabelTypesInput!) {
  rearrangeLabelTypes(input: $input) {
    labelTypes {
      id
      name
      icon
      color
      type
      description
    }
    error {
      message
      type
      code
      fields {
        field
        message
        type
      }
    }
  }
}
```

```json Variables
{
  "input": {
    "siblingGroups": [
      {
        "labelTypeIds": [
          "id"
        ]
      }
    ]
  }
}
```

```json Response
{
  "data": {
    "rearrangeLabelTypes": {
      "labelTypes": [
        {
          "id": "id",
          "name": "string",
          "icon": "string",
          "color": "string",
          "type": "DEFAULT",
          "description": "string"
        }
      ],
      "error": {
        "message": "string",
        "type": "VALIDATION",
        "code": "string",
        "fields": [
          {
            "field": "string",
            "message": "string",
            "type": "VALIDATION"
          }
        ]
      }
    }
  }
}
```


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