---
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

---

[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-service-production.skmtc.workers.dev/v1/apis/excellence-ai/excellence-learning/revisions/ef67479ed898/schema)
