List Admins
Retrieve a paginated list of all administrator accounts.
Endpoint
GET
/auth/admin/usersList all admin users with optional filtering and pagination.
Headers
| Parameter | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Bearer {access_token} |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | No | Search by email or full name |
role | string | No | Filter by roleValues: admin, operator, viewer, finance |
active | boolean | No | Filter by active status |
limit | integer | No (default: 20) | Page size |
offset | integer | No (default: 0) | Page offset |
Response- List of admin users
json
{
"admins": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"email": "admin@example.com",
"full_name": "John Doe",
"role": "admin",
"is_active": true,
"mfa_enabled": true,
"last_login_at": "2025-01-14T10:30:00Z",
"created_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-14T10:30:00Z"
}
],
"pagination": {
"limit": 20,
"offset": 0,
"total_count": 15
}
}Error Responses
| Status | Code | Description |
|---|---|---|
| 403 | forbidden | Admin role required |
Get Admin Details
Retrieve details of a specific administrator.
Endpoint
GET
/auth/admin/users/{userID}Get detailed information about a specific admin user.
Headers
| Parameter | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Bearer {access_token} |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
userID | string | Yes | UUID of the admin user |
Response- Admin user details
json
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"email": "admin@example.com",
"full_name": "John Doe",
"role": "admin",
"is_active": true,
"mfa_enabled": true,
"last_login_at": "2025-01-14T10:30:00Z",
"created_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-14T10:30:00Z"
}Error Responses
| Status | Code | Description |
|---|---|---|
| 404 | not_found | Admin user not found |
| 403 | forbidden | Admin role required |
Update Admin
Update an administrator's profile.
Endpoint
PATCH
/auth/admin/users/{userID}Update an admin user's profile. All fields are optional - only provided fields will be updated.
Headers
| Parameter | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Bearer {access_token} |
Content-Type | string | Yes | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
userID | string | Yes | UUID of the admin user to update |
Request Body- Fields to update
json
{
"email": "newemail@example.com",
"full_name": "Jane Doe",
"role": "operator",
"is_active": true
}Response- Updated admin user
json
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"email": "newemail@example.com",
"full_name": "Jane Doe",
"role": "operator",
"is_active": true,
"mfa_enabled": true,
"updated_at": "2025-01-14T12:00:00Z"
}Error Responses
| Status | Code | Description |
|---|---|---|
| 400 | validation_failed | Invalid email format or role |
| 404 | not_found | Admin user not found |
| 403 | forbidden | Admin role required |
Request Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| string | No | New email address | |
| full_name | string | No | New full name |
| role | string | No | New role: admin, operator, viewer, finance |
| is_active | boolean | No | Active status |
Admin Roles
Understanding the different administrator roles and their permissions.
Role Definitions
| Role | Description | Key Permissions |
|---|---|---|
| admin | Full administrative access | All permissions including user management |
| operator | Operational access | Create accounts, transactions, view data |
| viewer | Read-only access | View accounts, transactions, reports |
| finance | Finance operations | Manage processors, settlements, reports |
Permission Matrix
| Permission | Admin | Operator | Viewer | Finance |
|---|---|---|---|---|
| manage_admins | Yes | No | No | No |
| view_accounts | Yes | Yes | Yes | Yes |
| create_account | Yes | Yes | No | No |
| view_transactions | Yes | Yes | Yes | Yes |
| create_transaction | Yes | Yes | No | No |
| manage_processors | Yes | No | No | Yes |
| manage_pos_terminals | Yes | No | No | Yes |
| view_reports | Yes | No | No | Yes |