Client accounts

Create and manage the Admin and Reseller accounts under your software.

You see only the accounts you created, one software at a time.

Keep in mind

Status and expiry
status 1 is active and 0 blocked. An active account can still be past its expiration_date.
Levels
level 2 is Admin, 3 is Reseller.
Software
Pass soft_id to work in another software you own. Without it the actions use your main software.

List users

POST https://dev.mod.wtf/api/v2/action

methodget-users

Client accounts created by you. status: 1 not blocked, 0 blocked; check expiration_date for expiry.

Body

  • q string optional

    Substring search

  • level integer optional

    Filter by role: 2 Admin, 3 Reseller

  • status optional

    Filter: 1 normal, 0 blocked

  • limit integer optional

    Number of records to return, 1..200, default 50

  • offset integer optional

    Number of records to skip for pagination

  • soft_id integer optional

    ID of a software you own; your main software when omitted

Errors it can return

POST /api/v2/action HTTP/1.1
Host: dev.mod.wtf
Content-Type: application/json
Accept: application/json

{
    "api_key": "YOUR_API_KEY",
    "method": "get-users"
}

Create user

POST https://dev.mod.wtf/api/v2/action

methodcreate-user

Create a client account. Software and uplink are assigned automatically.

Body

  • username string required

    4-25 alphanumeric chars

  • password string required

    8-128 chars

  • level integer optional

    2 Admin or 3 Reseller, default 2

  • email string optional

    Up to 40 characters; a placeholder address is generated when omitted

  • fullname string optional

    Up to 155 characters: letters, digits, spaces, periods, apostrophes and hyphens

  • saldo integer optional

    Starting balance, default 0

  • expiration_date string optional

    YYYY-MM-DD HH:MM:SS

  • expiration_days integer optional

    0 to 18250. Admin and Reseller accounts default to 30 days

  • soft_id integer optional

    ID of a software you own; your main software when omitted

Errors it can return

POST /api/v2/action HTTP/1.1
Host: dev.mod.wtf
Content-Type: application/json
Accept: application/json

{
    "api_key": "YOUR_API_KEY",
    "method": "create-user",
    "username": "newrep1",
    "password": "abcd1234",
    "level": 3
}

Get user

POST https://dev.mod.wtf/api/v2/action

methodget-user

Client account details.

Body

  • user_id integer required

    Client account ID

  • soft_id integer optional

    ID of a software you own; your main software when omitted

Errors it can return

POST /api/v2/action HTTP/1.1
Host: dev.mod.wtf
Content-Type: application/json
Accept: application/json

{
    "api_key": "YOUR_API_KEY",
    "method": "get-user",
    "user_id": 50
}

Update user

POST https://dev.mod.wtf/api/v2/action

methodedit-user

Update one of your client accounts.

Body

  • user_id integer required

    Client account ID

  • fullname string optional

    Up to 155 characters: letters, digits, spaces, periods, apostrophes and hyphens

  • email string optional

    Up to 40 characters

  • telegram string optional

    1 to 32 letters, digits or underscores. Leading @ is optional; an empty value clears the field

  • status optional

    1 active, 0 blocked

  • saldo integer optional

    New balance

  • expiration_date string optional

    YYYY-MM-DD HH:MM:SS

  • level integer optional

    2 Admin or 3 Reseller

  • soft_id integer optional

    ID of a software you own; your main software when omitted

Errors it can return

POST /api/v2/action HTTP/1.1
Host: dev.mod.wtf
Content-Type: application/json
Accept: application/json

{
    "api_key": "YOUR_API_KEY",
    "method": "edit-user",
    "user_id": 50,
    "fullname": "Updated Name",
    "saldo": 1000
}

Delete user

POST https://dev.mod.wtf/api/v2/action

methoddelete-user

Delete a client account.

Body

  • user_id integer required

    Client account ID

  • soft_id integer optional

    ID of a software you own; your main software when omitted

Errors it can return

POST /api/v2/action HTTP/1.1
Host: dev.mod.wtf
Content-Type: application/json
Accept: application/json

{
    "api_key": "YOUR_API_KEY",
    "method": "delete-user",
    "user_id": 50
}

Block user

POST https://dev.mod.wtf/api/v2/action

methodblock-user

Block: status=0, the user can no longer sign in.

Body

  • user_id integer required

    Client account ID

  • soft_id integer optional

    ID of a software you own; your main software when omitted

Errors it can return

POST /api/v2/action HTTP/1.1
Host: dev.mod.wtf
Content-Type: application/json
Accept: application/json

{
    "api_key": "YOUR_API_KEY",
    "method": "block-user",
    "user_id": 50
}

Unblock user

POST https://dev.mod.wtf/api/v2/action

methodunblock-user

Unblock: status=1.

Body

  • user_id integer required

    Client account ID

  • soft_id integer optional

    ID of a software you own; your main software when omitted

Errors it can return

POST /api/v2/action HTTP/1.1
Host: dev.mod.wtf
Content-Type: application/json
Accept: application/json

{
    "api_key": "YOUR_API_KEY",
    "method": "unblock-user",
    "user_id": 50
}

Kick user sessions

POST https://dev.mod.wtf/api/v2/action

methodkick-user-sessions

Reset quick-login tokens and require the user to sign in again.

Body

  • user_id integer required

    Client account ID

  • soft_id integer optional

    ID of a software you own; your main software when omitted

Errors it can return

POST /api/v2/action HTTP/1.1
Host: dev.mod.wtf
Content-Type: application/json
Accept: application/json

{
    "api_key": "YOUR_API_KEY",
    "method": "kick-user-sessions",
    "user_id": 50
}

Reset user password

POST https://dev.mod.wtf/api/v2/action

methodreset-user-password

Create a one-hour password reset link for an Admin or Reseller you created.

Body

  • user_id integer required

    Client account ID

  • soft_id integer optional

    ID of a software you own; default is your main software

Errors it can return

POST /api/v2/action HTTP/1.1
Host: dev.mod.wtf
Content-Type: application/json
Accept: application/json

{
    "api_key": "YOUR_API_KEY",
    "method": "reset-user-password",
    "user_id": 50
}
Esc