# Faculty

> Provision teachers who author exams, own groups and grade submissions.

Canonical: https://grout.app/developer/documentation/people/faculty/

Faculty accounts mirror students: a generated login email (`facultyN.<code>@grout.user`), a **faculty license** (3 devices), and a one-time-code sign-in. On first login the teacher completes a short profile (employee id, department, position); until then `profile_completed` is `false`.

## Create

```bash
curl -X POST $API/faculty -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' \
  -d '{ "full_name": "Dr. Menon", "faculty_id": "F-031", "license_days": 365 }'
```

The response includes `login_email`. Faculty OTPs are routed to the institution admin's mailbox for the first login, then to the teacher's own address once their profile is complete.

## Why faculty matter to the API

- Every **exam** has a faculty owner (`faculty_id`), required on `POST /exams`.
- Every **group** has an owner; pass `faculty_id` or it defaults to the institution admin.
- Grading via the API is recorded against the exam owner unless you pass `graded_by`.

## List, read, update

```bash
curl "$API/faculty?status=active" -H "Authorization: Bearer $KEY"
curl $API/faculty/faculty3.4f9a2b1c@grout.user -H "Authorization: Bearer $KEY"
curl -X PATCH $API/faculty/u_… -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{ "status": "suspended" }'
curl "$API/faculty/u_…/exams?page=1" -H "Authorization: Bearer $KEY"
```

## Events

`faculty.created`, `faculty.profile_completed`, `license.generated`.
