Skip to main content

🚀 Quickstart with Nexra

Follow these steps to integrate Nexra and create your first tournament. Each step is expandable for details and examples.
1

1. Get Your Game API Key

First, register your game in the Nexra Dashboard:
  1. Go to the Nexra Dashboard.
  2. Click Create New Game and fill in the details.
  3. Once your game is created, you will receive a Game API Key.
Use this API Key for authorization in your requests:
Authorization: ApiKey <your_game_api_key>
Content-Type: application/json
Replace <your_game_api_key> with the API Key provided for your game.
2

2. Create Your First Tournament

Use the POST /tournament/create endpoint to create tournaments from your game.Request Example:
POST /tournament/create
Authorization: ApiKey <your_game_api_key>
Request Body Example:
{
  "game": "67188e92b41c0eec54f22b1f",
  "name": "Battle of Nexra",
  "description": "An intense tournament for top gamers",
  "entryFee": 50,
  "startTime": "2025-11-10T18:00:00Z",
  "endTime": "2025-11-10T21:00:00Z"
}
Response Example:
{
  "message": "Tournament created successfully",
  "tournament": {
    "message": "Tournament created successfully",
    "tournament": {
        "game": {
            "_id": "68f9ce6d27a07cdb23dd65c7",
            "name": "Battle Arenaa",
            "id": "68f9ce6d27a07cdb23dd65c7"
        },
        "name": "Battle of Nexra",
        "description": "An intense tournament for top gamers",
        "entryFee": 50,
        "prizePool": 0,
        "status": "pending",
        "startTime": "2025-11-10T18:00:00.000Z",
        "endTime": "2025-11-10T21:00:00.000Z",
        "winner": null,
        "_id": "68fa2b750366dd5ff66d599d",
        "createdAt": "2025-10-23T13:19:49.620Z",
        "updatedAt": "2025-10-23T13:19:49.620Z",
        "id": "68fa2b750366dd5ff66d599d"
    }
  }
}
Keep the id for future updates or publishing.
3

3. Publish Your Tournament

Make your tournament live for gamers via PATCH /tournament/{tournamentId}/publish.Request Example:
PATCH /tournament/:tournamentId/publish
Authorization: ApiKey <your_game_api_key>
Response Example:
{
  "message": "Tournament published successfully",
  "tournament": {
    "game": {
        "_id": "68f9ce6d27a07cdb23dd65c7",
        "name": "Battle Arenaa",
        "id": "68f9ce6d27a07cdb23dd65c7"
    },
    "name": "Battle of Nexra",
    "description": "An intense tournament for top gamers",
    "entryFee": 50,
    "prizePool": 0,
    "status": "pending",
    "startTime": "2025-11-10T18:00:00.000Z",
    "endTime": "2025-11-10T21:00:00.000Z",
    "winner": null,
    "_id": "68fa2b750366dd5ff66d599d",
    "createdAt": "2025-10-23T13:19:49.620Z",
    "updatedAt": "2025-10-23T13:19:49.620Z",
    "id": "68fa2b750366dd5ff66d599d"
  }
}
4

4. Gamers Join via Your Game

Once integrated, gamers can join tournaments from your game. Your game calls: POST /tournament/{tournamentId}/join when a gamer chooses to enter. Developers only need to integrate this action; gamers trigger it naturally through the game interface.Request Example:
POST /tournament/:tournamentId/join
Authorization: ApiKey <your_game_api_key>
Request Body Example:
{
  "gamer": "silent_gamer"
}
Response Example:
{
  "message": "Gamer successfully joined the tournament",
  "entry": {
      "id": "6718ac03e0ad9b01f43b76b3",
      "tournament": "6718a8dde0ad9b01f43b76a2",
      "gamer": "6718ab5ee0ad9b01f43b76a8",
      "entryFee": 100,
      "joinedAt": "2025-10-23T13:25:48.112Z",
      "eliminated": false,
      "eliminatedAt": null,
      "rank": null,
      "createdAt": "2025-10-23T13:25:48.112Z",
      "updatedAt": "2025-10-23T13:25:48.112Z"
  }
}
5

5. Optional: Update or Eliminate Players

Developers can update tournament details or remove players dynamically via: PATCH /tournament/{tournamentId}/eliminate

🎯 Next Steps