API reference
The control-plane API. Base URL: your deployment (e.g.
https://chainship-dashboard.vercel.app). Auth is a Bearer account token (from
chainship login) or the browser session cookie. Most endpoints accept
either.
Auth
| Method & path | Body | Returns |
|---|
POST /api/auth/challenge | { address } | { nonce, message } to sign |
POST /api/auth/verify | { address, nonce, signature } | { token, account } + session cookie |
POST /api/auth/magic/request | { email } | sends a magic link |
GET /api/auth/magic/verify?token= | none | sets session cookie → redirects |
POST /api/auth/logout | none | clears the session |
Account
| Method & path | Auth | Returns |
|---|
GET /api/me | account | { account, capabilities } |
GET /api/credits | account | { balanceUsd, ledger } |
POST /api/credits/redeem | account | verify a Base USDC tx → credits |
Deploy
| Method & path | Auth | Notes |
|---|
GET /api/deployments | account (without one, a hosted dashboard returns an empty list) | list deployments |
POST /api/deployments | account/token | record a deploy (CLI BYO-key sync) |
POST /api/deploy | account | managed gasless deploy: { files: [{ path, contentBase64 }] } |
POST /api/x402/deploy | none | pay-per-deploy: 402 challenge → retry with X-PAYMENT and X-PAYMENT-SIGNATURE |
Delivery & analytics
| Method & path | Notes |
|---|
GET /c/<txId>/<path> | edge-cached Arweave proxy (warm = fast) |
GET /p/<linkId>?k=<token> | token-gated protected preview |
POST /api/analytics/collect | public (the a.js script posts here), no PII |
GET /api/analytics | account (paid): pageviews + vitals |
Admin (operator token)
POST /api/admin/plan, POST /api/admin/credit, GET /api/admin/treasury are guarded by
CHAINSHIP_API_TOKEN.