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

# UpdateWorkspace

PATCH https://api//api/public/management/organizations/workspaces/{workspaceId}
Content-Type: application/json

Update a given workspace in your organization.

Reference: https://docs.heyreach.io/hey-reach-api/organization/workspaces/update-workspace

## Request

### Path parameters

- `workspaceId` (string, required)

### Headers

- `X-API-KEY` (string, optional) — Workspace API Key

### Body (application/json)

This endpoint expects an object.

- `workspaceName` (string, required)
- `seatsLimit` (object, required)
  - `value` (integer, required)

## Response

### 200

OK

- `workspaceId` (integer, required)
- `workspaceName` (string, required)
- `seatsLimit` (integer, required)
- `usedSeats` (integer, required)

## Errors

### 400 Update Workspace Workspaces Request Bad Request Error

Bad Request

- `type` (string, required)
- `title` (string, required)
- `status` (integer, required)
- `detail` (string, required)
- `instance` (string, required)

### 401 Update Workspace Workspaces Request Unauthorized Error

Unauthorized

- `type` (string, required)
- `title` (string, required)
- `status` (integer, required)
- `detail` (string, required)
- `instance` (string, required)

### 429 Update Workspace Workspaces Request Too Many Requests Error

Too Many Requests

- `type` (string, required)
- `title` (string, required)
- `status` (integer, required)
- `detail` (string, required)
- `instance` (string, required)

### 500 Update Workspace Workspaces Request Internal Server Error

Internal Server Error

- `any`

## Examples

**Request**

```json
{
  "workspaceName": {
    "0": "s",
    "1": "t",
    "2": "r",
    "3": "i",
    "4": "n",
    "5": "g",
    "value": "string"
  },
  "seatsLimit": {
    "value": {
      "value": 9730
    }
  }
}
```

**Response**

```json
{
  "workspaceId": 9419,
  "workspaceName": "string",
  "seatsLimit": 2983,
  "usedSeats": 9967
}
```

**SDK Code**

```python
import requests

url = "https://api//api/public/management/organizations/workspaces/3642"

payload = {
    "workspaceName": {
        "0": "s",
        "1": "t",
        "2": "r",
        "3": "i",
        "4": "n",
        "5": "g",
        "value": "string"
    },
    "seatsLimit": { "value": { "value": 9730 } }
}
headers = {"Content-Type": "application/json"}

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

print(response.json())
```

```javascript
const url = 'https://api//api/public/management/organizations/workspaces/3642';
const options = {
  method: 'PATCH',
  headers: {'Content-Type': 'application/json'},
  body: '{"workspaceName":{"0":"s","1":"t","2":"r","3":"i","4":"n","5":"g","value":"string"},"seatsLimit":{"value":{"value":9730}}}'
};

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://api//api/public/management/organizations/workspaces/3642"

	payload := strings.NewReader("{\n  \"workspaceName\": {\n    \"0\": \"s\",\n    \"1\": \"t\",\n    \"2\": \"r\",\n    \"3\": \"i\",\n    \"4\": \"n\",\n    \"5\": \"g\",\n    \"value\": \"string\"\n  },\n  \"seatsLimit\": {\n    \"value\": {\n      \"value\": 9730\n    }\n  }\n}")

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

	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://api//api/public/management/organizations/workspaces/3642")

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

request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"workspaceName\": {\n    \"0\": \"s\",\n    \"1\": \"t\",\n    \"2\": \"r\",\n    \"3\": \"i\",\n    \"4\": \"n\",\n    \"5\": \"g\",\n    \"value\": \"string\"\n  },\n  \"seatsLimit\": {\n    \"value\": {\n      \"value\": 9730\n    }\n  }\n}"

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://api//api/public/management/organizations/workspaces/3642")
  .header("Content-Type", "application/json")
  .body("{\n  \"workspaceName\": {\n    \"0\": \"s\",\n    \"1\": \"t\",\n    \"2\": \"r\",\n    \"3\": \"i\",\n    \"4\": \"n\",\n    \"5\": \"g\",\n    \"value\": \"string\"\n  },\n  \"seatsLimit\": {\n    \"value\": {\n      \"value\": 9730\n    }\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api//api/public/management/organizations/workspaces/3642', [
  'body' => '{
  "workspaceName": {
    "0": "s",
    "1": "t",
    "2": "r",
    "3": "i",
    "4": "n",
    "5": "g",
    "value": "string"
  },
  "seatsLimit": {
    "value": {
      "value": 9730
    }
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api//api/public/management/organizations/workspaces/3642");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"workspaceName\": {\n    \"0\": \"s\",\n    \"1\": \"t\",\n    \"2\": \"r\",\n    \"3\": \"i\",\n    \"4\": \"n\",\n    \"5\": \"g\",\n    \"value\": \"string\"\n  },\n  \"seatsLimit\": {\n    \"value\": {\n      \"value\": 9730\n    }\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "workspaceName": [
    "0": "s",
    "1": "t",
    "2": "r",
    "3": "i",
    "4": "n",
    "5": "g",
    "value": "string"
  ],
  "seatsLimit": ["value": ["value": 9730]]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api//api/public/management/organizations/workspaces/3642")! 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()
```