Welcome to the ColorCode API documentation. Below you'll find all available endpoints and how to use them.
/hello
A simple hello world endpoint that echoes back any query parameters.
{
"status": 200,
"success": true,
"message": "Hello from ColorCode",
"data": {
"queryParams": {}
}
}
/login
Authentication endpoint for user login.
{
"username": "string",
"password": "string"
}
{
"status": 200,
"success": true,
"message": "Login attempt successful",
"data": {
"user": "username"
}
}
/randomCity
Returns a random city from our database of 500 cities worldwide.
startsWith (optional): Filter cities that start with this letter/string{
"status": 200,
"success": true,
"message": "Random city retrieved successfully",
"data": {
"city": "Tokyo"
}
}