---
title: "Create Course Block"
method: POST
path: "/teacher/courses/{course_id}/units/{unit_id}/blocks"
tags: ["Teacher Courses"]
---

# Create Course Block

`POST /teacher/courses/{course_id}/units/{unit_id}/blocks`

Insert a new block (new id) after `after_block_id`, or first.

## Path parameters

- `course_id` string, required
- `unit_id` string, required

## Request body

- CourseBlockCreate
  - `type` 'paragraph' | 'theorem' | 'definition' | 'example' | 'property' | 'explanation' | 'note' | 'demonstration' | 'illustration', required
  - `content` string, required
  - `after_block_id` string, nullable, required

## Response `200`

Successful Response

- CourseUnitBlocksResponse — The unit's blocks after the operation, and their string mirror.
  - `unit_id` string, required
  - `blocks` CourseBlockResponse[], required
    - `id` string, required
    - `type` 'paragraph' | 'theorem' | 'definition' | 'example' | 'property' | 'explanation' | 'note' | 'demonstration' | 'illustration', required
    - `content` string, required
  - `generated_content` string, required

## Other responses

- `404` — Resource not found
- `409` — Business rule violated
- `422` — Validation Error

## Changes

> 24 revisions in range; 1 not diffed.

- **2026-09-19** `c81ed506912f` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/excellence-ai/apis/excellence-learning/changes/teacher/courses/:course_id/units/:unit_id/blocks/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/b9758ca4fea6?raw)
