Skip to main content

Update User

Update an existing team user's permissions and credentials.

Endpoint

POST /user/update

Authentication

HeaderValue
AuthorizationBearer <jwt_token>
Content-Typeapplication/json

Request Body

FieldTypeRequiredDescription
usernamestringUsername of the team user to update
passwordstringNew password for the team user
permissionsobjectUpdated permission settings for different resources

Permissions Object Structure

ResourceTypeDescription
appsobjectPermissions for application management
channelsobjectPermissions for channel management
platformsobjectPermissions for platform management
archsobjectPermissions for architecture management

Permission Fields for Each Resource

FieldTypeDescription
createbooleanPermission to create new resources
deletebooleanPermission to delete resources
editbooleanPermission to edit existing resources
downloadbooleanPermission to download files (apps only)
uploadbooleanPermission to upload files (apps only)
allowedarrayList of resource IDs the user has access to

Example Request

curl -X POST \
'http://localhost:9000/user/update' \
-H 'Authorization: Bearer <jwt_token>' \
-H 'Content-Type: application/json' \
-d '{
"username": "teamuser1",
"password": "password1234",
"permissions": {
"apps": {
"create": false,
"delete": true,
"edit": true,
"download": true,
"upload": true,
"allowed": ["", ""]
},
"channels": {
"create": true,
"delete": true,
"edit": true,
"allowed": [""]
},
"platforms": {
"create": true,
"delete": false,
"edit": true,
"allowed": [""]
},
"archs": {
"create": true,
"delete": false,
"edit": true,
"allowed": [""]
}
}
}'

Response

Success Response (200 OK)

{
"message": "Team user updated successfully"
}

Response Fields

FieldTypeDescription
messagestringConfirmation message indicating successful user update

Notes

  • Only admin users can update team user permissions
  • Password changes take effect immediately
  • Permission changes affect the user's access rights immediately
  • The allowed array can be updated to grant or revoke access to specific resources