API Reference
API Reference
Current REST endpoints implemented in the LaWallet NWC repository.
Status
The full OpenAPI/Swagger reference is still planned for the roadmap. Until then, this page documents the routes that currently exist in lawallet-nwc.
Authentication
POST /api/jwt— Exchange a NIP-98 signed request for a JWTGET /api/jwt— Validate a JWTGET /api/jwt/protected— Example protected routePOST /api/jwt/protected— Example protected route
Users and Lightning Addresses
GET /api/users/me— Load or create the current userGET /api/users/[userId]/cards— List a user's cardsGET /api/users/[userId]/role— Read a user's rolePUT /api/users/[userId]/role— Update a user's rolePUT /api/users/[userId]/lightning-address— Assign or replace a lightning usernamePUT /api/users/[userId]/nwc— Store or replace an NWC URIGET /api/lightning-addresses— Admin list of lightning addressesGET /api/lightning-addresses/counts— Admin summary countsGET /api/lightning-addresses/relays— Relay informationGET /api/lud16/[username]— LUD-16 payRequest responseGET /api/lud16/[username]/cb— LUD-16 callback
Cards
GET /api/cards— List cardsPOST /api/cards— Create a cardGET /api/cards/counts— Card countsGET /api/cards/[id]— Card detailDELETE /api/cards/[id]— Delete a cardGET /api/cards/[id]/write— Card write payloadGET /api/cards/[id]/scan— Card scan responseOPTIONS /api/cards/[id]/scan— CORS preflight for card scanGET /api/cards/[id]/scan/cb— Card scan callbackOPTIONS /api/cards/[id]/scan/cb— CORS preflight for scan callbackGET /api/cards/otc/[otc]— Resolve OTC valuePOST /api/cards/otc/[otc]/activate— Activate OTC flow
Card Designs
GET /api/card-designs/list— List card designsGET /api/card-designs/count— Count card designsGET /api/card-designs/get/[id]— Card-design detailPOST /api/card-designs/import— Import card designs
Settings and Administration
GET /api/settings— Read settingsPOST /api/settings— Update settingsGET /api/admin/assign— Read admin-assignment statusPOST /api/admin/assign— Assign admin roleGET /api/root/assign— Read root-assignment statusPOST /api/root/assign— Assign root/admin bootstrap role
Remote Connections
GET /api/remote-connections/[externalDeviceKey]— Remote device bootstrap metadataPOST /api/remote-connections/[externalDeviceKey]/cards— Initialize a remote card
Other
POST /api/waitlist/subscribe— Subscribe an email to the waitlist
Not Yet Implemented in This Repo
The following routes and features are mentioned elsewhere in roadmap docs, but they are not part of the current API surface:
/api/auth/login/api/auth/refresh/api/auth/nostr/api/addresses/*- Redirect-management endpoints
/api/webhooks/*/api/payments.well-known/nostr.json
Auth Notes
Protected routes use either:
Authorization: Nostr <base64>for direct NIP-98 authenticationAuthorization: Bearer <jwt>for JWT-backed access after exchanging a NIP-98 request atPOST /api/jwt
See the JWT Authentication guide for the current auth flow.