---
updatedAt: 2026-02-08T09:02:43.000Z
agentTools:
  projectIndex: https://docs.ol-hub.com/llms.txt
---

# create module

The **create module** API sends a POST request to create a module.

**Prerequisites**: The caller must supply the **id** for the requested module.

**Authorization**: API key

**Input parameters**:

| Field name | Description | Format |
| :--------- | :---------- | :----- |
| **id**     | Module id   | UUID   |

**Output parameters**

| Field name           | Description                  | Format       |
| :------------------- | :--------------------------- | :----------- |
| **moduleId**         | Module id                    | UUID         |
| **moduleName**       | Module name                  | String       |
| **assetsPushed**     | Container - see below        | AssetsPushed |
| **testCasesCreated** | Number of test cases created | Integer      |
| **testCasesUpdated** | Number of test cases updated | Integer      |

AssetsPushed:

| Field name          | Description              | Format  |
| :------------------ | :----------------------- | :------ |
| **assetId**         | Asset id                 | UUID    |
| **pushedAssetName** | Pushed asset name        | String  |
| **actualAssetName** | Actual asset name        | String  |
| **tested**          | Whether asset was tested | Boolean |

**Example**:

```
{
    "moduleId": "2f2fe37f-01f2-4ffb-9a97-3fd7d60ada5e",
    "moduleName": "demo-account123",
    "assetsPushed": [
        {
            "assetId": "910c622b-f562-4ed2-a25f-01b539adbbce",
            "pushedAssetName": "demo-get-account-by-id",
            "actualAssetName": "demo-get-account-by-id",
            "tested": false
        }
    ],
    "testCasesCreated": 0,
    "testCasesUpdated": 1
}
```

<br />

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Public APIs - Modules",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.qa.ol-hub.com/backend"
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-KEY"
      }
    }
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "tags": [
    {
      "name": "Module"
    }
  ],
  "paths": {
    "/api/v1/modules": {
      "post": {
        "tags": [
          "Module"
        ],
        "summary": "create module",
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "application/json"
          },
          {
            "name": "x-api-key",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "ZjgzNDc3ZGYtNzRmOS00YjdhLTlmYjktNWViMTgxYTBiYWFlOjFjOTU4MTc2LTc0N2QtNDUyNC1hZWU1LWNiMzcxNzI2MjhhOA=="
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "transfer-encoding": {
                "schema": {
                  "type": "string",
                  "example": "chunked"
                }
              },
              "Content-Type": {
                "schema": {
                  "type": "string",
                  "example": "application/json"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "moduleId": "2f2fe37f-01f2-4ffb-9a97-3fd7d60ada5e",
                  "moduleName": "demo-account",
                  "assetsPushed": [
                    {
                      "assetId": "910c622b-f562-4ed2-a25f-01b539adbbce",
                      "pushedAssetName": "demo-get-account-by-id",
                      "actualAssetName": "demo-get-account-by-id",
                      "tested": false
                    }
                  ],
                  "testCasesCreated": 0,
                  "testCasesUpdated": 1
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "default": "module-001"
                  }
                },
                "required": [
                  "name"
                ]
              },
              "examples": {
                "New Example": {
                  "summary": "New Example",
                  "value": "{\n  \"name\": \"demo-accounttt\",\n}"
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```