Skip to content
SoulFire LogoSoulFire

Update user

PATCH
/v1/users/{id}

Updates an existing user's profile information.

Authorization

headerAuthorizationBearer <JWT>

Preferred API authentication. Use a JWT with the api audience.

Path Parameters

id*string

The unique identifier (UUID) of the user to update. Cannot be the ID of the requesting user (cannot update self via this method). Cannot be the root user ID (00000000-0000-0000-0000-000000000000).

Formatuuid

Request Body

application/json
  1. body

Request message for updating an existing user's profile information. All fields except ID will be updated to the provided values.

username*string

The new username for the user. Must be lowercase, between 3 and 32 characters. Must begin with an alphanumeric character, followed by alphanumeric characters or dashes, and end with an alphanumeric character. Must be unique across all users.

role*string

The new role to assign to the user. ADMIN users have all permissions, while USER role has limited permissions.

Value in"ADMIN""USER"
email*string

The new email address for the user. Must be a valid email format and unique across all users. Maximum length is 255 characters.

Formatemail

Response Body

Response message returned after successfully updating a user.

application/json
  1. response

Response message returned after successfully updating a user. Empty response indicates success.

Example Request
curl -X PATCH 'http://127.0.0.1:38765/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'Content-Type: application/json' \
  -d '{
  "username": "string",
  "role": "ADMIN",
  "email": "user@example.com"
}'
Example Response
{}

Was this page helpful?