> ## Documentation Index
> Fetch the complete documentation index at: https://developers.projectcor.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Workspace

> Updates an existing workspace in your COR instance using its external ID

Updates an existing workspace in your COR instance using its external ID. Performs the same validations as creation and updates only the provided fields.

<Tip>
  To deactivate a workspace, set `active` to `false`. This is the recommended way to "delete" a workspace since there's no DELETE endpoint.
</Tip>

## Path Parameters

<ParamField path="id" type="string" required>
  External workspace ID that was used when creating the workspace
</ParamField>

## Request Body Requirements

<ParamField body="metadata" type="object" required>
  <Expandable title="properties">
    <ParamField body="source" type="string" required>
      Integration source identifier
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="name" type="string">
  Updated workspace name
</ParamField>

<ParamField body="active" type="boolean">
  Whether the workspace is active
</ParamField>

<ParamField body="description" type="string">
  Updated description
</ParamField>

## Known Errors

* `ZC001` — Entity is not associated (workspace with the specified external ID not found)
* `WorkspaceNotFoundError` — No workspace found with the specified external ID
* `ValidationError` — Missing required `metadata.source` field

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request PUT 'https://integrations.projectcor.com/v2/integrations/workspaces/TEAMS-WS-12345' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "metadata": {
      "source": "MICROSOFT_TEAMS"
    },
    "name": "Marketing & Communications Team",
    "description": "Combined marketing and communications workspace"
  }'
  ```

  ```python Python theme={null}
  import requests

  url = "https://integrations.projectcor.com/v2/integrations/workspaces/TEAMS-WS-12345"

  payload = {
      "metadata": {
          "source": "MICROSOFT_TEAMS"
      },
      "name": "Marketing & Communications Team",
      "description": "Combined marketing and communications workspace"
  }

  headers = {
      "Authorization": "Bearer YOUR_ACCESS_TOKEN",
      "Content-Type": "application/json"
  }

  response = requests.put(url, json=payload, headers=headers)
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://integrations.projectcor.com/v2/integrations/workspaces/TEAMS-WS-12345',
    {
      method: 'PUT',
      headers: {
        'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        metadata: {
          source: 'MICROSOFT_TEAMS'
        },
        name: 'Marketing & Communications Team',
        description: 'Combined marketing and communications workspace'
      })
    }
  );

  const data = await response.json();
  console.log(data);
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": 5001,
    "name": "Marketing & Communications Team",
    "active": true,
    "description": "Combined marketing and communications workspace",
    "company_id": 1234,
    "created_at": "2025-01-10T14:30:00Z",
    "updated_at": "2025-01-15T10:00:00Z"
  }
  ```

  ```json 404 theme={null}
  {
    "status": "ERROR",
    "code": "ZC001",
    "message": "Entity is not associated"
  }
  ```

  ```json 404 theme={null}
  {
    "error": "WorkspaceNotFoundError",
    "message": "Workspace with external ID 'TEAMS-WS-12345' not found",
    "code": "ZC004"
  }
  ```
</ResponseExample>
