Skip to main content
POST
/
v1
/
lessons
Create a lesson
curl --request POST \
  --url https://api.example.com/v1/lessons \
  --header 'Content-Type: application/json' \
  --data '
{
  "cohort_id": "<string>",
  "unit_id": "<string>",
  "name": "<string>",
  "type": {},
  "position": 123,
  "evaluable": true,
  "optional": true,
  "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

cohort_id
string
required
unit_id
string
Optional grouping unit.
name
string
required
type
enum
default:"reading"
reading | video | practice | assessment.
position
integer
evaluable
boolean
default:"true"
optional
boolean
default:"false"
metadata
object

Examples

const lesson = await hk.lessons.create({
  cohort_id: "coh_123",
  name: "The postulates of special relativity",
  type: "reading",
});

Returns

A Lesson.