---
title: "Import selected OpenApply music lesson requests"
method: POST
path: "/MusicLessons/Import"
tags: ["Musiclessons"]
---

# Import selected OpenApply music lesson requests

`POST /MusicLessons/Import`

**Requires permission:** *MusicAdmins*

Creates one lesson per selected pupil-instrument pair, linked to an instrument but with no teacher, plus an ML_Students row for any pupil who is not already a music student. Pairs that already have a non-archived lesson are skipped, so re-running is safe.

## Query parameters

- `page` integer, required
- `pageSize` integer, required
- `includes` string[], nullable
- `sort` string, nullable
- `filter` string, nullable

## Request body

- ImportMusicLessonsRequest
  - `items` ImportMusicLessonsRequestItem[]
    - `upi` string, guid
    - `instrumentId` integer
    - `lessons` integer
    - `free` boolean
    - `notes` string, nullable

## Response `200`

Success - Success

- ImportMusicLessonsResponse
  - `lessonsCreated` integer
  - `studentsCreated` integer
  - `skipped` integer
  - `errors` string[]
  - `meta` Meta
    - `page` integer
    - `pageSize` integer
    - `total` integer

## Other responses

- `400` — An Error Occurred - Explain Error
- `401` — Unauthorized
- `403` — Forbidden

---

[API](https://skmtc.net/tonbridge/apis/tonbridge-app-api.md) · [All operations](https://skmtc.net/tonbridge/apis/tonbridge-app-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tonbridge/tonbridge-app-api/revisions/b6ca3e4d06fc/schema)
