Edit
- PATCH
- /workspaces
- /:workspace
- /projects
- /:project_name
- /environments
- /:environment_id
Edits an environment in the project.
Request
REQUIRED SCOPES
ENVIRONMENT_MANAGE
URL PARAMETERS
workspacerequired string
The workspace name.project_namerequired string
The name ID of the project.environment_idrequired string
The unique string ID of the desired environment.POST PARAMETERS
namestring
The name of the environmentidentifierstring
Readable ID for environment. It can consist of uppercase and lowercase letters, numbers, and underscores. It must start with a letter.public_urlstring
The public URL for the environmenttagsstring[]
A list of tagsvariablesvariable[]
Define to set variables for the environment.permissionspermission[]
Define to set permissions for the environment.all_pipelines_allowedboolean
Defines whether all pipelines are allowed to use the environment.allowed_pipelinesPipeline[]
Defines an object with the property id for pipelines that can use this environment.Last modified on Nov 13, 2025
Example:
curl -X PATCH "https://api.buddy.works/workspaces/:workspace/projects/:project_name/environments/:environment_id" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"identifier": "stage_env",
"name": "Staging environment",
"tags": [
"staging",
"tag1"
],
"public_url": "http://staging.com",
"variables": [
{
"key": "myVar1",
"value": "myValue1",
"type": "VAR",
"settable": true,
"run_only_settable": true,
"encrypted": false,
"description": "some variable1"
},
{
"key": "myVar2",
"value": "myValue2",
"type": "VAR",
"settable": true,
"run_only_settable": true,
"encrypted": false,
"description": "some variable2"
}
],
"permissions": {
"others": "DENIED",
"users": [
{
"id": 1,
"access_level": "MANAGE"
}
],
"groups": [
{
"id": 2,
"access_level": "USE_ONLY"
}
]
},
"all_pipelines_allowed": false,
"allowed_pipelines": [
{
"id": 1
}
]
}'EXAMPLE RESPONSE{ "url": "https://api.buddy.works/workspaces/buddy/projects/company-website", "html_url": "https://app.buddy.works/buddy/company-website/environments/environment/9DBbgP4q", "id": "9DBbgP4q", "name": "Staging environment", "identifier": "stage_env", "tags": [ "staging", "tag1" ], "public_url": "http://staging.com", "all_pipelines_allowed": false, "allowed_pipelines": [ { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/1", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/1", "id": 1, "name": "Tests" } ], "project": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website", "html_url": "https://app.buddy.works/buddy/company-website", "name": "company-website", "display_name": "Company Website", "status": "ACTIVE" }, "variables": [ { "id": 1, "key": "myVar1", "value": "myValue1", "type": "VAR", "settable": true, "run_only_settable": true, "description": "some variable1" }, { "id": 2, "key": "myVar2", "value": "myValue2", "type": "VAR", "settable": true, "run_only_settable": true, "description": "some variable2" } ], "permissions": { "others": "DENIED", "users": [ { "id": 1, "access_level": "MANAGE" } ], "groups": [ { "id": 422, "access_level": "USE_ONLY" } ] } }
STATUS201 Created
LIMITSX-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999