---
title: "PATCH /networks/{networkId}/users"
method: PATCH
path: "/networks/{networkId}/users"
---

# PATCH /networks/{networkId}/users

`PATCH /networks/{networkId}/users`

Updates the properties of an existing user in a Wickr network. This operation allows you to modify the user's name, password, security group membership, and invite code settings.

`codeValidation`, `inviteCode`, and `inviteCodeTtl` are restricted to networks under preview only.

## Path parameters

- `networkId` string, required

## Request body

- object
  - `userId` string, required — The unique identifier of the user to update.
  - `userDetails` object — <p>Contains the modifiable details for updating an existing user, including name, password, security group membership, and invitation settings.</p> <note> <p>A user can only be assigned to a single security group. Attempting to add a user to multiple security groups is not supported and will result in an error.</p> </note>
    - `firstName` string, password — The new first name for the user.
    - `lastName` string, password — The new last name for the user.
    - `username` string — The new username or email address for the user.
    - `securityGroupIds` SecurityGroupId[] — The updated list of security group IDs to which the user should belong.
    - `inviteCode` string — A new custom invite code for the user.
    - `inviteCodeTtl` integer — The new time-to-live for the invite code in days.
    - `codeValidation` boolean — Indicates whether the user can be verified through a custom invite code.

## Response `200`

Success

- UpdateUserResponse
  - `userId` string, required — The unique identifier of the updated user.
  - `networkId` string, required — The ID of the network where the user was updated.
  - `securityGroupIds` SecurityGroupId[] — The list of security group IDs to which the user now belongs after the update.
  - `firstName` string, password — The updated first name of the user.
  - `lastName` string, password — The updated last name of the user.
  - `middleName` string — The middle name of the user (currently not used).
  - `suspended` boolean, required — Indicates whether the user is suspended after the update.
  - `modified` integer — The timestamp when the user was last modified, specified in epoch seconds.
  - `status` integer — The user's status after the update.
  - `inviteCode` string — The updated invite code for the user, if applicable.
  - `inviteExpiration` integer — The expiration time of the user's invite code, specified in epoch seconds.
  - `codeValidation` boolean — Indicates whether the user can be verified through a custom invite code.

## Other responses

- `480` — ValidationError
- `481` — BadRequestError
- `482` — ResourceNotFoundError
- `483` — ForbiddenError
- `484` — UnauthorizedError
- `485` — InternalServerError
- `486` — RateLimitError

---

[API](https://skmtc.net/aws/apis/wickr.md) · [All operations](https://skmtc.net/aws/apis/wickr/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/wickr/revisions/71d396c2af63/schema)
