---
title: "Create new interactive coding lab"
method: POST
path: "/public/create-interactive-coding-lab"
tags: ["Lab"]
---

# Create new interactive coding lab

`POST /public/create-interactive-coding-lab`

Creates a new interactive coding lab with API. You can use this endpoint instead of creating it from GUI in fermion dashboard

Authentication with the "FERMION-API-KEY" header is required to use this endpoint.

Rate limit: Maximum 60 requests in a window of 1m.

## Request body

- object
  - `data` object[], required
    - `data` object, required
      - `labTitle` string, required — Title of the interactive coding lab
      - `labDescriptionAsMarkdown` string, required — Markdown description explaining what the lab is about and what students will learn
      - `defaultGitRepositoryUrl` string, uri, required — URL of the Git repository that will be cloned as the starting point for this lab
      - `defaultGitRepositoryBranchName` string, required — Git branch name to use from the repository (e.g., "main" or "master")
      - `evaluationScriptBashCommand` string, required — Bash command to run for evaluating lab completion (e.g., "npm test" or "python test.py")
      - `evaluationScriptTestFileContent` string, required — Content of the test file that will be used to evaluate the lab (e.g., unit test code)
      - `testCases` object[] — Array of test cases/challenges that students need to complete in this lab
        - `type` 'SelfEvaluative' | 'SystemEvaluative', required — Type of challenge/test case
        - `markdownLabel` string, required — Label/title for the test case that will be shown to the student
        - `markdownHint` union, required — Optional hint in markdown format to help students complete this test case
          - string
          - unknown
          - unknown

## Response `200`

API Response Body

- object[]
  - `output` union, required
    - object
      - `status` 'ok', required
      - `data` object, required
        - `labId` string, required — The ID of the lab created. Use this to perform further operations on the lab (embedding, updating, etc.)
    - object
      - `status` 'error', required
      - `errorMessage` string, required

---

[API](https://skmtc.net/fermion/apis/fermion-backend-api.md) · [All operations](https://skmtc.net/fermion/apis/fermion-backend-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/fermion/fermion-backend-api/revisions/7ce364c8820b/schema)
