Users

User management operations

List all users

get

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: 100Optional

Maximum number of users to return

Default: 20
offsetintegerOptional

Number of users to skip

Default: 0
rolestring · enumOptional

Filter users by role

Possible values:
Responses
200
A list of users
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": "john.doe@example.com",
      "name": "John Doe",
      "role": "user",
      "status": "active",
      "createdAt": "2023-01-01T12:00:00Z"
    }
  ],
  "pagination": {
    "total": 100,
    "limit": 20,
    "offset": 0,
    "hasMore": true
  }
}

Create a new user

post

Creates a new user in the system.

Authorizations
Body
emailstring · emailRequiredExample: john.doe@example.com
namestringRequiredExample: John Doe
rolestring · enumRequiredExample: userPossible values:
departmentstringOptionalExample: Engineering
sendActivationEmailbooleanOptionalDefault: true
Responses
201
User created successfully
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": "john.doe@example.com",
  "name": "John Doe",
  "role": "user",
  "department": "Engineering",
  "sendActivationEmail": true,
  "metadata": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  }
}
{
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "email": "john.doe@example.com",
    "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"
    }
  }
}

Get user by ID

get

Retrieves a user by their ID

Authorizations
Path parameters
userIdstring · uuidRequired

ID of the user to retrieve

Responses
200
User details
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": "john.doe@example.com",
    "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"
    }
  }
}

Update user

put

Updates an existing user.

Authorizations
Path parameters
userIdstring · uuidRequired

ID of the user to update

Body
namestringOptionalExample: John Doe
rolestring · enumOptionalExample: adminPossible values:
departmentstringOptionalExample: Engineering
statusstring · enumOptionalExample: activePossible values:
Responses
200
User updated successfully
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": "john.doe@example.com",
    "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"
    }
  }
}

Delete user

delete

Deletes a user from the system.

Authorizations
Path parameters
userIdstring · uuidRequired

ID of the user to delete

Responses
204
User deleted successfully
delete
DELETE /v1/users/{userId} HTTP/1.1
Host: api.maisa.com
X-API-Key: YOUR_API_KEY
Accept: */*

No content