---
title: "Generate Email Recovery Code"
method: POST
path: "/teacher/students/{student_id}/generate-recovery-code"
tags: ["Teacher"]
---

# Generate Email Recovery Code

`POST /teacher/students/{student_id}/generate-recovery-code`

Generate a recovery code for a student to retrieve their email address.
Code is valid for 48 hours.

## Path parameters

- `student_id` string, required

## Response `200`

Successful Response

- EmailRecoveryCodeResponse
  - `recovery_code` string, required
  - `expires_at` string, date-time, required

## 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.dev/excellence-ai/apis/excellence-learning/revisions/2a0c1636fd3b?raw)
