> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bota.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Reset Device

> Trigger a factory reset on a device

Schedule a factory reset on a device. On the next heartbeat cycle, the device will wipe its credentials (device token, pairing state, stored WiFi networks) and reboot into an unpaired state.

Use this when you need to repurpose a device, recover from a bad state, or wipe credentials without removing the device record from your project. The device record, all recordings, transcriptions, and summaries are preserved.

## How it works

1. The API unbinds the device from its current end user (if bound) and revokes its device token.
2. A `factory_reset` command is queued in the device's pending commands.
3. On the next heartbeat (typically within 60 seconds), the device receives the command, wipes credentials, and reboots.
4. After rebooting, the device advertises as unpaired and must be provisioned again before it can upload recordings.

<Note>
  The device must have WiFi or cellular connectivity to receive the factory reset command via heartbeat. Bluetooth-only devices cannot receive the command until a WiFi or cellular connection is available.
</Note>

## Authentication

Requires an [API key](/authentication) with `devices:write` scope.

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.bota.dev/v1/devices/dev_abc123/reset \
    -H "Authorization: Bearer sk_live_..."
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api.bota.dev/v1/devices/dev_abc123/reset', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer sk_live_...',
    },
  });

  const device = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://api.bota.dev/v1/devices/dev_abc123/reset',
      headers={'Authorization': 'Bearer sk_live_...'},
  )

  device = response.json()
  ```
</RequestExample>

## Path Parameters

<ParamField path="id" type="string" required>
  The device's unique identifier (e.g., `dev_abc123`).
</ParamField>

## Response

Returns the updated device object. The `status` will be `unbound` and `end_user_id` will be `null`.

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "dev_abc123",
    "serial_number": "SN-2025-001234",
    "model": "bota_pin",
    "firmware_version": "1.2.0",
    "status": "unbound",
    "end_user_id": null,
    "metadata": null,
    "created_at": "2025-01-15T10:30:00Z",
    "updated_at": "2025-01-15T12:00:00Z",
    "bound_at": null
  }
  ```

  ```json 404 theme={null}
  {
    "error": {
      "code": "not_found",
      "message": "Device not found"
    }
  }
  ```
</ResponseExample>

## Response Fields

| Field                 | Type            | Description                              |
| --------------------- | --------------- | ---------------------------------------- |
| `id`                  | string          | Device identifier (`dev_*`)              |
| `serial_number`       | string          | Physical serial number                   |
| `model`               | string          | Device model (`bota_pin` or `bota_note`) |
| `firmware_version`    | string \| null  | Current firmware version                 |
| `status`              | string          | `unbound` after reset                    |
| `end_user_id`         | string \| null  | `null` after reset                       |
| `battery_percent`     | integer \| null | Battery level (0-100)                    |
| `storage_used_mb`     | integer \| null | Storage used in MB                       |
| `storage_total_mb`    | integer \| null | Total storage capacity in MB             |
| `signal_strength_dbm` | integer \| null | Signal strength in dBm                   |
| `last_heartbeat_at`   | string \| null  | Last heartbeat timestamp (ISO 8601)      |
| `metadata`            | object          | Custom key-value metadata                |
| `created_at`          | string          | Creation timestamp (ISO 8601)            |
| `updated_at`          | string          | Last update timestamp (ISO 8601)         |

<Note>
  Factory reset differs from [delete](/api-reference/devices/delete): reset wipes credentials on the physical device but keeps the record in your project. Delete removes the record (softly — it can be recovered) but does not wipe the device.
</Note>
