---
search:
  tags:
    - Modules
    - POST
seo:
  description: >-
    Creates a Module or catalog Submodule with an initial active version. Omit
    kind or send… Reference for the POST /modules endpoint in the Fuxam API v4.
sidebar:
  label: Create a module
  badge: POST
title: Create a module
type: openapi-operation
---
Creates a Module or catalog Submodule with an initial active version. Omit `kind` or send `kind=module` to create a normal Module (`isSubmodule=false`). `kind=submodule` creates a reusable catalog Submodule (`isSubmodule=true`) and requires Module Hierarchy; otherwise the API returns 409 Conflict. This does not attach the Submodule to a parent version — use POST /modules/&#123;id&#125;/versions/&#123;versionId&#125;/submodules for connections. Returns `defaultVersion`, `firstVersion`, and `courses` count. Scoped to your integration's institution via Basic Auth credentials.

`POST /modules`

**Request body** (`application/json`, required)

- `name` (string, required)
- `code` (string)
- `description` (string)
- `icon` (string)
- `banner` (string)
- `ectsPoints` (number) — ECTS credit points. Halves only (0, 0.5, 1, 1.5, …). Breaking change: previously integer-only.
- `requiredAttendancePercentage` (integer)
- `versionName` (string)
- `kind` (string) — Optional catalog kind. Omit or use \`module\` to create a Module. Use \`submodule\` to create a reusable catalog Submodule.

Request body example:

```json
{
  "name": "string",
  "code": "string",
  "description": "string",
  "icon": "string",
  "banner": "string",
  "ectsPoints": 5,
  "requiredAttendancePercentage": 0,
  "versionName": "string",
  "kind": "module"
}
```

**Responses**

- `201` — Module created
- `400` — Bad Request
- `401` — Unauthorized
- `409` — Conflict — duplicate email or membership code (body includes \`existingUserId\` when known), a time-tracking session that is already running (\`activeSession\`), a time-tracking interval that overlaps an existing log (\`conflictingLog\`), idempotency key reused with a different body (\`idempotency\_key\_reused\`), or concurrent request with the same key still in progress (\`idempotency\_key\_in\_progress\`)
- `422` — Unprocessable Entity — validation or business rule error
- `429` — Too Many Requests — 1000 requests per minute per institution. Includes \`X-RateLimit-Limit\`, \`X-RateLimit-Remaining\`, \`X-RateLimit-Reset\` (ISO-8601), and \`Retry-After\` (seconds).
- `500` — Internal Server Error

Response example, 201:

```json
{
  "data": {
    "id": "cm_xyz789",
    "name": "Economics",
    "institutionId": "inst_123",
    "code": "ECO-101",
    "isArchived": false,
    "nameTranslations": null,
    "courseModuleTags": [],
    "versions": [
      {
        "id": "cmqevazu005pb4pi9zp2zthd1",
        "version": "2.0.0",
        "name": "Business Administration Basics",
        "description": "",
        "icon": null,
        "iconType": "emoji",
        "banner": null,
        "createdAt": "2026-06-15T07:04:18.408Z",
        "updatedAt": "2026-06-15T07:04:18.408Z",
        "requiredAttendancePercentage": 80,
        "ectsPoints": 5,
        "courseModuleId": "cmqevazrw05p34pi9wv9w3mks",
        "status": "ACTIVE",
        "timePlanId": "cmqevazr905p14pi9st41ex1w",
        "isDefault": true,
        "earlyAssessmentEnabled": false,
        "isCurrentlyElectable": true,
        "capacity": null,
        "color": null,
        "courseChatFileAttachmentsDefault": true,
        "courseChatReadOnlyDefault": false,
        "courseFeatureDefaults": null,
        "moduleName": null,
        "attemptRules": null
      }
    ],
    "defaultVersion": {
      "id": "cmqevazu005pb4pi9zp2zthd1",
      "version": "2.0.0",
      "name": "Business Administration Basics",
      "description": "",
      "icon": null,
      "iconType": "emoji",
      "banner": null,
      "createdAt": "2026-06-15T07:04:18.408Z",
      "updatedAt": "2026-06-15T07:04:18.408Z",
      "requiredAttendancePercentage": 80,
      "ectsPoints": 5,
      "courseModuleId": "cmqevazrw05p34pi9wv9w3mks",
      "status": "ACTIVE",
      "timePlanId": "cmqevazr905p14pi9st41ex1w",
      "isDefault": true,
      "earlyAssessmentEnabled": false,
      "isCurrentlyElectable": true,
      "capacity": null,
      "color": null,
      "courseChatFileAttachmentsDefault": true,
      "courseChatReadOnlyDefault": false,
      "courseFeatureDefaults": null,
      "moduleName": null,
      "attemptRules": null
    },
    "firstVersion": {
      "id": "cmqevazu005pb4pi9zp2zthd1",
      "version": "2.0.0",
      "name": "Business Administration Basics",
      "description": "",
      "icon": null,
      "iconType": "emoji",
      "banner": null,
      "createdAt": "2026-06-15T07:04:18.408Z",
      "updatedAt": "2026-06-15T07:04:18.408Z",
      "requiredAttendancePercentage": 80,
      "ectsPoints": 5,
      "courseModuleId": "cmqevazrw05p34pi9wv9w3mks",
      "status": "ACTIVE",
      "timePlanId": "cmqevazr905p14pi9st41ex1w",
      "isDefault": true,
      "earlyAssessmentEnabled": false,
      "isCurrentlyElectable": true,
      "capacity": null,
      "color": null,
      "courseChatFileAttachmentsDefault": true,
      "courseChatReadOnlyDefault": false,
      "courseFeatureDefaults": null,
      "moduleName": null,
      "attemptRules": null
    },
    "courses": 0
  },
  "meta": {
    "requestId": "req_abc123",
    "timestamp": "2026-06-26T00:00:00.000Z",
    "version": "v4"
  }
}
```
