Skip to main content
POST
/
v1
/
users
Create a user
curl --request POST \
  --url https://api.example.com/v1/users \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "<string>",
  "name": "<string>",
  "role": {},
  "external_id": "<string>",
  "metadata": {}
}
'

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.

Body

email
string
required
name
string
required
role
enum
required
student | teacher | manager | admin.
external_id
string
Your LMS’ user ID. Highly recommended.
metadata
object

Examples

const ada = await hk.users.create({
  email: "ada@example.edu",
  name: "Ada Lovelace",
  role: "student",
  external_id: "canvas_user_42",
});

Returns

A User.
Creating a user does not enroll them in a cohort. Use cohorts.bulk() or the cohort enrollment endpoint to do that.