Update an environment

View as Markdown
Updates specific environment properties, such as its name and variables. **Note:** - You can only perform one type of operation at a time. For example, you cannot perform an `add` and `replace` operation in the same call. - The request body size cannot exceed the maximum allowed size of 30MB. - If you receive an HTTP `411 Length Required` error response, manually pass the `Content-Length` header and its value in the request header. - To add a description to an existing variable, use the `add` operation. - Only [shared variable](https://learning.postman.com/docs/use/send-requests/variables/variables/#share-variable-values) values can be modified through the Postman API. A shared variable is an environment variable with its value synced and stored in the Postman cloud, and can be accessed by your teammates in the environment's workspace.

Authentication

x-api-keystring
API Key authentication via header

Path parameters

environmentIdstringRequired
The environment's ID.

Request

This endpoint expects a list of objects.
Add Variablelist of objectsRequired
OR
Update Environment Namelist of objectsRequired
OR
Update Variablelist of objectsRequired
OR
Remove Variablelist of objectsRequired

Response

Successful Response
environmentobject
Information about the environment.

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
411
Length Required Error
413
Content Too Large Error