## Apply the current policies to open items with running clocks (desk:admin, SLA-008)

`POST /api/desk/v1/sla/recalculate`

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

Every moved deadline is recorded in the item history (sla_recalculated). At most 1000 items per run.

### Request body

`application/json`

- `dryRun` (boolean)
- `policy` (string): Policy id or key; empty = all

Example:

```json
{
  "dryRun": true,
  "policy": "standard"
}
```

### Responses

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

Fields of the 200 answer:

- `changed` (integer)
- `dryRun` (boolean)
- `items` (integer)
- `truncated` (boolean)

Example 200 answer:

```json
{
  "changed": 7,
  "dryRun": true,
  "items": 42,
  "truncated": false
}
```

### Example request

```bash
curl -X POST 'https://api.mbcom.cloud/api/desk/v1/sla/recalculate' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  --data '{"dryRun":true,"policy":"standard"}'
```
