---
title: "Update device"
method: PUT
path: "/{sub_domain}/api/devices"
tags: ["Devices"]
---

# Update device

`PUT /{sub_domain}/api/devices`

## Request

- Base URL: `https://api.commpeak.com/pbx`
- URL: `https://api.commpeak.com/pbx/{sub_domain}/api/devices`
- Auth: API key in header `Authorization`

Update an existing device.

**When to use.** Rename a device or reset its registration password.

**Request body.** `extension` (required): identifies the device to update. `name` (optional): a new label. `reset_password` (optional): set to `1` to generate a new registration password.

**Shape.** `{ "devices": [ <device> ] }` for the updated device.

## Path parameters

- `sub_domain` string, required: PBX Name (subdomain)

## Request body

- UpdateDeviceInput
  - `extension` string, required: Extension identifying the device to update.
  - `name` string, nullable: Device name / description.
  - `reset_password` integer, nullable: If set to 1, a new registration password is generated for this device.

## Response `200`

Successful Response

- DevicesResponse
  - `devices` DeviceItem[], required
    - `id` integer, nullable: Device ID.
    - `name` string, nullable: Device name / description.
    - `extension` integer, nullable: Device extension.
    - `password` string, nullable: Registration password.
    - `created_at` string, nullable: Creation timestamp.
    - `updated_at` string, nullable: Last update timestamp.
    - `login_user_id` integer, nullable: ID of the user last logged in to the device.
    - `last_login` string, nullable: Last login timestamp, or null.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/commpeak/apis/commpeak-pbx-api.md) - [All operations](https://skmtc.dev/commpeak/apis/commpeak-pbx-api/llms.txt) - [OpenAPI document](https://skmtc.dev/commpeak/apis/commpeak-pbx-api/revisions/0b1e8c7fd3f6?raw)
