---
title: "Update a user"
method: PUT
path: "/user-service/users/{userId}"
tags: ["Users"]
---

# Update a user

`PUT /user-service/users/{userId}`

Update an existing user's information

## Request body

- UserUpdateRequest
  - `description` string, nullable — User's description or bio
  - `profile_photo` string, uri, nullable — URL to user's profile photo
  - `role_ids` string[] — List of role IDs to assign to the user (replaces existing roles)
  - `team_ids` string[] — List of team IDs to assign to the user (replaces existing teams)
  - `connection` string — Connection/authentication provider for the user
  - `email_verified` boolean — Whether the user's email has been verified
  - `last_login` string, date-time, nullable — Last login timestamp for the user (only updates if provided)

## Response `200`

Updated user

- UserResponse
  - `id` string, uuid, required — Unique identifier for the user
  - `account_id` string, required — Account identifier this user belongs to
  - `name` string, required — User's full name
  - `email` string, email, nullable — User's email address
  - `description` string, nullable — User's description or bio
  - `profile_photo` string, uri, nullable — URL to user's profile photo
  - `created_at` string, date-time, required — When the user was created
  - `last_login` string, date-time, nullable — User's last login time
  - `email_verified` boolean — Whether the user's email has been verified
  - `assigned_role_ids` string[] — List of role IDs directly assigned to this user
  - `team_ids` string[] — List of team IDs this user belongs to
  - `connection` string, nullable — Connection/authentication provider used by the user
  - `created_by` string, uuid, nullable — User ID of the person who created this user
  - `created_by_name` string, nullable — Name of the user who created this user
  - `system_generated` boolean — Whether this service account was automatically created by the system during migrations or other automated processes
  - `type` 'USER' | 'SA' — User type - either regular USER or Service Account (SA)

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — User not found

---

[API](https://skmtc.net/firefly/apis/firefly-user-management-service-api.md) · [All operations](https://skmtc.net/firefly/apis/firefly-user-management-service-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/firefly/firefly-user-management-service-api/revisions/3d5d69795558/schema)
