Skip to content

API Endpoints

The mycli API server provides REST endpoints for authentication, command management, library browsing, and catalog syncing.

MethodPathDescription
POST/v1/auth/device/startStart device auth flow
POST/v1/auth/device/tokenPoll for device token
POST/v1/auth/device/resendResend OTP
POST/v1/auth/verify-codeVerify OTP code
POST/v1/auth/refreshRefresh access token
GET/v1/auth/verifyVerify magic link
POST/v1/auth/web/loginStart web auth flow
POST/v1/auth/web/verifyVerify web auth
GET/v1/usernames/{username}/availableCheck username availability
GET/deviceDevice verification page
POST/deviceDevice verification submit
GET/healthHealth check
MethodPathDescription
GET/v1/librariesSearch libraries
GET/v1/libraries/{owner}/{slug}Library detail
GET/v1/libraries/{owner}/{slug}/releasesList releases
GET/v1/libraries/{owner}/{slug}/releases/{version}Get a release
GET/v1/libraries/{owner}/{slug}/commands/{commandSlug}Get a command
GET/v1/libraries/{owner}/{slug}/commands/{commandSlug}/versionsList command versions

Authenticated endpoints (no username required)

Section titled “Authenticated endpoints (no username required)”

All authenticated endpoints require a valid JWT in the Authorization: Bearer <token> header.

MethodPathDescription
GET/v1/meCurrent user info
PATCH/v1/me/usernameSet username
GET/v1/sessionsList sessions
DELETE/v1/sessions/{id}Revoke a session
DELETE/v1/sessionsRevoke all sessions

Authenticated endpoints (username required)

Section titled “Authenticated endpoints (username required)”
MethodPathDescription
GET/v1/me/sync-summarySync summary
POST/v1/commandsCreate a command
GET/v1/commandsList commands
GET/v1/commands/{id}Get a command
DELETE/v1/commands/{id}Delete a command (soft delete)
POST/v1/commands/{id}/versionsPublish a version
GET/v1/commands/{id}/versions/{version}Get a specific version
GET/v1/catalogGet synced catalog (supports ETag / If-None-Match)
POST/v1/libraries/{slug}/releasesCreate a release
POST/v1/libraries/{owner}/{slug}/installInstall a library
DELETE/v1/libraries/{owner}/{slug}/installUninstall a library

All entity IDs use prefixed UUIDs:

PrefixEntity
usr_User
cmd_Command
cv_Command version
ml_Mailing list
lib_Library