---
title: "Update User"
method: PUT
path: "/{sub_domain}/api/users/{id}"
tags: ["Users"]
---

# Update User

`PUT /{sub_domain}/api/users/{id}`

## Request

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

Updates the specified user and returns the updated record.

**When to use.** Change one or more fields on an existing user. Only the fields you include in the request body are changed; omitted fields keep their current values.

**Parameters.** `id` (path, required): the ID of the user to update.

**Notes.** Send only the fields you want to change. Passing `password` sets a new password. You can reassign roles and desks by passing their IDs. See the request schema for the full list of accepted fields.

**Returns.** `200 OK` with `{ "users": [ { ... } ] }`.

**Example.** `PUT /api/users/5` with body `{ "first_name": "John" }`

## Path parameters

- `id` integer, required: User ID.
- `sub_domain` string, required: Dialer Name (subdomain)

## Request body

- UserUpdateInput
  - `username` string, nullable: Username.
  - `email` string, nullable: Email address.
  - `password` string, nullable: New password for the user account.
  - `sip_option` integer, nullable: SIP option (0 - WebRTC, 2 - Custom URI (needs sip_uri), 3 - Built in PBX).
  - `is_active` integer, nullable: Whether the user is active (1/0).
  - `is_clockedin` string, nullable: Timestamp the user clocked in.
  - `sip_uri` string, nullable: SIP URI.
  - `auto_dial` integer, nullable: Auto-dial status (1/0).
  - `is_deleted` integer, nullable: Whether the user is deleted (1/0).
  - `use_extended_ip_acl` integer, nullable: Use extended IP ACL (1 - yes, 0 - no).
  - `is_predictive_clockedin` string, nullable: Timestamp the user clocked in for predictive dialing.
  - `predictive_dynamic_extension` string, nullable: Predictive dynamic extension.
  - `timezone_id` integer, nullable: Timezone ID.
  - `first_name` string, nullable: First name.
  - `last_name` string, nullable: Last name.
  - `virtual_extension` string, nullable: Virtual extension.
  - `default_language` string, nullable: Default language (e.g. en_US, es_ES, pt_BR).
  - `max_session_time` string, nullable: Maximum session time.
  - `max_concurrent_sessions` string, nullable: Maximum concurrent sessions.
  - `twofa_type` string, nullable: Two-factor authentication type (default, disabled, email, google).
  - `member_all_skill_groups` string, nullable: Member of all skill groups (1/0).
  - `member_all_desks` string, nullable: Member of all desks (1/0).
  - `user_region` string, nullable: PBX region (0 - default).
  - `desks` integer[], nullable: IDs of desks associated with the user.
  - `roles` integer[], nullable: IDs of roles assigned to the user.
  - `skill_groups` integer[], nullable: IDs of skill groups assigned to the user.

## Response `200`

Successful Response

- UsersResponse
  - `users` UserResult[], required
    - `id` integer, nullable: User ID.
    - `username` string, nullable: Username.
    - `email` string, nullable: Email address.
    - `virtual_extension` integer, nullable: Virtual extension.
    - `first_name` string, nullable: First name.
    - `last_name` string, nullable: Last name.

## Other responses

- `404`: Not Found
- `422`: Validation Error
- `500`: Internal Server Error

---

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