# Register Your Game

After you've [generated an api key](/prep-work/authentication.md), you need to generate a new `gameId` by registering your game. You can create multiple games using the same api key.

```typescript
// 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 
};
```

```bash
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:

{% hint style="info" %}
Before going live, make sure to update your prodDomain.
{% endhint %}

```bash
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"
}'

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hastearcade.com/prep-work/register-your-game.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
