# deleteLabels

Mutation

Schedule deletion of up to 50 labels across the whole workspace, each with its own outcome; deletion is asynchronous and irreversible, and the creators survive. Priced per label.

Available to agents as MCP tool `deleteLabels` — see [Write tools](/api/v2/docs/mcp/write-tools#delete-labels).

## Arguments

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `labelNames` | `[String!]!` | Yes | — | The labels to delete, exactly as the `labels` query returns them. At least 1 and at most 50. Matching ignores case and surrounding whitespace, so names that differ only by case or whitespace collapse to one result echoing the first spelling. Deletion is workspace-wide and irreversible: each label leaves the taxonomy AND every creator carrying it. A blank name refuses the whole request. Not length-limited: a label longer than the creation limit stays deletable. |

## Returns

| Name | Type | Description |
| --- | --- | --- |
| `results` | [`[DeleteLabelResult!]!`](/api/v2/docs/types/delete-label-result) | One outcome per distinct submitted label, in submission order. Empty when userErrors is non-empty. |
| `userErrors` | [`[UserError!]!`](/api/v2/docs/types/user-error) | Errors that refused the whole request: an empty or oversized list, a blank name, a call costing more than the workspace's rate-limit capacity, or a workspace with no user to attribute the deletions to. Empty when the request was accepted — per-label refusals are reported in `results`. |

## Examples

### Delete several labels

Schedule the workspace-wide deletion of up to 50 labels at once, each with its own outcome.

```graphql
mutation DeleteLabelsDefault($labelNames: [String!]!) {
  deleteLabels(labelNames: $labelNames) {
    results {
      labelName
      scheduled
      operationId
      userErrors {
        field
        message
      }
    }
    userErrors {
      field
      message
    }
  }
}
```

Variables:

```json
{
  "labelNames": [
    "Retired 2024",
    "Plant Parents"
  ]
}
```

Response — HTTP 200:

```json
{
  "data": {
    "deleteLabels": {
      "results": [
        {
          "labelName": "Retired 2024",
          "scheduled": true,
          "operationId": "edbed984-2a99-57ae-a772-022c6334a01b",
          "userErrors": []
        },
        {
          "labelName": "Plant Parents",
          "scheduled": true,
          "operationId": "f34559dd-1574-5cf0-a8e4-ffc227aeac59",
          "userErrors": []
        }
      ],
      "userErrors": []
    }
  }
}
```
