---
title: "Submit a game (PGN) for analysis"
method: POST
path: "/game"
---

# Submit a game (PGN) for analysis

`POST /game`

## Request

- Base URL: `https://www.chessigma.com/public-api/v1`
- URL: `https://www.chessigma.com/public-api/v1/game`
- Auth: none required
- TypeScript: <https://skmtc.dev/chessigma/apis/chessigma-public-api/docs/game/post.ts> (a function with typed inputs; its response is checked against the schema)

Stores a chess game and returns a URL to view and analyze it on Chessigma. Duplicate games (same players + date) are deduplicated and return the existing gameId.

## Request body

- GameSubmission
  - `pgn` string, required: PGN text. Must include [White], [Black], [Result] tags and a valid moves section.

## Response `201`

Game submitted

- GameSubmissionResponse
  - `gameId` string, uuid: The game's ID. Pass it to GET /game/{gameId}.
  - `url` string, uri: Open this to view and analyze the game.
  - `status` 'submitted'
  - `message` string

## Other responses

- `400`: Invalid or missing PGN, or missing required tags
- `429`: Rate limit exceeded (30 req/min global)
- `500`: Internal server error

---

[API](https://skmtc.dev/chessigma/apis/chessigma-public-api.md) - [All operations](https://skmtc.dev/chessigma/apis/chessigma-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/chessigma/apis/chessigma-public-api/revisions/14ea5ae24479?raw)
