## Update a label (desk:write)

`PUT /api/desk/v1/labels/{id}`

Module: Desk · operationId: `updateLabel` · Tag: Configuration · Auth: access token (`Authorization: Bearer <accessToken>`)

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string (uuid) | yes |  |

### Request body

`application/json` (required)

- `name` (string, required): Name of the label
- `archived` (boolean): Archived: the label is kept for existing data but no longer offered in pickers
- `color` (string): Display color of the label
- `description` (string): Description of the label
- `id` (string): Id of the label
- `spaceId` (string): Space of the label (empty: tenant-wide)

Example:

```json
{
  "archived": false,
  "color": "warning",
  "description": "Einsatz beim Kunden nötig",
  "id": "9b6c7d8e-0f1a-4b2c-9d4e-6f7a8b9c0d01",
  "name": "vor-ort",
  "spaceId": ""
}
```

### Responses

- **200** Saved (`application/json`)

Fields of the 200 answer:

- `name` (string, required): Name of the label
- `archived` (boolean): Archived: the label is kept for existing data but no longer offered in pickers
- `color` (string): Display color of the label
- `description` (string): Description of the label
- `id` (string): Id of the label
- `spaceId` (string): Space of the label (empty: tenant-wide)

Example 200 answer:

```json
{
  "archived": false,
  "color": "warning",
  "description": "Einsatz beim Kunden nötig",
  "id": "9b6c7d8e-0f1a-4b2c-9d4e-6f7a8b9c0d01",
  "name": "vor-ort",
  "spaceId": ""
}
```

### Example request

```bash
curl -X PUT 'https://api.mbcom.cloud/api/desk/v1/labels/3f2b8c1e-7d4a-4e9b-9c2a-5b1d6e8f0a12' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  --data '{"archived":false,"color":"warning","description":"Einsatz beim Kunden nötig","id":"9b6c7d8e-0f1a-4b2c-9d4e-6f7a8b9c0d01","name":"vor-ort","spaceId":""}'
```
