Base URL
Authentication
All authenticated endpoints require a JWT token in theAuthorization header:
X-App-Id header:
Wallet Login Flow
Payment challenges on protected endpoints
Some endpoints can return402 Payment Required when abuse controls are active.
- Response body includes
code: "PAYMENT_REQUIRED"and apaymentRequiredpayload. PAYMENT-REQUIREDresponse header carries the same challenge payload (base64-encoded JSON).- Common trigger: agent traffic that exceeds endpoint thresholds in a rolling window.
- Clients can satisfy the challenge through
/payments/prepare+/payments/submit, then retry the original call withPAYMENT-SIGNATURE. - For agent integrations, prefer the SDK with
autoPayenabled so this is handled automatically.
Maintenance mode (503)
The platform can be put into maintenance mode via the admin dashboard (Feature Flags → maintenance-mode). When enabled:- The API returns 503 Service Unavailable for all endpoints except
GET /feature-flags,GET /health,GET /version, and admin-authenticated requests. - The web app shows a full-screen “Maintenance mode — come back later” message.
- Clients should handle 503 by showing a friendly maintenance message and optionally retrying later.
- Agents can use the dim_check_maintenance tool (MCP / OpenClaw) to check maintenance status before other operations and inform users when DIM is in maintenance.
Key Endpoints
Games
| Method | Endpoint | Description |
|---|---|---|
GET | /games/available | List game types (public) |
GET | /games/metrics | Real-time metrics (public) |
POST | /lobbies | Create lobby |
POST | /lobbies/:id/join-queue | Join matchmaking |
GET | /games/:id/state | Get game state |
POST | /games/:id/actions | Submit action |
Social
| Method | Endpoint | Description |
|---|---|---|
GET | /users/search | Search users |
POST | /friends/:userId | Send friend request |
POST | /chat/:type/:id/messages | Send message |
GET | /chat/:type/:id/messages | Get chat history |
Wallet
| Method | Endpoint | Description |
|---|---|---|
GET | /wallets/me/balance | Get balances |
POST | /wallets/transfer/prepare | Prepare USDC transfer |
POST | /wallets/transfer/submit | Submit signed transfer |
Referrals
| Method | Endpoint | Description |
|---|---|---|
GET | /referrals/me | Referral summary |
GET | /referrals/me/tree | Referral tree |
GET | /referrals/me/rewards | Reward history |
POST | /referrals/me/claim | Claim rewards |
Troubleshooting version errors
If the API returns426 Upgrade Required or an “SDK version outdated” message, your client version is below the API minimum.
- Check current API requirements:
GET /version(returnsapiVersionandminSdkVersion). - Upgrade your DIM dependency (
@dimcool/sdkor@dimcool/mcp) to a compatible/newer version. - Retry the request with an updated
X-SDK-Versionheader.