---
title: "Create Teacher Assignment"
method: POST
path: "/teacher/assignments"
tags: ["teacher_assignments"]
---

# Create Teacher Assignment

`POST /teacher/assignments`

Creates a new exercise assignment.
Assignment is created as a draft by default and can be configured later.
class_id is optional - assignments can be created without a class assigned.
Returns the assignment_id in both the 'message' field and 'assignment_id' field of BasicResponse.

## Request body

- TeacherAssignmentCreate
  - `title` string, nullable
  - `folder_id` string, nullable
  - `class_id` string, nullable
  - `class_ids` string[]
  - `exercise_ids` string[]
  - `start_date` string, date-time, nullable
  - `due_date` string, date-time, nullable
  - `randomize_order` boolean, nullable

## Response `200`

Successful Response

- RoutersExerciseAssignmentsBasicResponse
  - `status` string, required
  - `message` string, required
  - `assignment_id` string, nullable

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-10** `da2adc76dec3` — 1 info
  - the `randomize_order` request property default value `true` was removed

[Change history](https://skmtc.dev/excellence-ai/apis/excellence-learning/changes/teacher/assignments/post.md)

---

[API](https://skmtc.dev/excellence-ai/apis/excellence-learning.md) · [All operations](https://skmtc.dev/excellence-ai/apis/excellence-learning/llms.txt) · [OpenAPI document](https://skmtc.dev/excellence-ai/apis/excellence-learning/revisions/2a0c1636fd3b?raw)
