← Back

API Documentation

Base URL: https://access-api.akiru.online

Authentication

Every request must include your API key as a Bearer token. Create keys from your dashboard. The raw key is shown once — store it securely.

Authorization: Bearer KMA_live_xxx

Scopes

Each key carries scopes that limit what it can do. Requests to an endpoint your key doesn't have the scope for return 403.

Rate limits

40 requests per 60 seconds, per key. Exceeding it returns 429 with a Retry-After header (seconds). Live headroom for each key is shown on your keys page.

POST /api/v1/account/online

Bring an account online. Resolves the access token, stores the profile, and returns it with a localconfig. Requires account:write.

curl -X POST "https://access-api.akiru.online/api/v1/account/online" \
  -H "Authorization: Bearer KMA_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{"access_token":"<your-access-token>"}'

Response

{
  "ok": true,
  "data": {
    "status": "online",
    "account": { "accountId": 123, "nickname": "…", "level": 60, "region": "…", "expiry_time": 0 },
    "localconfig": { "verAddr": "https://access-api.akiru.online/cfg/<token>/" }
  }
}

POST /api/v1/account/offline

Mark an account offline. Send the accountId (preferred) or an access_token. Requires account:write.

curl -X POST "https://access-api.akiru.online/api/v1/account/offline" \
  -H "Authorization: Bearer KMA_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{"accountId":123}'

GET /api/v1/account/data

Read-only. Returns the current profile for an access token without changing its state. Requires account:read.

curl "https://access-api.akiru.online/api/v1/account/data?access_token=<your-access-token>" \
  -H "Authorization: Bearer KMA_live_xxx"

Errors

All errors return { "ok": false, "error": "..." } with an appropriate status: 401 (missing/invalid key), 403 (missing scope), 400 (bad input), 429 (rate limited), 502/504 (upstream failure).