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

# Manage label types

<Snippet file="graphql/sdk-note.mdx" />

Label types define the labels available in your workspace. Each label type has a name, icon, colour, and optionally a description, parent label type and external ID.

When you want to stop a label being available, archive its label type rather than deleting it — this preserves the historical record on existing threads.

The mutations below all require the following permissions:

* `labelType:create`
* `labelType:edit`

The read queries require:

* `labelType:read`

## Get label types

Use `labelTypes` to fetch the full list of label types in your workspace. By default this includes archived label types — pass `filters: { isArchived: false }` to exclude them.

<Snippet file="graphql/get-label-types.mdx" />

## Get a label type by ID

<Snippet file="graphql/get-label-type-by-id.mdx" />

## Get a label type by external ID

If you store your own identifier on label types via `externalId`, you can look them up by that value. External IDs are unique within a workspace.

<Snippet file="graphql/get-label-type-by-external-id.mdx" />

## Create a label type

<Snippet file="graphql/create-label-type.mdx" />

## Update a label type

Updates use field-level wrapper inputs — to change a field pass `{ "value": ... }`; to leave a field untouched omit it entirely.

<Snippet file="graphql/update-label-type.mdx" />

## Archive a label type

Archived label types stay attached to existing threads but cannot be added to new threads. Attempting to call `addLabels` with an archived label type returns the error code `cannot_add_label_using_archived_label_type`.

<Snippet file="graphql/archive-label-type.mdx" />

## Unarchive a label type

<Snippet file="graphql/unarchive-label-type.mdx" />
