> ## Documentation Index
> Fetch the complete documentation index at: https://dev-doc.dualmindlab.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Admin Users API

> Admin user management endpoints — list, create, update, delete, and search users.

## GET /api/admin/users

List all users with pagination.

### Query parameters

| Parameter | Type    | Default | Description              |
| --------- | ------- | ------- | ------------------------ |
| `page`    | integer | 1       | Page number              |
| `limit`   | integer | 200     | Items per page (max 500) |

### Response

```json filename="Response" theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
{
  "success": true,
  "data": [
    {
      "user_id": "a1b2c3d4-...",
      "full_name": "John Doe",
      "email": "john@example.com",
      "role": "user",
      "created_at": "2025-01-01T00:00:00Z",
      "last_login_at": "2025-01-15T10:00:00Z"
    }
  ],
  "count": 50,
  "total": 1250,
  "page": 1,
  "limit": 200
}
```

## GET /api/admin/users/{id}

Get a single user by UUID.

## POST /api/admin/users

Create a new user.

### Request body

```json filename="Request Body" theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
{
  "full_name": "Jane Smith",
  "email": "jane@example.com",
  "role": "user"
}
```

## PUT /api/admin/users/{id}

Update an existing user.

### Request body

```json filename="Request Body" theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
{
  "full_name": "Jane Smith Updated",
  "email": "jane.new@example.com",
  "role": "admin"
}
```

## DELETE /api/admin/users/{id}

Delete a user by UUID.

## GET /api/admin/users/search

Search users by email or role.

### Query parameters

| Parameter | Type    | Description                            |
| --------- | ------- | -------------------------------------- |
| `email`   | string  | Partial email match (case-insensitive) |
| `role`    | string  | Exact role match (`user`, `admin`)     |
| `page`    | integer | Page number                            |
| `limit`   | integer | Items per page                         |
