Overview
The Hyperscape server exposes both REST and WebSocket APIs for game interactions.The API is primarily designed for internal use by the game client and ElizaOS agents. Direct API access requires authentication.
Base URL
Authentication
All authenticated endpoints require a Bearer token in the Authorization header:string
required
Bearer token obtained from Privy authentication
Endpoints
Health Check
endpoint
Returns server health status
Response
Response
Player
endpoint
Get current player information
endpoint
Create or update player
World State
endpoint
Get current world state snapshot
endpoint
List all world areas
Admin Endpoints
endpoint
Request server restart after current duel ends (zero-downtime deployment)
Response
Response
endpoint
Check if graceful restart is pending
Response
Response
- If no duel active: restarts immediately via SIGTERM
- If duel in progress: waits until RESOLUTION phase completes
- PM2 automatically restarts the server with new code
- Enables zero-downtime deployments for the duel arena stream
WebSocket Events
Connect to the game server via WebSocket for real-time updates:Client → Server Events
Server → Client Events
Rate Limits
Error Codes
400 Bad Request
400 Bad Request
Invalid request parameters or malformed JSON
403 Forbidden
403 Forbidden
Insufficient permissions for the requested action
404 Not Found
404 Not Found
Resource does not exist
429 Too Many Requests
429 Too Many Requests
Rate limit exceeded
500 Internal Server Error
500 Internal Server Error
Server-side error, please report to Discord
SDKs & Libraries
JavaScript SDK
Official JavaScript/TypeScript client
ElizaOS Plugin
AI agent integration plugin
Need Help?
Discord Community
Get help from the community
GitHub Issues
Report bugs or request features