Skip to main content

Create User

Create a new team user with specific permissions for different resources.

Endpoint

POST /user/create

Authentication

HeaderValue
AuthorizationBearer <jwt_token>
Content-Typeapplication/json

Request Body

FieldTypeRequiredDescription
usernamestringUsername for the new team user
passwordstringPassword for the new team user
permissionsobjectObject containing 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/create' \
-H 'Authorization: Bearer <jwt_token>' \
-H 'Content-Type: application/json' \
-d '{
"username": "teamuser1",
"password": "password123",
"permissions": {
"apps": {
"create": true,
"delete": false,
"edit": true,
"download": true,
"upload": false,
"allowed": [""]
},
"channels": {
"create": true,
"delete": false,
"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 created successfully"
}

Response Fields

FieldTypeDescription
messagestringConfirmation message indicating successful user creation

Notes

  • Team users have restricted access based on their assigned permissions
  • The allowed array contains IDs of specific resources the user can access
  • Passwords should follow security best practices
  • Only admin users can create team users