Base URL

https://api.wsamiaw.com

Service

GET /health

Query
None
Response
{ "ok": true, "ts": 1730000000000 }
Backend source
src/index.ts:263
curl https://api.wsamiaw.com/health
GET /auth/captcha

Query
None
Response
{ "captcha_id": "…", "question": "7 + 9" }
Backend source
src/index.ts:265 · src/index.ts:4332
curl https://api.wsamiaw.com/auth/captcha
GET /stats/online

Query
None
Response
{ "online": 42, "window_sec": 300, "ts": 1730000000000 }
Backend source
src/index.ts:381 · src/friends.ts:515
curl https://api.wsamiaw.com/stats/online

Cloud catalog

GET /configs/list

Query
None
Response
text/plain —
Backend source
src/index.ts:402 · src/index.ts:2339
curl https://api.wsamiaw.com/configs/list
GET /configs/{name}

Query
name —
Response
application/json —
Backend source
src/index.ts:509 · src/index.ts:2348
curl https://api.wsamiaw.com/configs/default
GET /configs/catalog

Query
None
Response
{ "ok": true, "configs": [ { "type", "name", "author", "description", "downloads", "updated_at", "avg_stars", "review_count", "mine" } ] }
Backend source
src/index.ts:468 · src/cloudstore.ts:172 · src/cloudstore.ts:72
curl https://api.wsamiaw.com/configs/catalog
GET /scripts/catalog

Query
None
Response
{ "ok": true, "scripts": [ { "type", "name", "author", "description", "downloads", "updated_at", "avg_stars", "review_count", "mine" } ] }
Backend source
src/index.ts:467 · src/cloudstore.ts:169 · src/cloudstore.ts:72
curl https://api.wsamiaw.com/scripts/catalog

Client hand-off

POST /client/push

Body
{ "type": "theme" | "config" | "script", "name": "..." }
Response
{ "ok": true, "queued": true } — 400 invalid_push · 404 not_found
Backend source
src/index.ts:381 · src/index.ts:1249
curl -X POST https://api.wsamiaw.com/client/push \
  -H "authorization: Bearer $TOKEN" -H "content-type: application/json" \
  -d '{"type":"theme","name":"midnight"}'
GET /client/pushes

Query
None
Response
{ "ok": true, "pushes": [ { "type", "name", "created_at" } ] }
Backend source
src/index.ts:384 · src/index.ts:1282
curl https://api.wsamiaw.com/client/pushes \
  -H "authorization: Bearer $TOKEN"
POST /client/pushes/ack

Body
{ "type": "theme" | "config" | "script", "name": "..." }
Response
{ "ok": true }
Backend source
src/index.ts:387 · src/index.ts:1307
curl -X POST https://api.wsamiaw.com/client/pushes/ack \
  -H "authorization: Bearer $TOKEN" -H "content-type: application/json" \
  -d '{"type":"theme","name":"midnight"}'

Themes

GET /themes/catalog

Query
None
Response
{ "ok": true, "themes": [ { "type", "name", "author", "preview", "description", "downloads", "updated_at", "avg_stars", "review_count", "mine" } ] }
Backend source
src/index.ts:421 · src/themes.ts:151 · src/themes.ts:186
curl https://api.wsamiaw.com/themes/catalog
GET /themes/item/{name}

Query
name —
Response
{ "ok": true, "theme": { "name", "author", "preview", "downloads", "data" } }
Backend source
src/themes.ts:162 · src/themes.ts:219
curl https://api.wsamiaw.com/themes/item/midnight

Community

GET /forum/boards

Query
limit (max 50), offset (max 100000)
Response
{ "boards": [ { "id", "sort", "thread_count", "reply_count", "last_at", "last_title", "last_id", "last_author" } ], "limit", "offset", "has_more", "next_offset" }
Backend source
src/index.ts:523 · src/community.ts:538
curl "https://api.wsamiaw.com/forum/boards?limit=10"
GET /forum/threads

Query
category — · limit (max 80) · offset
Response
{ "threads": [ { "id", "title", "author", "category", "user_id", "created_at", "last_at", "reply_count", "image" } ], "limit", "offset", "has_more", "next_offset" }
Backend source
src/index.ts:523 · src/community.ts:602
curl "https://api.wsamiaw.com/forum/threads?category=general&limit=20"
GET /forum/threads/{id}

Query
id —
Response
{ "thread": { "id", "title", "body", "author", "category", "reply_count", … }, "replies": [ … ] }
Backend source
src/index.ts:523 · src/community.ts:662
curl https://api.wsamiaw.com/forum/threads/1
GET /blog/posts

Query
limit (max 50) · offset
Response
{ "posts": [ { "slug", "title", "author", "created_at" } ], "limit", "offset", "has_more", "next_offset" }
Backend source
src/index.ts:523 · src/community.ts:508
curl "https://api.wsamiaw.com/blog/posts?limit=5"
GET /blog/posts/{slug}

Query
slug —
Response
{ "post": { "slug", "title", "body", "author", "created_at" } }
Backend source
src/index.ts:523 · src/community.ts:526
curl https://api.wsamiaw.com/blog/posts/hello-world

Orders

GET /polar/orders/{id}

Query
id —
Response
{ "order_id", "status", "plan", "amount", "currency", "created_at", "updated_at", "license_key" }
Backend source
src/index.ts:519 · src/index.ts:3895
curl https://api.wsamiaw.com/polar/orders/01HQ7X3M2K9P4R