## Update a priority (desk:admin)

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

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

### Parameters

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

### Request body

`application/json` (required)

- `key` (string, required): Key of the priority, unique in the tenant
- `label` (string, required): Display label of the priority
- `archived` (boolean): Archived: the priority is kept for existing data but no longer offered in pickers
- `color` (string): Display color of the priority
- `id` (string): Id of the priority
- `isDefault` (boolean): Priority of new items without one
- `rank` (integer): Sort order of the priorities (ascending)

Example:

```json
{
  "archived": false,
  "color": "warning",
  "id": "8a5b6c7d-9e0f-4a1b-8c3d-5e6f7a8b9c03",
  "isDefault": false,
  "key": "hoch",
  "label": "Hoch",
  "rank": 3
}
```

### Responses

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

Fields of the 200 answer:

- `key` (string, required): Key of the priority, unique in the tenant
- `label` (string, required): Display label of the priority
- `archived` (boolean): Archived: the priority is kept for existing data but no longer offered in pickers
- `color` (string): Display color of the priority
- `id` (string): Id of the priority
- `isDefault` (boolean): Priority of new items without one
- `rank` (integer): Sort order of the priorities (ascending)

Example 200 answer:

```json
{
  "archived": false,
  "color": "warning",
  "id": "8a5b6c7d-9e0f-4a1b-8c3d-5e6f7a8b9c03",
  "isDefault": false,
  "key": "hoch",
  "label": "Hoch",
  "rank": 3
}
```

### Example request

```bash
curl -X PUT 'https://api.mbcom.cloud/api/desk/v1/priorities/3f2b8c1e-7d4a-4e9b-9c2a-5b1d6e8f0a12' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  --data '{"archived":false,"color":"warning","id":"8a5b6c7d-9e0f-4a1b-8c3d-5e6f7a8b9c03","isDefault":false,"key":"hoch","label":"Hoch","rank":3}'
```
