---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../../modules.md) / [operations/mrt](../index.md) / updateEnvironmentScapi

# Function: updateEnvironmentScapi()

> **updateEnvironmentScapi**(`conn`, `params`): `Promise`\<\{ `environment`: [`MrtEnvironmentView`](../interfaces/MrtEnvironmentView.md); `raw`: `unknown`; \}\>

Defined in: [packages/b2c-tooling-sdk/src/operations/mrt/env.ts:1308](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/8fc17d8708d025c83fb0c44ca73198a200605153/packages/b2c-tooling-sdk/src/operations/mrt/env.ts#L1308)

Updates an environment via the SCAPI MRT Environments API. Only the supplied
fields change (200 OK returns the updated environment). The `mrt env update`
command only exposes the display name, but the SCAPI contract (and this
function) accept the full update surface.

## Parameters

### conn

[`ScapiMrtConnection`](../interfaces/ScapiMrtConnection.md)

### params

#### changes

\{ \}

#### environmentId

`string`

#### storefrontId

`string`

## Returns

`Promise`\<\{ `environment`: [`MrtEnvironmentView`](../interfaces/MrtEnvironmentView.md); `raw`: `unknown`; \}\>

## Throws

carrying the HTTP status on a non-2xx response.
