Skip to main content
POST
/
v1
/
assignments
Create an assignment
curl --request POST \
  --url https://api.example.com/v1/assignments \
  --header 'Content-Type: application/json' \
  --data '
{
  "lesson_id": "<string>",
  "type": {},
  "title": "<string>",
  "description": "<string>",
  "due_at": "<string>",
  "rubric": {}
}
'

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

lesson_id
string
required
type
enum
required
essay | upload | code | oral | project.
title
string
required
description
string
due_at
string
ISO 8601.
rubric
Rubric
required

Examples

await hk.assignments.create({
  lesson_id: "lsn_123",
  type: "essay",
  title: "Explain mass-energy equivalence",
  rubric: {
    scale: { min: 0, max: 10 },
    criteria: [
      { name: "clarity",  weight: 0.4 },
      { name: "accuracy", weight: 0.4 },
      { name: "sources",  weight: 0.2 },
    ],
  },
});

Returns

An Assignment.