| /status | GET | get online user count and active game count | none | none | ```ts
{
  users: int,
  games: int
}
``` | 
| /auth/login | POST | log in with email or username | ```ts
{
  email: string,
  password: string
}
``` | none | empty response with the set_cookie header | 
| /auth/signup | POST | sign up | ```ts
{
  username: string,
  email: string,
  password: string
}
``` | none | empty response with the set_cookie header | 
| /user/info | POST | get user info by id | ```ts
{
	id:
	userID;
}
``` | none | ```ts
{
	userInfo;
}
``` | 
| /user/info | GET |  | none | user | ```ts
{
	userInfo;
}
``` | 
| /user/games | POST | get games of user | ```ts
{
	id:
	userID;
}
``` | none | ```ts
{
  games: Array,
  totals: userGameTotals
}
``` | 
| /user/games | GET |  | none | user | ```ts
{
  games: Array,
  totals: userGameTotals
}
``` | 
| /user/avatar?id= | GET | fetch avatar as .png using url parameter | none | none | PNG image | 
| /user/avatar | GET | fetch avatar as .png | none | user | PNG image | 
| /user/avatar | POST | update avatar
note: avatar is a client-resized 256x256 .png base64-encoded image, request
returns error when image is not .png or larger than 256x256 | ```ts
{
	image:
	base64PNG;
}
``` | user | none | 
| /user/prefrences | GET | fetch user preferences | none | user | ```ts
{
	preferences:
	userPreferences;
}
``` | 
| /user/prefrences | POST | change user preferences | ```ts
{
	newPreferences:
	userPreferences;
}
``` | user | none | 
| /user/password | POST | update password | ```ts
{
  password: string,
  newPassword: string,
}
``` | user | none | 
| /user/email | POST | update email | ```ts
{
  password: string,
  email: string,
}
``` | user | none | 
| /user/username | POST | update username | ```ts
{
  password: string,
  username: string,
}
``` | user | none | 
| /user/status | POST | update status | ```ts
{
	status:
	string;
}
``` | user | none | 
| /social/request | POST | send a friend request to a user by user id | ```ts
{
	id:
	userID;
}
``` | user | none | 
| /social/accept | POST | accept a friend request | ```ts
{
	id:
	userID;
}
``` | user | none | 
| /social/remove | POST | remove a friend from your friend list or delete a friend request from a user | ```ts
{
	id:
	userID;
}
``` | user | none | 
| /social/search | POST | search for users by username or status | ```ts
{
	query:
	string;
}
``` | none | ```ts
{ results: Array }
``` | 
| /social/block | POST | block a user | ```ts
{
	id:
	userID;
}
``` | user | none | 
| /social/unblock | POST | unblock a user | ```ts
{
	id:
	userID;
}
``` | user | none | 
| /social/list/requests | GET | get a list of unaccepted friend requests | none | user | ```ts
{ requests: Array }
``` | 
| /social/list/blocks | GET | get a list of blocked people | none | user | ```ts
{ blocks: Array }
``` | 
| /social/list/friends | GET | get a list of your friends | none | user | ```ts
{ friends: Array }
``` | 
| /game/new | POST | create a new private game | none | user | ```ts
{
  id: gameID,
  player_1: boolean,
  game_started: boolean,
}
``` | 
| /game/random | POST | join or create a public game | none | user | ```ts
{
  id: gameID,
  player_1: boolean,
  game_started: boolean,
}
``` | 
| /game/info | POST | get game info by game id | ```ts
{
	id:
	gameID;
}
``` | user | ```ts
{
	gameInfo;
}
``` | 
| /game/accept | POST | accept game invite or rematch | ```ts
{
	id:
	gameID;
}
``` | user | ```ts
{
  id: gameID,
  player_1: boolean,
  game_started: boolean,
}
``` | 
| /game/spectate | POST | spectate a game by id | ```ts
{
	id:
	gameID;
}
``` | none | ```ts
{
  id: gameID,
  player_1: boolean,
  game_started: boolean,
}
``` |