> This is a page from the ElevenLabs documentation. For an index of the documentation, fetch https://elevenlabs.io/docs/llms.txt.

# रीसेलर वर्कस्पेस अपडेट करें

PATCH https://api.elevenlabs.io/v1/reception/reseller/workspaces/{workspace_id}
Content-Type: application/json

कस्टमर वर्कस्पेस अपडेट करें। सिर्फ़ भेजी गई फ़ील्ड बदली जाती हैं।

Reference: https://elevenlabs.io/docs/api-reference/reception/workspaces/update

## Servers

- `https://api.elevenlabs.io` (Production, default)
- `https://api.us.elevenlabs.io` (Production US)
- `https://api.eu.residency.elevenlabs.io` (Production EU)
- `https://api.in.residency.elevenlabs.io` (Production India)
- `https://api.sg.residency.elevenlabs.io` (Production Singapore)

## Request

### Path parameters

- `workspace_id` (string, required) — customer workspace की ID। इसे provision करने पर लौटाई जाती है; इन्हें `GET /v1/reception/reseller/workspaces` से सूचीबद्ध करें।

### Body (application/json)

This endpoint expects an UpdateResellerWorkspaceRequest.

- `metadata` (map from string to string, optional) — वर्कस्पेस का पूरा मेटाडेटा मैप बदल देता है; इसे साफ़ करने के लिए `{}` भेजें। न भेजने पर यह अपरिवर्तित रहता है।

## Response

### 200

सफल रिस्पॉन्स

- `workspace_id` (string, required)
- `business_name` (string, required)
- `billing_tier` (string, required, nullable)
- `receptionist_count` (integer, required)
- `calls_last_30_days` (integer, required)
- `created_at_unix` (integer, required)
- `subscription` (ResellerWorkspaceSubscription, optional, nullable) — रिसेलर द्वारा प्रबंधित सब्सक्रिप्शन, यदि इस वर्कस्पेस के पास है। None का मतलब है कि रिसेलर यहां कुछ नहीं बेचता: अभी कोई टियर असाइन नहीं किया गया है या वर्कस्पेस अपने सब्सक्रिप्शन का भुगतान खुद करता है (charge_customer देखें)।
- `charge_customer` (boolean, optional, default: false) — वर्कस्पेस अपने सब्सक्रिप्शन का भुगतान खुद करता है, इसलिए उसका टियर यहां असाइन या बदला नहीं जा सकता।
- `has_payment_issue` (boolean, optional, default: false) — A charge for this workspace is unpaid. Assigning or changing a tier is refused until it clears, so surface it rather than letting it fail.
- `onboarding_completed_at_unix` (integer, optional, nullable) — onboarding कब पूरा हुआ। तब तक onboarding wizard workspace के व्यवसाय डेटा को बदल या हटा सकता है।
- `metadata` (map from string to string, optional, default: {}) — वर्कस्पेस के लिए आपके अपने की-वैल्यू पेयर।

## Errors

### 422 Unprocessable Entity Error

वैलिडेशन एरर

- `detail` (list of ValidationError, optional)

## Types

### ResellerWorkspaceSubscription

A reseller-managed paid subscription, as the reseller can act on it. Present only for a workspace the reseller actually sells to: untiered and trial workspaces have no subscription to change or end, and are assigned to instead.

- `tier_id` (string, required)
- `billing_period` (enum, required, nullable) — Cadence being billed. None only for a subscription mid-provisioning.
  - Allowed values: `monthly_period`, `annual_period`
- `billing_period_end_unix` (integer, required) — वर्तमान अवधि कब खत्म होती है और इसलिए टाला गया बदलाव कब लागू होता है।
- `cancel_at_unix` (integer, optional, nullable) — subscription कब खत्म होती है। Set होने का मतलब है लंबित unassignment, जिसे रीसेलर अभी भी पूर्ववत कर सकता है।
- `pending_downgrade_tier` (string, optional, nullable) — अगर downgrade पहले से शेड्यूल है, तो अवधि खत्म होने पर यह workspace जिस tier पर जाएगा।
- `pending_downgrade_at_unix` (integer, optional, nullable) — वह शेड्यूल किया गया downgrade कब लागू होता है।

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### ValidationErrorLocItems

- string
- integer

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "workspace_id": "string",
  "business_name": "string",
  "billing_tier": "string",
  "receptionist_count": 1,
  "calls_last_30_days": 1,
  "created_at_unix": 1,
  "subscription": {
    "tier_id": "string",
    "billing_period": "monthly_period",
    "billing_period_end_unix": 1,
    "cancel_at_unix": 1,
    "pending_downgrade_tier": "string",
    "pending_downgrade_at_unix": 1
  },
  "charge_customer": false,
  "has_payment_issue": false,
  "onboarding_completed_at_unix": 1,
  "metadata": {}
}
```

**SDK Code**

```python
import requests

url = "https://api.elevenlabs.io/v1/reception/reseller/workspaces/3f2c9a7e1b4d4c8e9a6f0b2d5e7c1a93"

payload = {}
headers = {"Content-Type": "application/json"}

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

print(response.json())
```

```javascript
const url = 'https://api.elevenlabs.io/v1/reception/reseller/workspaces/3f2c9a7e1b4d4c8e9a6f0b2d5e7c1a93';
const options = {method: 'PATCH', headers: {'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.elevenlabs.io/v1/reception/reseller/workspaces/3f2c9a7e1b4d4c8e9a6f0b2d5e7c1a93"

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

	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.elevenlabs.io/v1/reception/reseller/workspaces/3f2c9a7e1b4d4c8e9a6f0b2d5e7c1a93")

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 = "{}"

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.elevenlabs.io/v1/reception/reseller/workspaces/3f2c9a7e1b4d4c8e9a6f0b2d5e7c1a93")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.elevenlabs.io/v1/reception/reseller/workspaces/3f2c9a7e1b4d4c8e9a6f0b2d5e7c1a93', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.elevenlabs.io/v1/reception/reseller/workspaces/3f2c9a7e1b4d4c8e9a6f0b2d5e7c1a93");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.elevenlabs.io/v1/reception/reseller/workspaces/3f2c9a7e1b4d4c8e9a6f0b2d5e7c1a93")! 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()
```