> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hawkings.education/llms.txt
> Use this file to discover all available pages before exploring further.

# The User object

> Anyone with access to a workspace. Roles: `student`, `teacher`, `manager`, `admin`.

```json Example theme={null}
{
  "id": "usr_01HX9N5AB3...",
  "object": "user",
  "email": "ada@example.edu",
  "name": "Ada Lovelace",
  "role": "student",
  "workspace_id": "wks_01HX9...",
  "external_id": "canvas_user_42",
  "metadata": { "graduation_year": 2028 },
  "enabled": true,
  "created_at": "2026-05-10T12:00:00Z"
}
```

## Attributes

<ResponseField name="id" type="string">Prefix `usr_`.</ResponseField>

<ResponseField name="email" type="string" />

<ResponseField name="name" type="string" />

<ResponseField name="role" type="enum">`student` | `teacher` | `manager` | `admin`.</ResponseField>

<ResponseField name="workspace_id" type="string" />

<ResponseField name="external_id" type="string | null">Your LMS' user ID.</ResponseField>

<ResponseField name="metadata" type="object" />

<ResponseField name="enabled" type="boolean" />

## Sugar resources

<CodeGroup>
  ```ts TypeScript theme={null}
  hk.students.list({ cohort_id: cohortId });   // role: "student"
  hk.teachers.list({ cohort_id: cohortId });   // role: "teacher"
  ```

  ```php PHP theme={null}
  $hk->students->list(['cohort_id' => $cohortId]);   // role: "student"
  $hk->teachers->list(['cohort_id' => $cohortId]);   // role: "teacher"
  ```
</CodeGroup>
