---
title: "Update module code"
method: POST
path: "/instances/{id}/modules/{moduleId}"
tags: ["Instance Modules"]
---

# Update module code

`POST /instances/{id}/modules/{moduleId}`

## Request

- Base URL: `https://api.cloudpepper.io`
- URL: `https://api.cloudpepper.io/instances/{id}/modules/{moduleId}`
- Auth: HTTP bearer

Updates the module code to a specified branch. This endpoint is used to change the version or branch of an installed module. The module status will be set to 'updating' during this process. This is useful when you need to upgrade a module to a newer version or switch to a different feature branch.

**Key Parameters:**
- `id`: The ID of the instance containing the module
- `moduleId`: The ID of the module to update
- `branch`: The new branch to switch to (e.g., '16.0', '17.0') - typically corresponds to Odoo version

NOTE: The update process runs asynchronously and may take some time to complete depending on the module size.

## Request body

- object
  - `branch` string, required: New branch to switch the module to

## Response `200`

Module update initiated successfully

- string

## Other responses

- `404`: Instance or module not found

---

[API](https://skmtc.dev/cloudpepper/apis/cloudpepper-api-docs.md) · [All operations](https://skmtc.dev/cloudpepper/apis/cloudpepper-api-docs/llms.txt) · [OpenAPI document](https://skmtc.dev/cloudpepper/apis/cloudpepper-api-docs/revisions/b6a59274cedc?raw)
