Logo
30-day challenge API Documentation

Update an environment

PUT https://api.getpostman.com/environments/{{environmentId}}

Updates an environment. Include the following properties in the request body:

  • name — A string that contains the environment's name.

You can also include the following optional properties:

  • values — An array of objects that contains the following:
    • key — The variable's name.
    • value — The variable's value.
    • enabled — If true, enable the variable.
    • type — The variable's type. One of: secret, default, or any.

 

Body PARAM

Key Datatype Required Description 



HEADERS

Key Datatype Required Description 
Content-Type
string




RESPONSES

status OK

{ "environment": { "id": "5daabc50-8451-43f6-922d-96b403b4f28e", "name": "Test A Environment", "uid": "12345678-5daabc50-8451-43f6-922d-96b403b4f28e" } }



Curl
curl -X PUT 'https://api.getpostman.com/environments/undefined' -H 'Content-Type: application/json' -d '{"environment":{"name":"undefined","values":[{"key":"undefined","value":"undefined","enabled":"undefined","type":"undefined"}]}}'

ENDPOINTS