---
title: "Export Teacher Emails"
method: GET
path: "/admin/schools/export-teacher-emails"
tags: ["Admin - Schools"]
---

# Export Teacher Emails

`GET /admin/schools/export-teacher-emails`

Export teacher emails.
Filter modes:
- 'active': Teachers from schools with active B2B contracts
- 'any_school': Teachers from any school (active or inactive)
- 'all': All teachers in the system (with or without school)
Optional contract_type filter: free, pilot, paid
Optional usage_filter: 'any' (all), 'some' (has usage), 'none' (no usage)
Returns preview (count + sample) or CSV download.

## Query parameters

- `filter_mode` 'active' | 'any_school' | 'all' — Filter mode: 'active' (active contracts only), 'any_school' (any school), 'all' (all teachers)
- `contract_type` 'free' | 'pilot' | 'paid', nullable — Filter by contract type (only applies when filter_mode is 'active' or 'any_school')
- `usage_filter` 'any' | 'some' | 'none' — Filter by platform usage: 'any' (no filter), 'some' (has usage), 'none' (no usage)
- `download` boolean — Set to true to download CSV

## Response `200`

CSV file when download=true

- TeacherEmailExportResponse — Response model for teacher email export preview
  - `count` integer, required
  - `sample_emails` string[], required
  - `sample` TeacherEmailSampleItem[]
    - `email` string, required
    - `name` string, nullable
    - `school` string, nullable

## 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/c407f3b5a05b/schema)
