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

# Update workspace settings

PATCH https://api.voicebip.com/v1/workspace
Content-Type: application/json

Partial update. Only fields present in the request body are
mutated. `tier` is billing-controlled and cannot be changed
here. `signing_secret` is rotated through a separate flow.

Reference: https://docs.voicebip.com/api/workspace/update-workspace

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://api.voicebip.com` (Production, default)
- `https://sandbox.voicebip.com` (Sandbox)

## Request

### Body (application/json)

This endpoint expects an object.

- `name` (string, optional) — Non-empty display name.
- `webhook_url` (string, optional) — Must start with http:// or https://.
- `retention_days` (integer, optional)

## Response

### 200

Updated workspace

- `id` (string, required)
- `name` (string, required)
- `tier` (enum, required)
  - Allowed values: `starter`, `builder`, `scale`
- `retention_days` (integer, required) — NDPR data retention window for this workspace.
- `created_at` (datetime, required)
- `updated_at` (datetime, required)
- `webhook_url` (string, optional)
- `signing_secret_rotated_at` (datetime, optional) — Timestamp of the most recent signing-secret rotation. Absent (omitted from the response) when the workspace has never rotated its signing secret. The secret value itself is never returned by this endpoint — see POST /v1/workspace/signing-secret/rotate.

## Errors

### 400 Update Workspace Request Bad Request Error

Bad request

- `error_code` (enum, required)
  - Allowed values: `NOT_FOUND`, `ALREADY_EXISTS`, `INVALID_ARGUMENT`, `PERMISSION_DENIED`, `UNAUTHENTICATED`, `RATE_LIMITED`, `INTERNAL`, `UNAVAILABLE`, `QUOTA_EXCEEDED`, `NUMBER_UNAVAILABLE`, `CALL_FAILED`, `MESSAGE_FAILED`, `WEBHOOK_FAILED`, `AI_PROVIDER_ERROR`, `CALL_WINDOW_RESTRICTED`, `INVALID_REQUEST`, `INVALID_PLAN`, `NO_OP`, `NO_ACTIVE_SUBSCRIPTION`, `WORKSPACE_NOT_FOUND`, `TIER_SWITCH_UNSUPPORTED`, `INSUFFICIENT_BALANCE`, `WORKSPACE_BLOCKED`, `TIER_SWITCH_TOO_FREQUENT`, `CHANNEL_MISMATCH`, `OPT_OUT_ENFORCED`, `UPSTREAM_ERROR`, `REQUEST_BODY_TOO_LARGE`, `INVALID_BODY`, `AI_ERROR`, `ADMIN_DISABLED`, `STORE_UNAVAILABLE`, `ADMIN_DB_UNAVAILABLE`, `MISSING_ACTOR`, `ACTOR_TOO_LONG`, `MISSING_FIELD`, `INVALID_JSON`, `INVALID_AMOUNT`, `INVALID_INCLUDED_QTY`, `INVALID_CURRENCY`, `INVALID_PROFILE`, `INVALID_RESOURCE`, `INVALID_UNIT`, `INVALID_TIER`, `INVALID_EFFECTIVE_FROM`, `NOTES_TOO_LONG`, `INVALID_LIMIT`, `LIST_FAILED`, `UPSERT_FAILED`, `WORKSPACE_OVERRIDE_DISABLED`, `WORKSPACE_OVERRIDE_UNCONFIRMED`, `MISSING_WORKSPACE_HEADER`, `INVALID_PASSWORD`, `INVALID_EMAIL`, `INVALID_CREDENTIALS`, `EMAIL_EXISTS`, `EMAIL_NOT_VERIFIED`, `WEAK_PASSWORD`, `MISSING_COMPANY`, `MISSING_TOKEN`, `INVALID_TOKEN`, `TOO_MANY_ATTEMPTS`
- `message` (string, required)
- `request_id` (string, required)
- `documentation_url` (string, optional)

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "id": "ws_xyz123",
  "name": "Acme Corp",
  "tier": "starter",
  "retention_days": 1,
  "created_at": "2024-01-15T09:30:00Z",
  "updated_at": "2024-01-15T09:30:00Z",
  "webhook_url": "webhook_url",
  "signing_secret_rotated_at": "2024-01-15T09:30:00Z"
}
```

**SDK Code**

```python
import requests

url = "https://api.voicebip.com/v1/workspace"

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

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

print(response.json())
```

```javascript
const url = 'https://api.voicebip.com/v1/workspace';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', '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://api.voicebip.com/v1/workspace"

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

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

	req.Header.Add("Authorization", "Bearer <token>")
	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.voicebip.com/v1/workspace")

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

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
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://api.voicebip.com/v1/workspace")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.voicebip.com/v1/workspace', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.voicebip.com/v1/workspace");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

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

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.voicebip.com/v1/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()
```