---
title: "Link Student To Class"
method: POST
path: "/student/classes/link"
tags: ["Student"]
---

# Link Student To Class

`POST /student/classes/link`

Allows a student to join a class by providing either a regular class code or single-use code.
If the class has pending students, the student must select their name from the list.

## Request body

- RoutersStudentLinkClassBody
  - `code` string, required
  - `pending_student_id` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/excellence-ai/apis/excellence-learning.md) · [All operations](https://skmtc.dev/excellence-ai/apis/excellence-learning/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/excellence-ai/excellence-learning/revisions/8d495ed916c6/schema)
