Register Your Game

After you've generated an api key, you need to generate a new gameId by registering your game. You can create multiple games using the same api key.

// Request body
const type CreateGameRequest = {
    name: string; // game name
    description: string; // short game description
    coverUrl: string; // 1920x1080 pixels, 16:9 aspect ratio.
    scoreDisplay: "NORMAL" | "REVERSE"; // choose reverse if a lower value score is better
    prodDomain?: string; // your game's production domain 
};
curl -X POST https://api.hastearcade.com/game/create \
-H "Content-Type: application/json" \
-H "api-key: your-api-key-here" \
-d '{
    "name": "My New Game",
    "description": "An exciting puzzle game with challenging levels.",
    "coverUrl": "http://example.com/cover.jpg",
    "scoreDisplay": "NORMAL"
}'

Update

If you need to make updates to your game you can simply make the following request:

Before going live, make sure to update your prodDomain.

curl -X PATCH https://api.hastearcade.com/game/update \
-H "Content-Type: application/json" \
-H "api-key: your-api-key-here" \
-H "game-id: your-game-id" \
-d '{
    "description": "Updated description with more levels.",
    "coverUrl": "http://example.com/new-cover.jpg",
    "prodDomain": "https://myfunpuzzlegame.com"
}'

Last updated