Skip to main content
POST
/
v1
/
cohorts
Create a cohort
curl --request POST \
  --url https://api.example.com/v1/cohorts \
  --header 'Content-Type: application/json' \
  --data '
{
  "course_id": "<string>",
  "name": "<string>",
  "code": "<string>",
  "language": "<string>",
  "starts_at": "<string>",
  "ends_at": "<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

course_id
string
required
name
string
required
code
string
Unique within the course.
language
string
Defaults to the course’s language.
starts_at
string
ISO date.
ends_at
string
metadata
object

Examples

const cohort = await hk.cohorts.create({
  course_id: "crs_123",
  name: "Fall 2026, Group A",
  code: "PHYS-201-FA26-A",
  starts_at: "2026-09-01",
  ends_at: "2026-12-15",
});

Returns

A new Cohort. The course’s syllabus tree is cloned into it.