update_environment
Changes an environment of a project in part; the health and the freeze have their own doors and never change here.
Change an environment by environment_id with any of name, kind, component_id, url, api_url, admin_url, branch, hosting, region, auto_deploy, protected, health_check_url, current_version and notes (HTML). A field left out keeps its value; a field sent as null is cleared. The change goes through the same action the Environments page runs and environment.updated goes out with what moved. A staff token with environment:update on the project is needed.
Requires ability
The token behind the MCP session must hold it, or the call is refused with TOKEN_MISSING_ABILITY.
Runs the same action as
The REST endpoint and this tool share one action, so validation, permissions and events are identical.
Fires one event
Delivered to every endpoint subscribed to it once the change is made.
Annotations
A client that honours annotations asks a person before running it.
Arguments
environment_id*stringUUID of the environment.
namestringoptionalWhat the environment is called, 2 to 60 characters.
kindstringoptionalWhat the environment is for.
localdevelopmentqastaginguatpreproductionproductioncustomcomponent_idstringoptionalUUID of the component it runs; null when it serves the whole project.
urlstringoptionalThe address people open.
api_urlstringoptionalThe address the API answers on.
admin_urlstringoptionalThe address of the back office.
branchstringoptionalThe branch deployed there.
hostingstringoptionalWhere it runs, in words.
regionstringoptionalThe region it runs in.
auto_deploybooleanoptionalWhether the pipeline deploys to it without a hand.
protectedbooleanoptionalWhether a deployment needs a promotion approval.
health_check_urlstringoptionalThe address the scheduled health check calls.
current_versionstringoptionalThe version running there, as last recorded.
notesstringoptionalAnything the team should know, as HTML.
What it returns
{ "data": { "id": "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b", "project_id": "7f3d1c92-8b45-4e6a-9d21-5c8e0a4b6f13", "component_id": "c0a1b2c3-d4e5-4f60-8a7b-9c0d1e2f3a4b", "name": "Staging", "kind": "staging", "url": "https://staging.example.test", "api_url": "https://api.staging.example.test", "admin_url": null, "branch": "develop", "hosting": "Managed cloud, Frankfurt", "region": "FSN1", "auto_deploy": true, "protected": true, "health": "healthy", "health_check_url": "https://staging.example.test/up", "last_checked_at": "2026-10-28T12:00:00+00:00", "consecutive_failures": 0, "current_version": "web@0.3.0", "frozen_until": null, "frozen": false, "notes": null, "position": 2, "created_at": "2026-10-28T09:20:00+00:00", "updated_at": "2026-10-28T12:05:00+00:00" }}How it fails
VALIDATION_FAILEDa field outside its limits, a kind outside the list, an address that is not a URL, a component_id that is not the project's, or a name already used for the same component.
RESOURCE_NOT_FOUNDunknown environment_id, or an environment outside the token's scope or the person's visibility.
FORBIDDENthe token is a client guest's, or the holder's role on the project does not carry environment:update.
TOKEN_MISSING_ABILITYtoken lacks environment:update.
How is this guide?
Last updated on