---
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`

## Request

- Base URL: `https://api.excellence-ai.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.excellence-ai.com/teacher/students/{student_id}/generate-recovery-code`
- Auth: OAuth 2 (password, token URL `api/login`)

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/379e4a57dee8?raw)
