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

# Create workspace

POST https://app.lumenia.net/api/v1/organizations/{orgId}/workspaces
Content-Type: application/json

Create a workspace in an organization.

Reference: https://docs.lumenia.net/api-reference/workspaces/create-workspace

## Authentication

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

## Request

### Path parameters

- `orgId` (string, required) — Organization that will own the workspace.

### Headers

- `X-Account-Id` (string, required) — Account that owns the organization.

### Body (application/json)

This endpoint expects an object.

- `name` (string, required) — Name shown to users. Required and non-blank.

## Response

### 201

The created workspace and its default configuration.

- `workspace` (V1OrganizationsOrgIdWorkspacesPostResponsesContentApplicationJsonSchemaWorkspace, optional)

## Errors

### 400 Bad Request Error

The name is missing or blank, or the workspace could not be created.

- `any`

### 403 Forbidden Error

The API key is missing or invalid, or the X-Account-Id does not belong to the API key partner.

- `message` (string, optional)

### 404 Not Found Error

No organization with this id exists under the account in X-Account-Id.

- `any`

### 500 Internal Server Error

Internal Server Error

- `any`

## Types

### V1OrganizationsOrgIdWorkspacesPostResponsesContentApplicationJsonSchemaWorkspace

- `id` (string, optional) — The workspace id. This uuid is the sole identifier for the workspace; pass it back as-is in paths.
- `organizationId` (string, optional) — The id of the organization that owns this workspace.
- `name` (string, optional) — Human-readable workspace name.
- `createdAt` (string, optional) — ISO 8601 timestamp of when the workspace was created.
- `chat` (V1OrganizationsOrgIdWorkspacesPostResponsesContentApplicationJsonSchemaWorkspaceChat, optional) — Workspace LLM settings. See GET /v1/workspaces/\{workspaceId} for the full field notes. On a new workspace prompt and temperature are null (defaults apply).
- `knowledgeSearch` (V1OrganizationsOrgIdWorkspacesPostResponsesContentApplicationJsonSchemaWorkspaceKnowledgeSearch, optional) — RAG retrieval settings.
- `branding` (V1OrganizationsOrgIdWorkspacesPostResponsesContentApplicationJsonSchemaWorkspaceBranding, optional) — Chat-widget appearance.
- `voice` (V1OrganizationsOrgIdWorkspacesPostResponsesContentApplicationJsonSchemaWorkspaceVoice, optional) — Voice (phone) integration status. Set to \{ connected: false } until a voice assistant is configured. Never includes any secret token.
- `whatsapp` (V1OrganizationsOrgIdWorkspacesPostResponsesContentApplicationJsonSchemaWorkspaceWhatsapp, optional) — WhatsApp integration status. \{ connected: false } until connected.
- `telegram` (V1OrganizationsOrgIdWorkspacesPostResponsesContentApplicationJsonSchemaWorkspaceTelegram, optional) — Telegram integration status. \{ connected: false } until connected.
- `counts` (V1OrganizationsOrgIdWorkspacesPostResponsesContentApplicationJsonSchemaWorkspaceCounts, optional)

### V1OrganizationsOrgIdWorkspacesPostResponsesContentApplicationJsonSchemaWorkspaceChat

Workspace LLM settings. See GET /v1/workspaces/\{workspaceId} for the full field notes. On a new workspace prompt and temperature are null (defaults apply).

- `mode` (enum, optional) — Response mode. chat allows general-knowledge answers when no relevant context is found; query restricts answers to the embedded documents. Defaults to chat.
  - Allowed values: `chat`, `query`
- `prompt` (string, optional, nullable) — Base system prompt. null means the built-in default is used.
- `historyLimit` (integer, optional) — Number of previous messages kept as conversation context.
- `temperature` (double, optional, nullable) — LLM sampling temperature. null means the provider default is used.

### V1OrganizationsOrgIdWorkspacesPostResponsesContentApplicationJsonSchemaWorkspaceKnowledgeSearch

RAG retrieval settings.

- `topResults` (integer, optional) — Maximum number of document chunks retrieved per query (top-N). Defaults to 4.
- `similarityThreshold` (double, optional) — Minimum vector similarity (0 to 1) a chunk must meet to be included. Defaults to 0.25.
- `queryRefusalMessage` (string, optional, nullable) — Message returned in query mode when no relevant context is found. null means the built-in default is used.
- `searchMode` (enum, optional) — Retrieval strategy. Included when reranking is available.
  - Allowed values: `default`, `rerank`

### V1OrganizationsOrgIdWorkspacesPostResponsesContentApplicationJsonSchemaWorkspaceBranding

Chat-widget appearance.

- `background` (string, optional) — Background color as a hex string.
- `foreground` (string, optional) — Foreground/text color as a hex string.
- `logo` (string, optional, nullable) — Absolute public URL of the workspace logo. null when no logo is set or the server public base URL is not configured.

### V1OrganizationsOrgIdWorkspacesPostResponsesContentApplicationJsonSchemaWorkspaceVoice

Voice (phone) integration status. Set to \{ connected: false } until a voice assistant is configured. Never includes any secret token.

- `connected` (boolean, optional) — Whether a voice assistant is configured.

### V1OrganizationsOrgIdWorkspacesPostResponsesContentApplicationJsonSchemaWorkspaceWhatsapp

WhatsApp integration status. \{ connected: false } until connected.

- `connected` (boolean, optional) — Whether WhatsApp is connected.

### V1OrganizationsOrgIdWorkspacesPostResponsesContentApplicationJsonSchemaWorkspaceTelegram

Telegram integration status. \{ connected: false } until connected.

- `connected` (boolean, optional) — Whether Telegram is connected.

### V1OrganizationsOrgIdWorkspacesPostResponsesContentApplicationJsonSchemaWorkspaceCounts

- `embeddedDocuments` (integer, optional) — Number of documents embedded in this workspace (0 for a new workspace).
- `attachedTools` (integer, optional) — Number of org tools enabled on this workspace (0 for a new workspace).

## Examples

**Request**

```json
{
  "name": "Support"
}
```

**Response**

```json
{
  "workspace": {
    "id": "9b8a7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
    "organizationId": "3f2e1d0c-9b8a-4c7d-8e6f-5a4b3c2d1e0f",
    "name": "Support",
    "createdAt": "2026-06-15T05:24:00.000Z",
    "chat": {
      "mode": "chat",
      "prompt": null,
      "historyLimit": 20,
      "temperature": null
    },
    "knowledgeSearch": {
      "topResults": 4,
      "similarityThreshold": 0.25,
      "queryRefusalMessage": null
    },
    "branding": {
      "background": "#ffd940",
      "foreground": "#1a1a1a",
      "logo": null
    },
    "voice": {
      "connected": false
    },
    "whatsapp": {
      "connected": false
    },
    "telegram": {
      "connected": false
    },
    "counts": {
      "embeddedDocuments": 0,
      "attachedTools": 0
    }
  }
}
```

**SDK Code**

```python Workspaces_createWorkspace_example
import requests

url = "https://app.lumenia.net/api/v1/organizations/orgId/workspaces"

payload = { "name": "Support" }
headers = {
    "X-Account-Id": "X-Account-Id",
    "Authorization": "Bearer <API_KEY>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Workspaces_createWorkspace_example
const url = 'https://app.lumenia.net/api/v1/organizations/orgId/workspaces';
const options = {
  method: 'POST',
  headers: {
    'X-Account-Id': 'X-Account-Id',
    Authorization: 'Bearer <API_KEY>',
    'Content-Type': 'application/json'
  },
  body: '{"name":"Support"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Workspaces_createWorkspace_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://app.lumenia.net/api/v1/organizations/orgId/workspaces"

	payload := strings.NewReader("{\n  \"name\": \"Support\"\n}")

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

	req.Header.Add("X-Account-Id", "X-Account-Id")
	req.Header.Add("Authorization", "Bearer <API_KEY>")
	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 Workspaces_createWorkspace_example
require 'uri'
require 'net/http'

url = URI("https://app.lumenia.net/api/v1/organizations/orgId/workspaces")

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

request = Net::HTTP::Post.new(url)
request["X-Account-Id"] = 'X-Account-Id'
request["Authorization"] = 'Bearer <API_KEY>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Support\"\n}"

response = http.request(request)
puts response.read_body
```

```java Workspaces_createWorkspace_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://app.lumenia.net/api/v1/organizations/orgId/workspaces")
  .header("X-Account-Id", "X-Account-Id")
  .header("Authorization", "Bearer <API_KEY>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Support\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.lumenia.net/api/v1/organizations/orgId/workspaces', [
  'body' => '{
  "name": "Support"
}',
  'headers' => [
    'Authorization' => 'Bearer <API_KEY>',
    'Content-Type' => 'application/json',
    'X-Account-Id' => 'X-Account-Id',
  ],
]);

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

```csharp Workspaces_createWorkspace_example
using RestSharp;

var client = new RestClient("https://app.lumenia.net/api/v1/organizations/orgId/workspaces");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Account-Id", "X-Account-Id");
request.AddHeader("Authorization", "Bearer <API_KEY>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"Support\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Workspaces_createWorkspace_example
import Foundation

let headers = [
  "X-Account-Id": "X-Account-Id",
  "Authorization": "Bearer <API_KEY>",
  "Content-Type": "application/json"
]
let parameters = ["name": "Support"] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://app.lumenia.net/api/v1/organizations/orgId/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()
```