---
title: "Updates an environment"
method: PUT
path: "/api/environment/{id}"
---

# Updates an environment

`PUT /api/environment/{id}`

## Path parameters

- `id` string, required

## Response `200`

If update is success.

- ResponseEntityEnvironmentView
  - `errors` ErrorEntity[]
    - `errorCode` string
    - `message` string
    - `fieldName` string
  - `entity` Environment
    - `id` string
    - `name` string
    - `pushToAll` boolean
    - `permissionId` string
    - `owner` string
  - `messages` MessageEntity[]
    - `message` string
  - `i18nMessagesMap` object
  - `permissions` string[]
  - `pagination` Pagination
    - `currentPage` integer
    - `perPage` integer
    - `totalEntries` integer

## Other responses

- `400` — If the environment already exits
- `403` — If the user is not an admin or access to the configuration layout or does have permission, it will return a 403.

---

[API](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api.md) · [All operations](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/anzworldline-solutions/dotcms-rest-api/revisions/0f38cbc3bd36/schema)
