> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/infrastructure-as-code-management/iacm-api-reference/module-registry/create-a-new-module-execution.md).

# Create a new module execution

Create a new module execution.

```json
{"openapi":"3.0.3","info":{"title":"Infrastructure as Code Management","version":"0.1.0"},"tags":[{"name":"module-registry","description":"The module-registry service is a private registry for Terraform/Opentofu modules"}],"servers":[{"url":"http://localhost:80"}],"paths":{"/api/modules/{moduleId}/executions":{"post":{"tags":["module-registry"],"summary":"Create a new module execution","description":"Create a new module execution.","operationId":"module-registry#create-module-execution","parameters":[{"name":"moduleId","in":"path","description":"The unique identifier for the associated module","required":true,"schema":{"type":"string","description":"The unique identifier for the associated module"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateModuleExecutionRequest"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateModuleExecutionResponse"}}}},"400":{"description":"BadRequestError: Bad Request response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/RegistryError"}}}},"401":{"description":"UnauthorizedError: Unauthorized response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/RegistryError"}}}},"403":{"description":"ForbiddenError: Forbidden response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/RegistryError"}}}},"404":{"description":"NotFoundError: Not Found response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/RegistryError"}}}},"408":{"description":"TimeoutError: Request Timeout response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/RegistryError"}}}},"409":{"description":"ConflictError: Conflict response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/RegistryError"}}}},"423":{"description":"LockedError: Locked response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/RegistryError"}}}},"499":{"description":"ContextCancelledError:  response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/RegistryError"}}}},"500":{"description":"InternalServerError: Internal Server Error response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/RegistryError"}}}},"502":{"description":"BadGatewayError: Bad Gateway response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/RegistryError"}}}}}}}},"components":{"schemas":{"CreateModuleExecutionRequest":{"type":"object","properties":{"account":{"type":"string","description":"account name"},"module_onboarding":{"type":"boolean","description":"Is module onboarding execution","default":false},"pipeline":{"type":"string","description":"The unique identifier for the associated pipeline"},"pipeline_org":{"type":"string","description":"pipeline org"},"pipeline_project":{"type":"string","description":"pipeline project"},"pipelineExecutionId":{"type":"string","description":"The unique identifier for the associated pipeline execution"},"pipelineStageId":{"type":"string","description":"The unique identifier for the associated pipeline stage"}},"required":["account","pipeline_org","pipeline_project","pipelineExecutionId","pipelineStageId","pipeline"]},"CreateModuleExecutionResponse":{"type":"object","properties":{"account":{"type":"string","description":"account name"},"created":{"type":"integer","description":"Created is the unix timestamp at which the resource was originally created in milliseconds.","format":"int64"},"metadata":{"$ref":"#/components/schemas/ModuleExecutionMetadata"},"module_onboarding":{"type":"boolean","description":"Is module onboarding execution","default":false},"moduleId":{"type":"string","description":"The unique identifier for the associated module"},"org":{"type":"string"},"project":{"type":"string"},"status":{"type":"string","description":"The overall status of the execution"}},"required":["org","project","status","created","account","pipeline_org","pipeline_project","pipelineExecutionId","pipelineStageId","moduleId","pipeline"]},"ModuleExecutionMetadata":{"type":"object","properties":{"pipeline":{"type":"string","description":"The unique identifier of any associated pipeline"},"pipeline_execution_id":{"type":"string","description":"The unique identifier for any associated pipeline execution"},"pipeline_execution_number":{"type":"string","description":"The unique number for any associated pipeline execution"},"pipeline_name":{"type":"string","description":"The name of any associated pipeline"},"pipeline_stage_id":{"type":"string","description":"The unique identifier for the associated pipeline stage"},"trigger":{"type":"object","description":"Trigger info for any associated pipeline execution","additionalProperties":true}}},"RegistryError":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?"},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem."},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem."},"name":{"type":"string","description":"Name is the name of this class of errors."},"temporary":{"type":"boolean","description":"Is the error temporary?"},"timeout":{"type":"boolean","description":"Is the error a timeout?"}},"required":["name","id","message","temporary","timeout","fault"]}}}}
```
