手册 › LynxBoard

3 API Reference

API Conventions

ItemConvention
Base URLhttp://device-IP:port (default 6556)
Data formatJSON for both requests and responses
AuthHeader Authorization: Bearer <token> for everything except login and register
Success{"success": true, "data": ...} or {"success": true, "message": ...}
Failure{"success": false, "message": "..."}
Status codes400 bad request; 401 not logged in or token expired; 403 forbidden; 404 not found; 409 account exists
  • All endpoints start with /api; other paths return the web app itself; CORS is allowed so browsers can call directly.
  • Getting a token:
curl -s -X POST http://device-IP:6556/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"username":"admin","password":"******"}'
# data.token in the response is the token, valid 7 days by default

Accounts and Permissions API

MethodPathDescription
POST/api/auth/registerRegister an account (open); a default board is created automatically
POST/api/auth/loginLog in; returns the token, user info and current board
GET/api/auth/meCurrent user info and preferences
PUT/api/auth/profileUpdate display name and preferences
GET/api/admin/checkWhether an administrator exists
POST/api/admin/setupFirst-time administrator setup (only when none exists)
GET/api/admin/usersMember list (administrator)
POST/api/admin/usersCreate a member (administrator)
DELETE/api/admin/users/:idDelete a member (administrator; cannot delete self)
PUT/api/admin/users/:id/reset-passwordReset a member's password (administrator)

Register / login request body:

{ "username": "alice", "password": "secret6+" }

Passwords need at least 6 characters; a duplicate username returns 409; a successful login returns token, user and board.

Boards, Columns and Cards API

All endpoints require a login token; id values are string identifiers returned by the API.

Boards

MethodPathDescription
GET/api/boardsBoards visible to the current user
GET/api/boards/:idFull structure of one board (columns, cards, tags)
POST/api/boardsCreate a board with {title, description}
PUT/api/boards/:idUpdate a board; the sharing switch is owner-only
DELETE/api/boards/:idDelete a board (owner)
GET/api/boards/:id/exportExport the board as JSON

Columns

MethodPathDescription
POST/api/boards/:id/columnsAdd a column with {title, color}
PUT/api/boards/:id/columns/:columnIdUpdate a column with {title, color, order, hideOlderCards}
DELETE/api/boards/:id/columns/:columnIdDelete a column

Cards

MethodPathDescription
POST/api/boards/:id/columns/:columnId/cardsAdd a card
PUT/api/boards/:id/cards/:cardIdUpdate a card (unset fields keep their values)
DELETE/api/boards/:id/cards/:cardIdDelete a card
PUT/api/boards/:id/cards/:cardId/moveMove a card with {toColumnId, toIndex}

Card request body example:

{
  "title": "Collection task A",
  "description": "Fetch and aggregate daily",
  "priority": "high",
  "tags": ["Bug"],
  "dueDate": "2026-10-30",
  "createdDate": "2026-10-25",
  "notifyTime": "2026-10-26T09:00"
}

priority takes urgent / high / medium / low; notifyTime uses the format YYYY-MM-DDTHH:mm.

Email Reminder API

MethodPathDescription
GET/api/notifications/recipientsList recipients
POST/api/notifications/recipientsAdd a recipient {name, email, enabled}
PUT/api/notifications/recipients/:idUpdate a recipient
DELETE/api/notifications/recipients/:idDelete a recipient
GET/api/notifications/smtpView the mail configuration (password never echoed)
PUT/api/notifications/smtpSave the mail configuration; a blank password keeps the original
POST/api/notifications/test-emailSend a test email