JM Tech Power

🔌 API Docs

A token-authenticated JSON REST API. Prefer the command line? jm CLI Docs →

Base URLhttps://jmtechpower.com/api/v1
AuthAuthorization: Bearer <token>
FormatJSON (uploads use multipart/form-data)

Quick start

# 1) get a token (or use the jm CLI: jm token create)
curl -s -X POST https://jmtechpower.com/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{"username":"you@example.com","password":"••••"}'

# 2) call the API with it
curl -s https://jmtechpower.com/api/v1/user -H "Authorization: Bearer jm_xxx"

Authentication

Most endpoints need a token in the Authorization: Bearer <token> header. Get one from the API Tokens page or via jm auth login.

GET /api/v1/ping public
Health check. Returns service info.
POST /api/v1/auth/login public
Exchange username/email + password for a token.
params: username, password, name?
GET /api/v1/user 🔒 token
The current user + storage usage (+ admin flag).
PATCH /api/v1/user 🔒 token
Update account settings.
params: nickname?, bio?
GET /api/v1/tokens 🔒 token
List your active API tokens.
POST /api/v1/tokens 🔒 token
Create a token (returned once).
params: name?
DELETE /api/v1/tokens/{id} 🔒 token
Revoke a token.
POST /api/v1/cli/auth/start public
Begin the browser Authorize flow. Returns a device_code + authorize_url.
params: device_name?
POST /api/v1/cli/auth/poll public
Poll until the user approves; returns the token.
params: device_code
GET /jm/version public
Latest jm CLI version + download/install URLs.

Apps & releases

Manage applications and their release history.

GET /api/v1/apps 🔒 token
List apps.
params: query: mine, search
GET /api/v1/apps/{id} 🔒 token
App detail + releases.
POST /api/v1/apps 🔒 token
Create a project (published immediately). JSON or multipart with a file/source.
params: name, description, version, category, supported_os, license_type, install_path?, installer_path?, file? | download_url?
DELETE /api/v1/apps/{id} 🔒 token
Delete an app (with releases + files).
POST /api/v1/apps/{id}/releases 🔒 token
Publish a new release.
params: version, notes?, highlights?, file? | download_url?
GET /api/v1/releases/{id}/download 🔒 token
Download a release file.
GET /api/v1/installed 🔒 token
Your installed apps + which have updates (synced with the website).
POST /api/v1/installed 🔒 token
Mark an app installed at a version; optional install path (so the app/installer can report where it landed for a complete uninstall).
params: app_id, version, path?
DELETE /api/v1/installed/{app_id} 🔒 token
Remove an app from your installed list.

Articles

Create and manage articles.

GET /api/v1/articles 🔒 token
List articles.
params: query: mine, search, category
GET /api/v1/articles/{id} 🔒 token
Article detail (full content).
POST /api/v1/articles 🔒 token
Create an article.
params: title, content, category, summary?, tags?, published?
PATCH /api/v1/articles/{id} 🔒 token
Update fields.
params: title?, content?, category?, tags?, summary?, published?
DELETE /api/v1/articles/{id} 🔒 token
Delete an article (with comments + likes).

JMDrive

Personal file storage with shareable links.

GET /api/v1/drive 🔒 token
List files/folders.
params: query: folder
POST /api/v1/drive/upload 🔒 token
Upload file(s). multipart.
params: file (repeatable), folder?, visibility?
POST /api/v1/drive/folder 🔒 token
Create a folder.
params: name, parent?, visibility?
GET /api/v1/drive/{id}/download 🔒 token
Download a file (folders download as a zip).
POST /api/v1/drive/{id}/share 🔒 token
Make public + return a share link.
params: password?, limit?
DELETE /api/v1/drive/{id} 🔒 token
Delete a file or folder.

Admin

Official-account only (token belongs to JM Tech Power Official). Used by the desktop Admin tab and jm admin.

GET /api/v1/admin/stats 🔒 token
Site stats (users, apps, pending, approved, articles).
GET /api/v1/admin/apps 🔒 token
All apps incl. pending, with approval status.
POST /api/v1/admin/apps/{id}/approve 🔒 token
Approve an app.
POST /api/v1/admin/apps/{id}/revoke 🔒 token
Send an app back to pending.
DELETE /api/v1/admin/apps/{id} 🔒 token
Delete an app (with releases + files).
GET /api/v1/admin/users 🔒 token
List all users.

JM OAuth (Sign in with JM Tech Power)

A full OpenID Connect provider — like "Sign in with Google". Register an app at /settings/oauth, supports Authorization Code + PKCE, signed id_token (RS256), refresh tokens and revocation. Discovery: /oauth/openid-configuration · keys: /oauth/jwks. Full integration guide →

GET /oauth/authorize?client_id=&redirect_uri=&response_type=code&scope=openid%20profile%20email&state=&nonce=&code_challenge=&code_challenge_method=S256&access_type=offline public
Login + consent; redirects to redirect_uri with ?code=&state=. Add scope 'openid' for an id_token; access_type=offline for a refresh_token.
POST /oauth/token public
grant_type=authorization_code (code, redirect_uri, client_id, code_verifier|client_secret) → {access_token, id_token?, refresh_token?, expires_in}. Also grant_type=refresh_token (refresh_token, client_id).
GET /oauth/userinfo 🔒 token
Bearer access_token → {sub, name, preferred_username, picture?, email?, email_verified?}.
GET /oauth/jwks public
JSON Web Key Set — RSA public key(s) to verify id_token signatures.
POST /oauth/revoke public
RFC 7009 — revoke an access or refresh token ({token}).
GET /oauth/openid-configuration public
OIDC discovery document (issuer, endpoints, jwks_uri, supported scopes/claims).

Direct Install (devices)

Run jm link on a machine to register it as a device; the website's Direct Install button then queues install jobs the linked machine picks up via long-poll.

POST /api/v1/devices/register 🔒 token
Register/refresh this machine as a device ({name, platform}).
GET /api/v1/devices 🔒 token
List your devices (with online flag).
GET /api/v1/devices/poll?device={id}&wait=25 🔒 token
Long-poll for the next queued install job (marks it running).
POST /api/v1/devices/jobs/{id} 🔒 token
Report a job result ({result_code, log, needs_admin}).
DELETE /api/v1/devices/{id} 🔒 token
Unlink a device.

Chat

Direct messages and group chats.

GET /api/v1/chat/groups 🔒 token
List your chat groups.
GET /api/v1/chat/messages 🔒 token
Read a conversation.
params: query: group | with, limit
POST /api/v1/chat/send 🔒 token
Send a message.
params: message, to | group

Errors

Errors return a non-2xx status and a JSON body like {"error":"forbidden","message":"…"}. Common codes: 400 bad request, 401 unauthorized, 403 forbidden, 404 not found, 410 gone, 413 over quota.