User Manager: Make and manager users/wallets

To help developers use LNbits to manage their users, the User Manager extension allows the creation and management of users and wallets.
For example, a games developer may be developing a game that needs each user to have their own wallet, LNbits can be included in the developers stack as the user and wallet manager.
Created by, Ben Arc

GET /usermanager/api/v1/users
Body (application/json)
Returns 200 OK (application/json)
JSON list of users
Curl example
curl -X GET {{ request.base_url }}usermanager/api/v1/users -H "X-Api-Key: {{ user.wallets[0].adminkey }}"
GET /usermanager/api/v1/users/<user_id>
Body (application/json)
Returns 200 OK (application/json)
{"id": <string>, "name": <string>, "admin": <string>, "email": <string>, "password": <string>}
Curl example
curl -X GET {{ request.base_url }}usermanager/api/v1/users/<user_id> -H "X-Api-Key: {{ user.wallets[0].inkey }}"
GET /usermanager/api/v1/wallets
Headers
{"X-Api-Key": <string>}
Body (application/json)
Returns 200 OK (application/json)
JSON wallet data
Curl example
curl -X GET {{ request.base_url }}usermanager/api/v1/wallets -H "X-Api-Key: {{ user.wallets[0].adminkey }}"
GET /usermanager/api/v1/transactions/<wallet_id>
Headers
{"X-Api-Key": <string>}
Body (application/json)
Returns 200 OK (application/json)
JSON a wallets transactions
Curl example
curl -X GET {{ request.base_url }}usermanager/api/v1/transactions/<wallet_id> -H "X-Api-Key: {{ user.wallets[0].inkey }}"
POST /usermanager/api/v1/users
Headers
{"X-Api-Key": <string>, "Content-type": "application/json"}
Body (application/json) - "admin_id" is a YOUR user ID
{"admin_id": <string>, "user_name": <string>, "wallet_name": <string>,"email": <Optional string> ,"password": <Optional string>}
Returns 201 CREATED (application/json)
{"id": <string>, "name": <string>, "admin": <string>, "email": <string>, "password": <string>}
Curl example
curl -X POST {{ request.base_url }}usermanager/api/v1/users -d '{"admin_id": "{{ user.id }}", "wallet_name": <string>, "user_name": <string>, "email": <Optional string>, "password": < Optional string>}' -H "X-Api-Key: {{ user.wallets[0].inkey }}" -H "Content-type: application/json"
POST /usermanager/api/v1/wallets
Headers
{"X-Api-Key": <string>, "Content-type": "application/json"}
Body (application/json) - "admin_id" is a YOUR user ID
{"user_id": <string>, "wallet_name": <string>, "admin_id": <string>}
Returns 201 CREATED (application/json)
{"id": <string>, "admin": <string>, "name": <string>, "user": <string>, "adminkey": <string>, "inkey": <string>}
Curl example
curl -X POST {{ request.base_url }}usermanager/api/v1/wallets -d '{"user_id": <string>, "wallet_name": <string>, "admin_id": "{{ user.id }}"}' -H "X-Api-Key: {{ user.wallets[0].inkey }}" -H "Content-type: application/json"
DELETE /usermanager/api/v1/users/<user_id>
Headers
{"X-Api-Key": <string>}
Curl example
curl -X DELETE {{ request.base_url }}usermanager/api/v1/users/<user_id> -H "X-Api-Key: {{ user.wallets[0].adminkey }}"
DELETE /usermanager/api/v1/wallets/<wallet_id>
Headers
{"X-Api-Key": <string>}
Curl example
curl -X DELETE {{ request.base_url }}usermanager/api/v1/wallets/<wallet_id> -H "X-Api-Key: {{ user.wallets[0].adminkey }}"
POST /usermanager/api/v1/extensions
Headers
{"X-Api-Key": <string>}
Curl example
curl -X POST {{ request.base_url }}usermanager/api/v1/extensions?extension=withdraw&userid=user_id&active=true -H "X-Api-Key: {{ user.wallets[0].inkey }}" -H "Content-type: application/json"
Returns 200 OK (application/json)
{"extension": "updated"}