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. Each release carries an `assets` array of its per-platform builds, with platform, arch, sha256 and download_url — this is what `jm proj install` chooses from.
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. Send as multipart to attach files. `assets` repeats, once per per-platform build; each one's target is read from its filename unless `asset_targets` names it, as JSON like {"build.zip": "linux/arm64"}. Platforms: linux, macos, windows, android, ios. Architectures: x86_64, arm64, x86. A release made of assets alone is valid — `file` is only for projects with a single main installer. A version the project already has is refused with 409 `version_exists`.
params: version, notes?, highlights?, file? | assets? | download_url?, source?, asset_targets?, install_path?, installer_path?, uninstaller_path?
GET /api/v1/releases/{id}/download 🔒 token
Download a release's main installer.
GET /release/asset/{id}/download public
Download one per-platform build. The id comes from a release's `assets` array; the URL is also given there as download_url. Public for a public project.
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) and device name (the machine it landed on, shown grouped on your Installed apps page).
params: app_id, version, path?, device?
DELETE /api/v1/installed/{app_id} 🔒 token
Remove an app from your installed list. ?device=<name> removes only that machine's copy; without it, every machine's.

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, or finished resumable uploads by id.
params: file and/or upload_id (repeatable), folder?, visibility?
POST /api/v1/drive/uploads 🔒 token
Start (or find again) a resumable upload. Same file again with the same key resumes it.
params: JSON: name, size, key?
GET /api/v1/drive/uploads/{id} 🔒 token
How many bytes of a resumable upload arrived.
PUT /api/v1/drive/uploads/{id} 🔒 token
Send the next piece (up to 16 MB). Headers: Upload-Offset, optional Upload-SHA256.
params: raw bytes
DELETE /api/v1/drive/uploads/{id} 🔒 token
Cancel a resumable upload.
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
Move a file or folder to the trash (deleted for good after 30 days).
GET /api/v1/drive/search?q={text} 🔒 token
Search the whole drive by name; each result has its folder path.
POST /api/v1/drive/{id}/link-settings 🔒 token
Set a public file's link: expiry date, password, download limit. Only the fields you send change.
params: JSON: expiry (YYYY-MM-DD or empty), password, remove_password, download_limit
POST /api/v1/drive/import 🔒 token
Import a file from a share link (Google Drive, Dropbox, OneDrive or a direct link) into the drive, as a private file. Returns 202 and an import job.
params: JSON: url, folder?
GET /api/v1/drive/imports 🔒 token
Your imports from the last day, newest first.
GET /api/v1/drive/imports/{id} 🔒 token
One import: status queued, running, done, failed or cancelled, and bytes so far.
DELETE /api/v1/drive/imports/{id} 🔒 token
Cancel an import.
GET /api/v1/drive/trash 🔒 token
List the trash, newest first, with when each item is deleted for good.
POST /api/v1/drive/{id}/restore 🔒 token
Restore an item from the trash (to the top of the drive if its folder is gone).
DELETE /api/v1/drive/trash/{id} 🔒 token
Delete one item in the trash for good.
DELETE /api/v1/drive/trash 🔒 token
Empty the trash.

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).

JM Chat bots

A bot is a chat account a person owns (make one on My bots). It authenticates with its own jmb_ key, which works only on these endpoints. It reads private chats with it and the groups members added it to (only messages sent after it joined), writes first only to its owner, and every read and send is logged for the owner.

GET /api/v1/bot/me 🔒 token
The bot: {id, username, name, owner, groups}.
GET /api/v1/bot/messages?after={id}&limit=100 🔒 token
New messages for the bot, oldest first, after the last id it saw: {messages:[{id, conversation:{type:'dm',user_id}|{type:'group',group_id,name}, sender, text, reply_to_id, attachment, edited, sent_at}], has_more, next_after}. Private messages it receives are marked read.
POST /api/v1/bot/send 🔒 token
Send {user_id | group_id, text, reply_to_id?}. A bot may write to its owner, to someone who wrote to it, or in a group it is in; at most 30 messages a minute, 4000 characters each.
params: user_id | group_id, text, reply_to_id?

Direct Install (devices)

Run jm service install (or 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. The agent authenticates with a per-device jmd_ token issued at register, which is scoped to that machine's job loop and is revoked when the device is unlinked.

POST /api/v1/devices/register 🔒 token
Register/refresh this machine as a device ({name, platform, want_agent_token?}). With want_agent_token the response carries a one-time jmd_ agent token for this device; store it and use it for poll/report instead of your account token. Registering again rotates it.
params: name, platform, want_agent_token?
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). Authenticate with the device's jmd_ agent token. An account token is accepted only for a device that has never been issued one.
POST /api/v1/devices/jobs/{id} 🔒 token
Report a job result ({result_code, log, needs_admin}). Same auth as poll, and the job must belong to the calling device.
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.