Skip to content

Admin Users API

Create, list, and manage user accounts via the Admin API.

Manage users at the instance level. These endpoints use the /users/api/v1/user base path.

List Users

GET /users/api/v1/user

Auth: Admin

List all registered users with pagination.

Parameters

FieldTypeRequiredDescription
limitinteger (query)NoItems per page (default 20)
offsetinteger (query)NoNumber of items to skip

Response 200

Array of user objects:

FieldTypeDescription
idstringUser UUID
usernamestringUsername
emailstringEmail address
is_adminbooleanWhether user has admin privileges
wallet_countintegerNumber of wallets
created_atstringISO 8601 creation timestamp
json
[
  {
    "id": "user-uuid-1",
    "username": "satoshi",
    "email": "satoshi@example.com",
    "is_admin": false,
    "wallet_count": 3,
    "created_at": "2024-01-15T10:30:00Z"
  },
  {
    "id": "user-uuid-2",
    "username": "admin",
    "email": "admin@example.com",
    "is_admin": true,
    "wallet_count": 1,
    "created_at": "2024-01-10T08:00:00Z"
  }
]

Get User

GET /users/api/v1/user/{user_id}

Auth: Admin

Get details of a specific user.

Parameters

FieldTypeRequiredDescription
user_idstring (path)YesUser UUID

Response 200

FieldTypeDescription
idstringUser UUID
usernamestringUsername
emailstringEmail address
is_adminbooleanWhether user has admin privileges
wallet_countintegerNumber of wallets
created_atstringISO 8601 creation timestamp
json
{
  "id": "user-uuid-1",
  "username": "satoshi",
  "email": "satoshi@example.com",
  "is_admin": false,
  "wallet_count": 3,
  "created_at": "2024-01-15T10:30:00Z"
}

Create User

POST /users/api/v1/user

Auth: Admin

Create a new user account.

Parameters

FieldTypeRequiredDescription
usernamestringYesUsername for the new account
passwordstringYesAccount password
emailstringNoEmail address

Response 201

FieldTypeDescription
idstringNew user UUID
usernamestringUsername
emailstringEmail address
json
{
  "id": "user-uuid-new",
  "username": "newuser",
  "email": "new@example.com"
}

Update User

PUT /users/api/v1/user/{user_id}

Auth: Admin

Update an existing user's details.

Parameters

FieldTypeRequiredDescription
user_idstring (path)YesUser UUID
usernamestringNoNew username
emailstringNoNew email
is_adminbooleanNoGrant or revoke admin privileges

Response 200

json
{
  "id": "user-uuid-1",
  "username": "satoshi",
  "email": "updated@example.com",
  "is_admin": false
}

Delete User

DELETE /users/api/v1/user/{user_id}

Auth: Super User

Destructive Operation

Deleting a user permanently removes their account, all wallets, and all payment data. This action cannot be undone.

Parameters

FieldTypeRequiredDescription
user_idstring (path)YesUser UUID

Response 200

json
{
  "detail": "User deleted"
}

Adjust User Balance

PUT /users/api/v1/user/{user_id}/balance

Auth: Admin

Add or subtract balance from a user's default wallet.

Parameters

FieldTypeRequiredDescription
user_idstring (path)YesUser UUID
amountintegerYesAmount in satoshis (positive to add, negative to subtract)

Response 200

FieldTypeDescription
user_idstringUser UUID
new_balanceintegerUpdated balance in millisatoshis
json
{
  "user_id": "user-uuid-1",
  "new_balance": 60000
}

News · Shop · SaaS · Telegram · Released under the MIT License.