---
title: "Create module"
method: POST
path: "/modules"
tags: ["Modules"]
---

# Create module

`POST /modules`

## Request body

- BlueprintApiCreateModuleRequestBody
  - `organizationId` string, required
  - `author` User
    - `email` string
    - `user_id` string
    - `created_at` string
    - `updated_at` string
    - `app_metadata` AppMetadata
      - `organizations` UserOrganization[]
        - `id` string, required
        - `role` string
        - `name` string
      - `isApiKey` boolean
      - `isAutogeneratedTerraformDeployer` boolean
      - `apiKeyType` 'oidc'
      - `createdBy` string
      - `organizationId` string
      - `isSystemUser` boolean
      - `readOnly` boolean
    - `picture` string
    - `name` string
    - `last_login` string
    - `given_name` string
    - `family_name` string
    - `blocked` boolean
  - `authorId` string
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `isDeleted` boolean
  - `type` 'module', required
  - `repository` string, required
  - `description` string
  - `tokenId` string
  - `tokenName` string
  - `githubInstallationId` number, nullable
  - `bitbucketClientKey` string, nullable
  - `isGitLab` boolean
  - `isAzureDevOps` boolean
  - `isBitbucketServer` boolean
  - `isGitHubEnterprise` boolean
  - `isGitLabEnterprise` boolean
  - `path` string
  - `runTestsOnPullRequest` boolean
  - `opentofuVersion` string
  - `tagPrefix` string
  - `vcsConnectionId` string, nullable
  - `moduleName` string, required — Module Name. Can be made of up to 64 characters, containing alphanumeric, hyphens and underscores. Must not contain leading/trailing hyphens/underscores.
  - `moduleProvider` string, required — Module Provider. Can be made of up to 64 characters, containing lowercase alphanumeric characters only.
  - `moduleTestEnabled` boolean

## Response `200`

- BlueprintApiCreateModuleResponse
  - `moduleName` string, required — Module Name. Can be made of up to 64 characters, containing alphanumeric, hyphens and underscores. Must not contain leading/trailing hyphens/underscores.
  - `moduleProvider` string, required — Module Provider. Can be made of up to 64 characters, containing lowercase alphanumeric characters only.
  - `moduleTestEnabled` boolean
  - `repository` string, required
  - `description` string
  - `tokenId` string
  - `tokenName` string
  - `githubInstallationId` number, nullable
  - `bitbucketClientKey` string, nullable
  - `isGitLab` boolean
  - `isAzureDevOps` boolean
  - `isBitbucketServer` boolean
  - `isGitHubEnterprise` boolean
  - `isGitLabEnterprise` boolean
  - `path` string
  - `runTestsOnPullRequest` boolean
  - `opentofuVersion` string
  - `tagPrefix` string
  - `vcsConnectionId` string, nullable
  - `type` 'module', required
  - `testingEnvironmentId` string
  - `id` string
  - `organizationId` string, required
  - `author` User
    - `email` string
    - `user_id` string
    - `created_at` string
    - `updated_at` string
    - `app_metadata` AppMetadata
      - `organizations` UserOrganization[]
        - `id` string, required
        - `role` string
        - `name` string
      - `isApiKey` boolean
      - `isAutogeneratedTerraformDeployer` boolean
      - `apiKeyType` 'oidc'
      - `createdBy` string
      - `organizationId` string
      - `isSystemUser` boolean
      - `readOnly` boolean
    - `picture` string
    - `name` string
    - `last_login` string
    - `given_name` string
    - `family_name` string
    - `blocked` boolean
  - `authorId` string
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `isDeleted` boolean

---

[API](https://skmtc.dev/envzero/apis/env0-api.md) · [All operations](https://skmtc.dev/envzero/apis/env0-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/envzero/env0-api/revisions/513441cbe9dc/schema)
