> ## 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.

# Create a user

## Body

<ParamField body="email" type="string" required />

<ParamField body="name" type="string" required />

<ParamField body="role" type="enum" required>`student` | `teacher` | `manager` | `admin`.</ParamField>
<ParamField body="external_id" type="string">Your LMS' user ID. Highly recommended.</ParamField>

<ParamField body="metadata" type="object" />

## Examples

<CodeGroup>
  ```ts TypeScript theme={null}
  const ada = await hk.users.create({
    email: "ada@example.edu",
    name: "Ada Lovelace",
    role: "student",
    external_id: "canvas_user_42",
  });
  ```

  ```php PHP theme={null}
  $ada = $hk->users->create([
      'email' => 'ada@example.edu',
      'name' => 'Ada Lovelace',
      'role' => 'student',
      'external_id' => 'canvas_user_42',
  ]);
  ```
</CodeGroup>

## Returns

A [User](/api-reference/users/object).

<Tip>
  Creating a user does **not** enroll them in a cohort. Use
  `cohorts.bulk()` or the cohort enrollment endpoint to do that.
</Tip>
