# org.lichess.puzzle.getById

> Published by [pds.dad](https://lexicon.garden/identity/did:plc:rnpkyqnmsw4ipey6eotbdnnf)

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:rnpkyqnmsw4ipey6eotbdnnf/org.lichess.puzzle.getById)
- [Documentation](https://lexicon.garden/lexicon/did:plc:rnpkyqnmsw4ipey6eotbdnnf/org.lichess.puzzle.getById/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:rnpkyqnmsw4ipey6eotbdnnf/org.lichess.puzzle.getById/examples)

## Definitions

### `org.lichess.puzzle.getById`

**Type**: `query`

Get a chess puzzle by its id.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `id` | `string` | Yes | the id of the puzzle to fetch. |

#### Output

**Encoding**: `application/json`

#### Errors

- **PuzzleNotFound**: No puzzle exists with the given id.

## Raw Schema

```json
{
  "id": "org.lichess.puzzle.getById",
  "defs": {
    "main": {
      "type": "query",
      "errors": [
        {
          "name": "PuzzleNotFound",
          "description": "No puzzle exists with the given id."
        }
      ],
      "output": {
        "schema": {
          "ref": "org.lichess.puzzle.defs#puzzleView",
          "type": "ref"
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "the id of the puzzle to fetch."
          }
        }
      },
      "description": "Get a chess puzzle by its id."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
