Skip to main content

Usage

This guide walks through day-to-day operation of a self-hosted SwissKnife instance: signing in, checking your balance, receiving and sending payments over Lightning and on-chain Bitcoin, and automating everything with scoped API keys.

Every operation described here is available both from the Dashboard UI and from the REST API. The full, always-up-to-date endpoint reference (request/response schemas, required permissions, and an interactive playground) lives at api.numeraire.tech/docs. When self-hosting, the same API is served by your own instance (default port 3000 for the all-in-one image), so substitute your instance URL for the examples below.

tip

The /v1/me endpoints are the main access point for an authenticated account. Account settings and API keys are account-scoped, while balances, invoices, payments, contacts, and Bitcoin addresses require an explicit wallet path: /v1/me/wallets/{wallet_id}/....

Signing in​

On first launch, create the initial Admin account with a username and password. You can then create additional accounts and enable their own local logins through the Account directory. Each account owns its wallets and uses the same ownership model as an OAuth2/OIDC deployment.

First launch (initial setup)​

When the dashboard starts, it checks setup status via GET /v1/system/setup, which returns:

  • welcome_complete — whether the welcome flow has been completed.
  • sign_up_complete — whether the Admin account has been created.

Complete the welcome step (the dashboard calls POST /v1/system/mark-welcome-complete), then choose the Admin account's username and password, with an optional display name. Passwords must contain at least 15 characters and no more than 1024 UTF-8 bytes.

# Create the initial Admin account (JWT auth provider only)
curl -X POST https://your-instance:3000/v1/auth/sign-up \
-H 'Content-Type: application/json' \
-d '{ "username": "admin", "display_name": "Alice", "password": "<your-admin-password>" }'
# => { "token": "<jwt>" }
note

Sign-up is only available when SwissKnife is configured with the JWT auth provider. If you use OAuth2 / OIDC, the Admin identity and login are handled by your external OpenID provider via redirect, and you do not create a password here. See the Authentication configuration page.

Subsequent logins​

Authenticate with your username and password to obtain a JWT:

curl -X POST https://your-instance:3000/v1/auth/sign-in \
-H 'Content-Type: application/json' \
-d '{ "username": "admin", "password": "<your-admin-password>" }'
# => { "token": "<jwt>" }

Send the returned token as a Bearer credential on subsequent requests:

curl https://your-instance:3000/v1/me \
-H 'Authorization: Bearer <jwt>'

The initial local-JWT account is granted all administrative permissions. For programmatic access with independently revocable credentials and no unnecessary admin scopes, use API keys instead.

For another local account, an administrator first enables its login and shares the one-time activation code. Open the dashboard's activation/reset page to choose a password, then sign in with the assigned username. See account administration for local login management and resets.

Checking your balance​

Fetch your account, select one of its wallets, then request the balance for that wallet:

curl https://your-instance:3000/v1/me/wallets \
-H 'Authorization: Bearer <jwt>'

curl https://your-instance:3000/v1/me/wallets/<wallet-id>/balance \
-H 'Authorization: Bearer <jwt>'

Wallets embedded in an account include asset metadata and balances, but omit payments, invoices, addresses, contacts, and other related resources. Fetch the selected wallet or one of its child routes by ID when that data is needed.

Native BTC balances are reported in millisatoshis (msat) with these fields:

FieldMeaning
available_msatAmount available to spend.
reserved_msatAmount reserved for pending outgoing payments.
received_msatTotal amount received.
sent_msatTotal amount sent (settled outgoing payments).
fees_paid_msatTotal routing/network fees paid.

Account-scoped /v1/me routes require authentication and enforce wallet ownership; they do not consume administrative permission scopes.

The dashboard loads the full account wallet list into its account context. The wallet selector in the header controls every wallet-scoped page and persists active_wallet_id in your account preferences; changing wallets does not infer or silently fall back to the first wallet.

Where to go next​

  • Payments: receive, send, estimate fees, and manage on-chain addresses.
  • Events: subscribe to settlement notifications and handle reconnects.
  • Account administration: manage accounts and permissions.
  • API keys: connect applications with separately revocable credentials.
  • Browse the complete, interactive endpoint reference at api.numeraire.tech/docs.
  • Configure liquidity providers and the on-chain wallet in Configuration.
  • Review the permission model in Authorization.