> This page is for Alfa (Preview).

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.alfa.boosted.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.alfa.boosted.ai/_mcp/server.

# Update Workspace

PATCH https://sandbox.api.boosted.ai/v2/account-management/workspace
Content-Type: application/json

A partner, using a token signed by their clientId and clientSecret, can call this method to update the current metadata associated with the workspace id. If any field is null, it is not updated.

Reference: https://docs.alfa.boosted.ai/alfa-preview/account-management-api/reference/update/workspace-v-2

## Authentication

- `Authorization` header (required) — Enter your JWT Token here in the format: Bearer \{token}

## Request

### Query parameters

- `workspace_id` (string, optional) — Workspace Id
- `external_workspace_id` (string, optional) — External Workspace Id

### Body (application/json)

This endpoint expects an user_service.PatchManagedWorkspaceRequestV2.

- `entitlements` (list of user_service.BillingFeatureQuantityV2, optional)
- `external_workspace_id` (string, optional)
- `name` (string, optional)

## Response

### 200

OK

- `message` (string, optional)
- `success` (boolean, optional)
- `workspace` (user_service.ManagedWorkspaceV2, optional)

## Errors

### 400 Bad Request Error

Bad Request

- `map from string to string`

### 403 Forbidden Error

Unauthorized

- `map from string to string`

### 422 Unprocessable Entity Error

Validation Error

- `map from string to string`

## Types

### user_service.BillingFeatureQuantityV2

- `billing_feature_id` (string, optional)

### user_service.ManagedWorkspaceV2

- `entitlements` (list of user_service.BillingFeatureQuantityV2, optional)
- `external_workspace_id` (string, optional)
- `name` (string, optional)
- `org_id` (string, optional)
- `workspace_id` (string, optional)

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "message": "string",
  "success": true,
  "workspace": {
    "entitlements": [
      {
        "billing_feature_id": "string"
      }
    ],
    "external_workspace_id": "string",
    "name": "string",
    "org_id": "string",
    "workspace_id": "string"
  }
}
```

**SDK Code**

```python
import requests

url = "https://sandbox.api.boosted.ai/v2/account-management/workspace"

payload = {}
headers = {
    "Authorization": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://sandbox.api.boosted.ai/v2/account-management/workspace';
const options = {
  method: 'PATCH',
  headers: {Authorization: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://sandbox.api.boosted.ai/v2/account-management/workspace"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://sandbox.api.boosted.ai/v2/account-management/workspace")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://sandbox.api.boosted.ai/v2/account-management/workspace")
  .header("Authorization", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://sandbox.api.boosted.ai/v2/account-management/workspace', [
  'body' => '{}',
  'headers' => [
    'Authorization' => '<apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://sandbox.api.boosted.ai/v2/account-management/workspace");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox.api.boosted.ai/v2/account-management/workspace")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```