> ## Documentation Index
> Fetch the complete documentation index at: https://www.help.creatora.io/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> When building or modifying an integration with the Creatora API, start with https://www.help.creatora.io/en/api/build-with-ai.md. Retrieve the current GraphQL SDL from https://api.creatora.io/sdl before relying on API schema information.

# Recreate a Course from an outline

> Build a Private Course with draft modules and video or quiz placeholders.

Create a Private Course and rebuild a prepared or exported curriculum as draft video and quiz placeholders. This workflow covers the Course structure. Video uploads, quiz questions, Student and progress transfers, and publication are outside this Recipe.

Run the requests as an Administrator. Use the IDs returned by each step in the next request. The IDs in the examples are illustrative.

## Prepare the outline

For example:

```json theme={null}
{
  "name": "Drawing Essentials",
  "defaultOfferPrice": 49,
  "modules": [
    {
      "name": "Foundations",
      "contents": [
        {
          "name": "Drawing basic shapes",
          "variant": "videoLesson"
        },
        {
          "name": "Check your understanding",
          "variant": "quiz"
        }
      ]
    }
  ]
}
```

## Create the Course

```graphql theme={null}
mutation {
  createCourse(name: "Drawing Essentials", defaultOfferPrice: 49) {
    id name status defaultOffer { id price }
  }
}
```

```json Illustrative response theme={null}
{
  "data": {
    "createCourse": {
      "id": "22222222-2222-4222-8222-222222222222",
      "name": "Drawing Essentials",
      "status": "private",
      "defaultOffer": {
        "id": "44444444-4444-4444-8444-444444444444",
        "price": 49.0
      }
    }
  }
}
```

The returned Course is Private and has an automatic base Offer. Keep its `id`.

## Create a module

```graphql theme={null}
mutation {
  createCourseModule(courseId: "22222222-2222-4222-8222-222222222222", name: "Foundations", status: draft) {
    id name status index
  }
}
```

```json Illustrative response theme={null}
{
  "data": {
    "createCourseModule": {
      "id": "66666666-6666-4666-8666-666666666666",
      "name": "Foundations",
      "status": "draft",
      "index": 0
    }
  }
}
```

## Create the content placeholders

```graphql theme={null}
mutation {
  video: createCourseModuleContent(moduleId: "66666666-6666-4666-8666-666666666666", name: "Drawing basic shapes", variant: videoLesson, status: draft) {
    id name status variant
  }
  quiz: createCourseModuleContent(moduleId: "66666666-6666-4666-8666-666666666666", name: "Check your understanding", variant: quiz, status: draft) {
    id name status variant
  }
}
```

```json Illustrative response theme={null}
{
  "data": {
    "video": {
      "id": "77777777-7777-4777-8777-777777777777",
      "name": "Drawing basic shapes",
      "status": "draft",
      "variant": "videoLesson"
    },
    "quiz": {
      "id": "99999999-9999-4999-8999-999999999999",
      "name": "Check your understanding",
      "status": "draft",
      "variant": "quiz"
    }
  }
}
```

Repeat module and content creation in the order of your outline, keeping a mapping from source IDs to returned Creatora IDs. Use a new request when the next mutation needs an ID returned by the previous one; GraphQL mutation fields run in order, but cannot pass returned IDs between fields in the same request.

## Check the rebuilt curriculum

```graphql theme={null}
{
  courseById(courseId: "22222222-2222-4222-8222-222222222222") {
    id name status
    modules { id name index status contents { id name index status variant } }
  }
}
```

```json Illustrative response theme={null}
{
  "data": {
    "courseById": {
      "id": "22222222-2222-4222-8222-222222222222",
      "name": "Drawing Essentials",
      "status": "private",
      "modules": [
        {
          "id": "66666666-6666-4666-8666-666666666666",
          "name": "Foundations",
          "index": 0,
          "status": "draft",
          "contents": [
            {
              "id": "77777777-7777-4777-8777-777777777777",
              "name": "Drawing basic shapes",
              "index": 0,
              "status": "draft",
              "variant": "videoLesson"
            },
            {
              "id": "99999999-9999-4999-8999-999999999999",
              "name": "Check your understanding",
              "index": 1,
              "status": "draft",
              "variant": "quiz"
            }
          ]
        }
      ]
    }
  }
}
```

Compare names, variants and ordering with the source outline. Finish media, quiz questions, access settings and sales setup before publishing through your normal workflow. The content creation example covers video and quiz placeholders.

After an interrupted or unclear creation request, read the saved curriculum and match its IDs to your outline before retrying. Earlier steps may already be saved; repeating them can create duplicates.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.