---
updatedAt: 2025-06-17T20:55:31.000Z
agentTools:
  projectIndex: https://developers.wingify.com/v2/llms.txt
---

# Update a Project

Request URL for Workspace

```
PATCH /accounts/account_id/projects/project_id
```

Request Payload Schema Format

```json
{
    "name": "Project Name",
    "languages": [
        "NODEJS",
        "PYTHON",
        "PHP",
        "JAVA", 
        "DOTNET",
        "RUBY",
        "GO",
        "JAVASCRIPT"
    ],
    "environments": [
        {
            "id": 1,
            "name": "Staging",
            "isEnabled": true
        },
        {
            "id": 2,
            "name": "Production",
            "isEnabled": false
        }
    ]
}
```

### Key Rules

* All fields (`name`, `languages`, `environments`) are mandatory in the payload.
* Partial updates are not supported. You must always send the full updated state of the project.
* Environments behave like a full replacement. Any environment not included in the payload will be considered deleted.
* New environments are created when an `ID` is passed that does not match the existing ones.
* The `isEnabled` flag in environments is used to indicate the default or active environment. It does not affect existence.

### Example Use Cases

1. **No Change Update**\
   If you’re not changing anything but still calling the update API, you must send all current values to avoid unintentional data loss.
   ```json
   {
     "name": "Acme Project",
     "languages": ["DOTNET", "RUBY"],
     "environments": [
       {
         "id": 1,
         "name": "Staging",
         "isEnabled": true
       },
       {
         "id": 2,
         "name": "Production",
         "isEnabled": false
       }
     ]
   }
   ```
   If you only passed `"GO"` in the list, it would replace the entire language list, removing `"DOTNET"` and `"RUBY"`.
2. **Add a New Language**\
   If the project currently has `["DOTNET", "RUBY"]` and you want to add `"GO"`, you must provide all languages:
   ```json
   {
     "name": "Acme Project",
     "languages": ["DOTNET", "RUBY", "GO"],
     "environments": [
       {
         "id": 1,
         "name": "Staging",
         "isEnabled": true
       },
       {
         "id": 2,
         "name": "Production",
         "isEnabled": false
       }
     ]
   }
   ```
3. **Remove an Environment**\
   To remove an environment (e.g., `Production`), simply omit it from the list:
   ```json
   {
     "name": "Acme Project",
     "languages": ["DOTNET", "RUBY"],
     "environments": [
       {
         "id": 1,
         "name": "Staging",
         "isEnabled": true
       }
     ]
   }
   ```
   This would delete the `Production` environment.
4. **Replace an Environment**\
   To replace an environment, pass an environment object with a new ID. The system will delete the old one and create the new one.
   ```json
   {
     "name": "Acme Project",
     "languages": ["DOTNET", "RUBY"],
     "environments": [
       {
         "id": 1,
         "name": "Staging",
         "isEnabled": false
       },
       {
         "id": 3,
         "name": "Testing",
         "isEnabled": true
       }
     ]
   }
   ```
   In this case, the environment with `id: 2 (Production)` will be deleted, and a new one `(id: 3, Testing)` will be added.

> 🚧 Notes
>
> * Always pass the complete current state of the`name`, `languages` and `environments` lists.
> * Omitting an environment or language will remove it permanently.
> * `isEnabled` only affects whether an environment is considered the *default* one which linking a project in a campaign, and does not impact its presence in the system.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "api",
    "version": "4"
  },
  "servers": [
    {
      "url": "https://app.wingify.com/api/v2"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "token"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/accounts/{account_id}/projects/{project_id}": {
      "patch": {
        "summary": "Update a project",
        "description": "",
        "operationId": "update-a-project",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "description": "Use 'current' keyword to refer to the Main Workspace or the Integer Workspace Id",
            "schema": {
              "type": "string",
              "default": "current"
            },
            "required": true
          },
          {
            "name": "project_id",
            "in": "path",
            "description": "Project Id",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": " Collapse source\n{\n    \"_data\": {\n        \"id\": 1,\n        \"name\": \"projectOne\",\n        \"accountId\": 1,\n        \"createdOn\": 1621265223,\n        \"modifiedOn\": 1621265405,\n        \"createdBy\": {\n            \"name\": \"Backend Testing\",\n            \"imageUrl\": \"//gravatar.com/avatar/5f32891bf0bda2e1c4a931e72f86975b?s=24&d=https%3A%2F%2Fapp.wingify.com%2Fassets%2Fimages%2Favatar-new-3.png\"\n        },\n        \"languages\": [\n            \"DOTNET\",\n            \"RUBY\",\n            \"GO\",\n            \"JAVASCRIPT\"\n        ],\n        \"environments\": [\n            {\n                \"id\": 1,\n                \"name\": \"Env1\",\n                \"isEnabled\": false,\n                \"token\": \"32ccbd56f7c14b19196475846a4cf745\"\n            },\n            {\n                \"id\": 2,\n                \"name\": \"Env45\",\n                \"isEnabled\": true,\n                \"token\": \"e7f2c7b3690b37b5eb241565cd1e3ed6\"\n            }\n        ],\n        \"setting\": {\n            \"isEditable\": true,\n            \"associatedCampaigns\": []\n        }\n    }\n}"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```