Users
User management operations
Returns a list of all users.
Returns an array of user objects with their basic information.
Requires users:read
permission.
Authorizations
Query parameters
limitinteger · min: 1 · max: 100OptionalDefault:
Maximum number of users to return
20
offsetintegerOptionalDefault:
Number of users to skip
0
rolestring · enumOptionalPossible values:
Filter users by role
Responses
200
A list of users
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
get
GET /v1/users HTTP/1.1
Host: api.maisa.com
X-API-Key: YOUR_API_KEY
Accept: */*
{
"data": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"email": "[email protected]",
"name": "John Doe",
"role": "user",
"status": "active",
"createdAt": "2023-01-01T12:00:00Z"
}
],
"pagination": {
"total": 100,
"limit": 20,
"offset": 0,
"hasMore": true
}
}
Creates a new user in the system.
This operation requires admin privileges.
Authorizations
Body
emailstring · emailRequiredExample:
[email protected]
namestringRequiredExample:
John Doe
rolestring · enumRequiredExample:
user
Possible values: departmentstringOptionalExample:
Engineering
sendActivationEmailbooleanOptionalDefault:
true
Responses
201
User created successfully
application/json
400
Bad request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
409
User with email already exists
application/json
post
POST /v1/users HTTP/1.1
Host: api.maisa.com
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 168
{
"email": "[email protected]",
"name": "John Doe",
"role": "user",
"department": "Engineering",
"sendActivationEmail": true,
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
{
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"email": "[email protected]",
"name": "John Doe",
"role": "user",
"status": "active",
"createdAt": "2023-01-01T12:00:00Z",
"department": "Engineering",
"lastLoginAt": "2023-01-10T15:30:00Z",
"permissions": [
"users:read",
"projects:read",
"projects:write"
],
"updatedAt": "2023-01-05T10:00:00Z",
"metadata": {
"preferredLanguage": "en",
"theme": "dark"
}
}
}
Retrieves a user by their ID
Authorizations
Path parameters
userIdstring · uuidRequired
ID of the user to retrieve
Responses
200
User details
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Resource not found
application/json
get
GET /v1/users/{userId} HTTP/1.1
Host: api.maisa.com
X-API-Key: YOUR_API_KEY
Accept: */*
{
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"email": "[email protected]",
"name": "John Doe",
"role": "user",
"status": "active",
"createdAt": "2023-01-01T12:00:00Z",
"department": "Engineering",
"lastLoginAt": "2023-01-10T15:30:00Z",
"permissions": [
"users:read",
"projects:read",
"projects:write"
],
"updatedAt": "2023-01-05T10:00:00Z",
"metadata": {
"preferredLanguage": "en",
"theme": "dark"
}
}
}
Updates an existing user.
Authorizations
Path parameters
userIdstring · uuidRequired
ID of the user to update
Body
namestringOptionalExample:
John Doe
rolestring · enumOptionalExample:
admin
Possible values: departmentstringOptionalExample:
Engineering
statusstring · enumOptionalExample:
active
Possible values: Responses
200
User updated successfully
application/json
400
Bad request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Resource not found
application/json
put
PUT /v1/users/{userId} HTTP/1.1
Host: api.maisa.com
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 129
{
"name": "John Doe",
"role": "admin",
"department": "Engineering",
"status": "active",
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
{
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"email": "[email protected]",
"name": "John Doe",
"role": "user",
"status": "active",
"createdAt": "2023-01-01T12:00:00Z",
"department": "Engineering",
"lastLoginAt": "2023-01-10T15:30:00Z",
"permissions": [
"users:read",
"projects:read",
"projects:write"
],
"updatedAt": "2023-01-05T10:00:00Z",
"metadata": {
"preferredLanguage": "en",
"theme": "dark"
}
}
}
Deletes a user from the system.
This operation cannot be undone. All data associated with this user will be permanently deleted.
Authorizations
Path parameters
userIdstring · uuidRequired
ID of the user to delete
Responses
204
User deleted successfully
401
Unauthorized
application/json
403
Forbidden
application/json
404
Resource not found
application/json
delete
DELETE /v1/users/{userId} HTTP/1.1
Host: api.maisa.com
X-API-Key: YOUR_API_KEY
Accept: */*
No content