Users
User management operations
Returns a list of all users.
Returns an array of user objects with their basic information.
Requires users:read
permission.
Maximum number of users to return
20
Number of users to skip
0
Filter users by role
A list of users
Unauthorized
Forbidden
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.
[email protected]
John Doe
user
Possible values: Engineering
true
User created successfully
Bad request
Unauthorized
Forbidden
User with email already exists
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
ID of the user to retrieve
User details
Unauthorized
Forbidden
Resource not found
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.
ID of the user to update
John Doe
admin
Possible values: Engineering
active
Possible values: User updated successfully
Bad request
Unauthorized
Forbidden
Resource not found
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.
ID of the user to delete
User deleted successfully
Unauthorized
Forbidden
Resource not found
DELETE /v1/users/{userId} HTTP/1.1
Host: api.maisa.com
X-API-Key: YOUR_API_KEY
Accept: */*
No content