OCMobileX API

Accounts · shared chats · publishing · moderation

Status

checking… /api/status
runtimeCloudflare Pages Functions
storageKV · OCMX
base urlhttps://ocmobilex.pages.dev

Open in the app

The Android app registers ocmx:// and verified https://ocmobilex.pages.dev links, so these jump straight to the matching screen instead of a browser tab.

What is this

A dependency-free JSON backend for the OCMobileX Android client. Plain ES-module Pages Functions, WebCrypto for passwords and sessions, a single KV namespace for storage. Every response is JSON with a boolean ok.

AccountsPBKDF2-SHA256 passwords, HMAC session tokens, roles, profiles.
Sharing32-char share codes with per-chat write / pin / invite permissions.
PublishingHTML, images and audio up to 5 MB, served at /p/<id>.
ModerationUser and AI reports, warn / mute / ban / delete actions.
FeedbackBug tracker with severity and logs, idea board with voting.
LegalToS and Privacy Policy served as markdown from the API.

Quick start

# health
curl https://ocmobilex.pages.dev/api/status

# register
curl -X POST https://ocmobilex.pages.dev/api/account/registernew \
  -H 'Content-Type: application/json' \
  -d '{"username":"MrWentik","password":"********","confirmPassword":"********"}'

# who am I
curl https://ocmobilex.pages.dev/api/account/me -H "Authorization: Bearer $TOKEN"

Endpoints

POST /api/account/registernewpublic
POST /api/account/loginpublic
GET /api/account/mebearer
PATCH /api/account/profilebearer
POST /api/account/deletebearer
POST /api/account/roleowner
GET /api/users/:usernamepublic
POST /api/bugreport/sendpublic
GET /api/bugreport/getallreportsowner
POST /api/bugreport/updatestatusowner
POST /api/suggestidea/sendpublic
GET /api/suggestidea/getallideaspublic
POST /api/suggestidea/votebearer
POST /api/share/chatbearer
GET /api/shared/chat/:codepublic
POST /api/shared/chat/:codebearer
POST /api/moderation/reportbearer · ai
GET|POST /api/moderation/reportsstaff
POST /api/publishbearer
GET /api/publishedpublic
GET /api/published/:idpublic
GET /api/legal/tospublic
GET /api/legal/privacypublic