Users
User management endpoints handle user profiles, credit balance, admin operations, transaction history, and other user-related functionality.User Profile
Get All Users
GET /users
Get all users (admin only)
Response
Get User by ID
GET /users/{userId}
Get user information by ID
Parameters
userId(path): User ID
Response
Get User by Email
GET /users/email/{email}
Get user information by email
Parameters
email(path): User email address
Response
Update User
PATCH /users/{userId}
Update user information
Parameters
userId(path): User ID
Request Body
Response
User Avatar
Upload Avatar
POST /users/{userId}/avatar
Upload a user avatar image
Parameters
userId(path): User ID
Request Body (multipart/form-data)
Response
Get Avatar
GET /users/{userId}/avatar
Get user avatar
Parameters
userId(path): User ID
Response
User Blockchain Address
Get User Public Key
GET /users/{userId}/pubkey
Get user’s blockchain public key address
Parameters
userId(path): User ID
Response
Credit Balance
Get Credit Balance
GET /users/{userId}/credit-balance
Get user’s credit balance
Parameters
userId(path): User ID
Response
Update Credit Balance (Admin Only)
POST /users/{adminId}/credit-balance/{userId}
Update user’s credit balance (admin only)
Parameters
adminId(path): Admin user IDuserId(path): Target user ID
Request Body
Response
Transaction History
Download Transaction History
GET /users/{userId}/transactions/{from}/{to}/download
Download user’s transaction history
Parameters
userId(path): User IDfrom(path): Start date (YYYY-MM-DD format)to(path): End date (YYYY-MM-DD format)
Response
User Permissions
Check Project Creation Permission
GET /users/{userId}/can-create-project
Check if user can create projects
Parameters
userId(path): User ID
Response
Check Member Invitation Permission
GET /users/{userId}/can-invite-member
Check if user can invite members to projects
Parameters
userId(path): User ID
Response
Check Admin Status
GET /users/{userId}/is-admin
Check if user has admin privileges
Parameters
userId(path): User ID
Response
Admin Operations
Suspend User
POST /users/{adminId}/suspend/{userEmail}
Suspend a user account (admin only)
Parameters
adminId(path): Admin user IDuserEmail(path): Email of user to suspend
Request Body
Response
Revoke User Suspension
POST /users/{adminId}/revoke-suspension/{userEmail}
Revoke user suspension (admin only)
Parameters
adminId(path): Admin user IDuserEmail(path): Email of user to unsuspend
Response
User Status
Users can have the following statuses:- Active: User is active and can use the platform
- On-hold: User registration is pending activation
- Suspended: User account is suspended by admin
Tags Management
Get All Tags
GET /tags
Get all available tags
Response
Create Tag
POST /tags
Create a new tag
Request Body
Response
Search Tags
GET /tags/search
Search for tags
Query Parameters
tag(query): Search term for tag names
Response
Example
Credit System
Credit Costs
Different operations have different credit costs:- Project Creation: 50 credits
- Project Invitation: 10 credits
- File Upload: 1 credit (private files) or file size in MB (public files)
- File Deletion: 1 credit
Credit Balance Management
- Users start with an initial credit balance
- Admins can add or subtract credits from user accounts
- Credits are automatically deducted for blockchain operations
- Users can view their transaction history
Error Responses
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
User Management Best Practices
Profile Management
- Keep user information up to date
- Use meaningful organisation and location data
- Regularly update avatars for better user experience
Credit Management
- Monitor credit balance regularly
- Plan operations based on available credits
- Contact admin for credit refills when needed
Security
- Use strong passwords and change them regularly
- Report suspicious activity immediately
- Keep personal information secure
Admin Operations
- Only suspend users when necessary
- Provide clear reasons for suspensions
- Monitor user activity for policy violations
- Regularly audit user permissions and access
