# 控制台帳戶 API

> Source: https://docs.blockvectra.com/zh-hant/api/console/

這些是控制台帳戶管理 API。產品 API（JSON-RPC、Data API 與 WebSocket）不依賴它們。帳戶專屬請求請使用 SIWE 登入傳回的 session token 進行驗證。

[下載 OpenAPI 規格（英文）](https://docs.blockvectra.com/openapi/console.yaml)

## 端點一覽

以下為英文原規格。

<div lang="en">

### Auth

- POST /auth/siwe/challenge — Get SIWE message
- POST /auth/siwe/login — SIWE login (first login creates account)
- POST /auth/logout — Log out current session

### Me

- GET /me — Current username, identity list, and current session
- PATCH /me — Update username
- POST /me/identities/siwe — Link wallet
- POST /me/identities/oauth — Link GitHub or Google identity using login code
- DELETE /me/identities/{identity_id} — Unlink identity

### Keys

- GET /keys — List API keys
- POST /keys — Create key (secret displayed only once)
- GET /keys/{key_id} — Single key
- PATCH /keys/{key_id} — Rename key
- POST /keys/{key_id}/rotate — Rotate key (new secret displayed only once)
- POST /keys/{key_id}/revoke — Revoke key (idempotent)

### Billing

- GET /plans — Plan policies and pricing parameters
- GET /balance — Balance and settlement cutoff timestamp
- GET /charges — Charge records (paginated)
- GET /topups — Top-up records (paginated)
- GET /usage — Calls and CU usage grouped by UTC date, API key, chain, and method
- GET /resets — Reset chances
- POST /resets/use — Use one reset chance

</div>
