> 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) — 고객 워크스페이스의 ID입니다. 프로비저닝 시 반환되며, `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) — 온보딩이 완료된 시점입니다. 그때까지 온보딩 마법사는 워크스페이스의 비즈니스 데이터를 교체하거나 제거할 수 있습니다.
- `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) — 구독이 종료되는 시점입니다. 설정되어 있으면 리셀러가 아직 취소할 수 있는 보류 중인 할당 해제를 의미합니다.
- `pending_downgrade_tier` (string, optional, nullable) — 다운그레이드가 이미 예약된 경우, 기간 경계에서 이 워크스페이스가 전환될 티어입니다.
- `pending_downgrade_at_unix` (integer, optional, nullable) — 예약된 다운그레이드가 적용되는 시점입니다.

### 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()
```