# Create course

`POST https://api.tentary.com/v1/courses`

Source: https://tentary.com/en/help/api/create-course/
Area: Courses
MCP tool: `create_course`. Changes data at once.

---

Creates an online course. A course is content only, without a price.

1. Add modules with [`POST /v1/courses/{course_id}/modules`](https://tentary.com/en/help/api/create-module/) and lessons with [`POST /v1/courses/{course_id}/lessons`](https://tentary.com/en/help/api/create-lesson/).
2. To sell it, create a product with `type` `course` and this `course_id` with [`POST /v1/products`](https://tentary.com/en/help/api/create-product/).

Several products can sell the same course. To sell a course again, use its `course_id`. Do not create a copy.

The answer is the course, as in [`GET /v1/courses/{course_id}`](https://tentary.com/en/help/api/get-course-outline/).

## Authorization

`Authorization: Bearer <API key>`

A personal API key (tnt_...). Create it in the Tentary app on the page AI & API.

## Request body

- `name` (string, required): Course name. Limits: minLength 1, maxLength 255.
- `description_html` (string): Introduction as HTML. Shows only with layout cards, above the modules. Limits: maxLength 65535.
- `cover_image_url` (string, can be null): Course banner: the image_url from finish_image, or a public image URL that Tentary copies. Limits: maxLength 2048.
- `layout` (string): How buyers see the course. classic (default): sidebar and content. fullscreen: edge to edge. fokus: reading without distraction. cards: a start screen with module cards. Allowed values: `classic`, `fullscreen`, `fokus`, `cards`.
- `tracks_progress` (boolean): Buyers can mark lessons as done (default true). Needed for release type after_lesson.

## Response

- `id` (integer): The ID.
- `name` (string): The name.
- `description_html` (string): Shows only with layout cards.
- `cover_image_url` (string, can be null): Course banner.
- `layout` (string): How buyers see the course: classic, fullscreen, fokus or cards. Allowed values: `classic`, `fullscreen`, `fokus`, `cards`.
- `tracks_progress` (boolean): true = buyers can mark lessons as done.
- `lessons` (integer): Lessons, drafts included.
- `participants` (integer): Buyers and people with granted access, each e-mail address once.
- `drip_release_hour` (object): Lessons with release days or a date unlock at this hour, in this time zone (not UTC).
  - `hour` (integer): 0 to 23.
  - `time_zone` (string, can be null): The seller's time zone, like Europe/Berlin.
- `products` (array of object): Products that sell the course.
  - `id` (integer): The ID.
  - `name` (string): The name.
  - `status` (string): The status. Allowed values: `live`, `draft`, `archived`.
- `items` (array of object): Modules and lessons in order.
  - `id` (integer): The ID.
  - `kind` (string): module or lesson. Allowed values: `module`, `lesson`.
  - `title` (string): The title.
  - `cover_image_url` (string, can be missing, can be null): Modules only.
  - `position` (integer): Place in its module or among the main items, 1 = first.
  - `draft` (boolean): A draft module hides all items in it.
  - `free_preview` (boolean): true = everyone can open it as a free preview, also without a purchase.
  - `release` (object, can be null): When buyers get the item. null = at once.
    - One of:
      - Variant type: days_after_purchase:
        - `type` (string): The rule type. Allowed values: `days_after_purchase`.
        - `days` (integer): Days after the purchase.
      - Variant type: hours_after_purchase:
        - `type` (string): The rule type. Allowed values: `hours_after_purchase`.
        - `hours` (integer): Hours after the purchase.
      - Variant type: date:
        - `type` (string): The rule type. Allowed values: `date`.
        - `date` (string<date>): Like 2026-01-31.
      - Variant type: after_lesson:
        - `type` (string): The rule type. Allowed values: `after_lesson`.
        - `lesson_id` (integer): The lesson that the buyer must finish first.
        - `lesson_title` (string, can be null): The title of that lesson.
        - `enforced` (boolean): false = the course does not track progress, so the rule has no effect.
  - `items` (array of object): The items of a module, in order (modules and lessons). Empty for a lesson.
    - Same fields as the items one level up (schema `CourseItem`), nested.
- `admin_url` (string<uri>): The page in the Tentary app.

## Example request

```bash
curl -X POST "https://api.tentary.com/v1/courses" \
  -H "Authorization: Bearer $TENTARY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Yoga for Runners",
  "description_html": "<p>Stretch and recover after every run.</p>",
  "layout": "cards"
}'
```

## Example response

```json
{
  "id": 202,
  "name": "Yoga for Runners",
  "description_html": "<p>Stretch and recover after every run.</p>",
  "cover_image_url": null,
  "layout": "cards",
  "tracks_progress": true,
  "lessons": 0,
  "participants": 0,
  "drip_release_hour": {
    "hour": 7,
    "time_zone": "Europe/Berlin"
  },
  "products": [],
  "items": [],
  "admin_url": "https://app.tentary.com/courses/edit/202"
}
```
