---
title: "Import PGN into a study"
method: POST
path: "/api/study/{studyId}/import-pgn"
tags: ["Studies"]
---

# Import PGN into a study

`POST /api/study/{studyId}/import-pgn`

Imports arbitrary PGN into an existing [study](https://lichess.org/study). Creates a new chapter in the study.
If the PGN contains multiple games (separated by 2 or more newlines)
then multiple chapters will be created within the study.
Note that a study can contain at most 64 chapters.

## Path parameters

- `studyId` string, required

## Response `200`

The chapters that were created.

- StudyImportPgnChapters
  - `chapters` object[]
    - `id` string — The chapter ID
    - `name` string — The chapter name
    - `players` object[]
      - `name` string, nullable — The player name
      - `rating` integer — The player rating
    - `status` string — The chapter status

## Other responses

- `400` — The creation of the chapter(s) failed.

---

[API](https://skmtc.net/lichess/apis/lichess-org-api-reference.md) · [All operations](https://skmtc.net/lichess/apis/lichess-org-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lichess/lichess-org-api-reference/versions/1425db81eb3b/schema)
