> 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/update-module.md).

# Update module

Update a module in the module registry

```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/{id}":{"put":{"tags":["module-registry"],"summary":"Update module","description":"Update a module in the module registry","operationId":"module-registry#update-module","parameters":[{"name":"scope_org","in":"query","description":"Organization identifier where the module is scoped.","allowEmptyValue":true,"schema":{"type":"string","description":"Organization identifier where the module is scoped.","maxLength":1024}},{"name":"scope_project","in":"query","description":"Project identifier where the module is scoped.","allowEmptyValue":true,"schema":{"type":"string","description":"Project identifier where the module is scoped.","maxLength":1024}},{"name":"id","in":"path","description":"module id","required":true,"schema":{"type":"string","description":"module id"}},{"name":"Harness-Account","in":"header","description":"Harness account ID that owns the module.","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Harness account ID that owns the module.","minLength":1,"maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateModuleRequest"}}}},"responses":{"200":{"description":"OK response."},"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":{"UpdateModuleRequest":{"type":"object","properties":{"description":{"type":"string","description":"Free-form text describing the purpose and usage of the module."},"git_tag_style":{"type":"string","description":"Pattern used to match Git tags for module versioning. Use 'module-name-*' to match tags like 'my-vpc-module-v1.0.0'."},"name":{"type":"string","description":"Human-readable name of the module. Must be unique within the same scope and system.","minLength":1,"maxLength":128},"onboarding_pipeline":{"type":"string","description":"Identifier of the Harness pipeline used for module onboarding and metadata sync."},"onboarding_pipeline_org":{"type":"string","description":"Organization where the onboarding pipeline is defined. Defaults to scope_org if not provided."},"onboarding_pipeline_project":{"type":"string","description":"Project where the onboarding pipeline is defined. Defaults to scope_project if not provided."},"onboarding_pipeline_sync":{"type":"boolean","description":"When true, module metadata is automatically synced via the onboarding pipeline when new Git tags are pushed.","default":false},"org":{"type":"string","description":"Organization identifier where the Git connector is defined. Defaults to scope_org if not provided.","maxLength":1024},"project":{"type":"string","description":"Project identifier where the Git connector is defined. Defaults to scope_project if not provided.","maxLength":1024},"repository":{"type":"string","description":"Name of the Git repository that contains the module source code."},"repository_branch":{"type":"string","description":"Repository Branch in which the code should be accessed."},"repository_commit":{"type":"string","description":"Repository Commit/Tag in which the code should be accessed."},"repository_connector":{"type":"string","description":"Harness Git connector identifier used to access the Git repository. Must reference a valid Git connector in your account. Leave empty when using Harness Code as the repository source."},"repository_path":{"type":"string","description":"Repository Path is the path in which the infra code resides.","default":""},"storage_type":{"type":"string","description":"Defines how module versions are stored. 'git_reference' resolves versions from Git tags; 'artifact' stores uploaded archive files.","default":"git_reference","enum":["git_reference","artifact"]},"system":{"type":"string","description":"Provider or system the module targets. Lowercase letters only (e.g. aws, gcp, azure, kubernetes).","pattern":"^[a-z]+$","minLength":1,"maxLength":128},"tags":{"type":"string","description":"Comma-separated list of tags to categorize the module (e.g. networking,vpc,aws)."}},"required":["name","system"]},"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"]}}}}
```
