## Delete an automation and its log (desk:admin, or a maintainer of the space)

`DELETE /api/desk/v1/automations/{id}`

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

Scope `tenant`: `desk:admin`. Scope `space:<id>`: `desk:admin` or a maintainer of the space – the same people who manage the flows scoped to the space; others get 403. `version` is the version the caller read (400 without, 409 `version_conflict`).

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `version` | query | integer | yes | The automation's current version |
| `scope` | query | string | yes | Whose automations: `tenant` (every space) or `space:<space id>` |
| `id` | path | string (uuid) | yes |  |

### Responses

- **204** Deleted
- **400** Error (`application/json`)
- **403** Error (`application/json`)
- **404** Error (`application/json`)
- **409** Error (`application/json`)

### Example request

```bash
curl -X DELETE 'https://api.mbcom.cloud/api/desk/v1/automations/3f2b8c1e-7d4a-4e9b-9c2a-5b1d6e8f0a12?version=1&scope=tenant' \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```
