{/* Generated by website/scripts/gen-api-reference.mjs from backend/docs/swagger.json. Do not edit by hand. */}
The API is JSON over HTTP. Errors are { "error": "message" }. Web clients authenticate with an httpOnly session cookie plus an X-CSRF-Token header on mutations; the desktop app uses a Bearer token.
When the server runs with server.dev = true, an interactive Swagger UI is served at /api/docs/.
| Method |
Path |
Summary |
Access |
GET |
/api/admin/admins |
List admins |
Server Admin. |
PUT |
/api/admin/admins/{username} |
Give an account admin access |
Server Owner, with their password. |
DELETE |
/api/admin/admins/{username} |
Remove an account’s admin access |
Server Owner, with their password. |
GET |
/api/admin/audit |
Recent admin actions |
Server Admin. |
POST |
/api/admin/backup |
Download an encrypted backup |
Server Owner, with their password. |
GET |
/api/admin/config |
Editable server settings |
Server Admin. |
PATCH |
/api/admin/config |
Change server settings |
Server Admin. Owner-only settings need the owner and their password. |
POST |
/api/admin/delete |
Delete the server |
Server Owner, with their password and the server domain typed as confirmation. |
GET |
/api/admin/invites |
List invitation codes |
Server Admin. |
POST |
/api/admin/invites |
Create an invitation code |
Server Admin. |
DELETE |
/api/admin/invites/{code} |
Revoke an invitation code |
Server Admin. |
GET |
/api/admin/overview |
Server overview |
Server Admin. |
POST |
/api/admin/owner/transfer |
Hand the owner role to another account |
Server Owner. |
POST |
/api/admin/reset |
Reset server data |
Server Owner, with their password and the phrase RESET. |
POST |
/api/admin/restore |
Restore a backup |
Server Owner, with their password, the archive passphrase and the phrase RESTORE. |
| Method |
Path |
Summary |
Access |
GET |
/api/captcha/challenge |
Get a sign-up proof-of-work challenge |
Public. |
POST |
/api/login |
Log in and obtain a session token |
Public |
POST |
/api/logout |
Log out and invalidate session |
Authenticated |
POST |
/api/register |
Register a new account |
Public. |
| Method |
Path |
Summary |
Access |
GET |
/api/channels |
List channels for the current user |
Authenticated |
POST |
/api/channels |
Create a channel or direct message |
Authenticated |
GET |
/api/channels/explore |
Search public channels |
Authenticated |
GET |
/api/channels/{id} |
Get a channel by ID |
Authenticated |
PATCH |
/api/channels/{id} |
Update channel settings |
Authenticated |
DELETE |
/api/channels/{id} |
Delete or clear a channel/direct message |
Authenticated |
GET |
/api/channels/{id}/members |
List members of a channel |
Authenticated |
POST |
/api/channels/{id}/members |
Add multiple members to a channel by username |
Authenticated |
DELETE |
/api/channels/{id}/members/{uid} |
Remove a member from a channel |
Authenticated |
POST |
/api/join/{link} |
Join a channel via a unique invite link |
Authenticated |
| Method |
Path |
Summary |
Access |
GET |
/api/channels/{id}/messages |
List recent messages for a channel |
Authenticated |
| Method |
Path |
Summary |
Access |
GET |
/api/server-info |
Public server information |
Public. |
GET |
/api/version |
Get the current server build version |
Public |
| Method |
Path |
Summary |
Access |
GET |
/api/me |
Get current authenticated user |
Authenticated |
GET |
/api/users |
Search globally for users by username |
Authenticated |
PATCH |
/api/users/me |
Update current user profile |
Authenticated |
DELETE |
/api/users/me |
Delete current user account |
Authenticated |
GET |
/api/users/{id} |
Get a user by ID |
Authenticated |
GET |
/api/users/{id}/presence |
Get presence status for a user |
Authenticated |