> This is a page from the ElevenLabs documentation. For a complete page index, fetch https://elevenlabs.io/docs/llms.txt. For the full documentation in a single file, fetch https://elevenlabs.io/docs/llms-full.txt.

# Create Reseller Workspace

POST https://api.elevenlabs.io/v1/reception/reseller/workspaces
Content-Type: application/json

Create a workspace for one of your customers, optionally with a tier, a phone number and team invites.

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

## 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

### Body (application/json)

This endpoint expects a ProvisionResellerWorkspaceRequest.

- `business_name` (string, required)
- `subscription` (ProvisionResellerWorkspaceSubscription, optional, nullable) — Paid tier to subscribe to. Omitted leaves the workspace with no subscription.
- `phone_number` (string, optional, nullable) — A free number from the reseller's phone pool, reserved for the workspace until onboarding binds it to the receptionist.
- `members` (list of TeamInviteRequest, optional, default: []) — People to invite once the workspace exists, capped by the tier's team size. Best-effort: each outcome is in `member_results`.
- `complete_onboarding` (boolean, optional, default: false) — Finish setup right away, as `POST /v1/reception/reseller/workspaces/{workspace_id}/complete-onboarding` does. Best-effort: `onboarding_completed_at_unix` stays null on failure, and that call can be retried.
- `idempotency_key` (string, optional, nullable) — Client-generated key that makes a retry safe. The same key and body within 24 hours returns the first result without running again. While that first request is still running, a retry gets 409 `idempotency_key_in_progress`; a different body with the same key gets 400 `idempotency_key_reused`. A request that fails is not saved, so it can be retried with the same key.

## Response

### 200

Geslaagde response

- `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) — The reseller-managed subscription, when this workspace has one. None means nothing is sold here yet and a tier can be assigned.
- `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) — When onboarding finished. Until then the onboarding wizard may replace or remove the workspace's business data.
- `member_results` (list of TeamInviteResult, optional, default: [])

## Errors

### 422 Unprocessable Entity Error

Validatiefout

- `detail` (list of ValidationError, optional)

## Types

### ProvisionResellerWorkspaceSubscription

- `tier_id` (string, required)
- `billing_period` (enum, optional, default: monthly_period)
  - Allowed values: `monthly_period`, `annual_period`

### TeamInviteRequest

- `email` (string, required)
- `role` (enum, optional, default: workspace_member)
  - Allowed values: `workspace_admin`, `workspace_member`

### 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) — When the current period ends, and so when a deferred change lands.
- `cancel_at_unix` (integer, optional, nullable) — When the subscription ends. Set means a pending unassignment the reseller can still undo.
- `pending_downgrade_tier` (string, optional, nullable) — Tier this workspace drops to at the period boundary, if a downgrade is already scheduled.
- `pending_downgrade_at_unix` (integer, optional, nullable) — When that scheduled downgrade takes effect.

### TeamInviteResult

- `email` (string, required)
- `outcome` (enum, required)
  - Allowed values: `invited`, `failed`
- `error_status` (string, optional, nullable)

### ValidationError

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

### ValidationErrorLocItems

- string
- integer

## Examples

**Request**

```json
{
  "business_name": "string"
}
```

**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
  },
  "has_payment_issue": false,
  "onboarding_completed_at_unix": 1,
  "member_results": [
    {
      "email": "string",
      "outcome": "invited",
      "error_status": "string"
    }
  ]
}
```

**SDK Code**

```python
import requests

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

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

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

print(response.json())
```

```javascript
const url = 'https://api.elevenlabs.io/v1/reception/reseller/workspaces';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"business_name":"string"}'
};

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"

	payload := strings.NewReader("{\n  \"business_name\": \"string\"\n}")

	req, _ := http.NewRequest("POST", 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")

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

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"business_name\": \"string\"\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.post("https://api.elevenlabs.io/v1/reception/reseller/workspaces")
  .header("Content-Type", "application/json")
  .body("{\n  \"business_name\": \"string\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

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

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

```csharp
using RestSharp;

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

```swift
import Foundation

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

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.elevenlabs.io/v1/reception/reseller/workspaces")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```