# Delete device

> Remove a device connection.

Source: https://docs.mycrmsim.com/docs/devices/delete-device

```http
DELETE https://backend.mysmsgateway.app/api/v1/ext/devices/{channel}/{id}
```

- Category: myCRMSIM Devices / Devices
- Auth: Bearer access token
- Scope: `devices.write`

Deletes the device connection across any channel (android, whatsapp, imessage, rcs). A device that's still assigned to a workspace/subaccount is protected — unassign it first (for whatsapp/imessage/rcs, PATCH workspace_id = null; for android, unassign it from the subaccount) before deleting.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `channel` | path | enum | yes | "android" \| "whatsapp" \| "imessage" \| "rcs". Example: `whatsapp` |
| `id` | path | number | yes | Device id. Example: `12` |

## Response 200

Deleted

```json
{
  "success": true,
  "message": "Device deleted.",
  "data": {
    "channel": "whatsapp",
    "id": 12,
    "deleted": true
  }
}
```

## Response 400

Device still assigned to a workspace/subaccount — unassign first

```json
{
  "success": false,
  "message": "This device is assigned to a workspace. Unassign it (set workspace_id to null) before deleting."
}
```

## Response 401

Missing or invalid token

```json
{
  "success": false,
  "message": "Invalid or expired access token."
}
```

## Response 403

Missing scope

```json
{
  "success": false,
  "message": "Missing scope(s): devices.write."
}
```

## Response 404

Device does not exist or is not owned by the installer

```json
{
  "success": false,
  "message": "Device not found"
}
```
