> ## Documentation Index
> Fetch the complete documentation index at: https://docs.unleashx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Workspace

> Create a workspace under the API token's company. Delegates to the same internal logic as /api/company/create-workspace, so the two entry points can never drift.

Create a new workspace under your API token's company. This delegates to the
same internal controller used by the company-side `/api/company/create-workspace`
endpoint, so both entry points always stay in sync.

## API Endpoint

**POST** `/api/v1/global/create-workspace`

**Base URL:** `https://www.tryunleashx.com`

**Authentication:** Required (Token header: `token` or `api_access_token`)

## Request Body

| Field            | Type   | Required | Description                                                                                |
| ---------------- | ------ | -------- | ------------------------------------------------------------------------------------------ |
| `workspace_name` | string | Yes      | Name for the new workspace. Must be unique among active workspaces in the token's company. |

## Success Response

**Status Code:** `200 OK`

```json theme={null}
{
  "error": false,
  "code": 200,
  "message": "",
  "timestamp": 1769243432947,
  "data": {
    "message": "WORKSPACE_CREATED_SUCCESSFULLY",
    "data": {
      "WORKSPACE_ID": 301,
      "WORKSPACE_NAME": "Growth Team",
      "COMPANY_ID": 42,
      "OWNER_ID": 7,
      "CONCURRENCY": 5,
      "WORKSPACE_STATUS": 1
    }
  }
}
```

## Response Fields

| Field              | Type    | Description                                      |
| ------------------ | ------- | ------------------------------------------------ |
| `WORKSPACE_ID`     | integer | Unique identifier of the newly created workspace |
| `WORKSPACE_NAME`   | string  | Name of the workspace                            |
| `COMPANY_ID`       | integer | Company the workspace belongs to                 |
| `OWNER_ID`         | integer | User who created the workspace                   |
| `CONCURRENCY`      | integer | Default concurrent-call limit for the workspace  |
| `WORKSPACE_STATUS` | integer | `1` = active                                     |

## Access Control

The token resolves to a user and a company; the workspace is always created
under that company. Creating a workspace also seeds its default settings, adds
the creator (and the company owner, if different) as a workspace admin, seeds
the creator's domain whitelist entry, and triggers the same `workspace_created`
notification email as the company-side endpoint.

## Errors

| Status | Message                         | Cause                                                             |
| ------ | ------------------------------- | ----------------------------------------------------------------- |
| `422`  | `WORKSPACE_NAME_ALREADY_EXISTS` | An active workspace with this name already exists for the company |

## Example cURL

```bash theme={null}
curl -X POST "https://www.tryunleashx.com/api/v1/global/create-workspace" \
  -H "token: <api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "workspace_name": "Growth Team"
  }'
```

## Related Operations

* [List Workspaces](/api-reference/workspaces/workspace-list) — fetch the newly created `workspace_id`


## OpenAPI

````yaml api-reference/openapi.json POST /create-workspace
openapi: 3.1.0
info:
  title: >-
    UnleashX - Build human like conversations | Voice Agents | Automations | AI
    Workforce
  version: 1.0.0
  description: UnleashX - Your home for human like conversations
servers:
  - url: https://www.tryunleashx.com/api/v1/global/
security:
  - bearerAuth: []
paths:
  /create-workspace:
    post:
      tags:
        - Workspaces
      summary: Create workspace (API token)
      description: >-
        Create a workspace under the API token's company. Delegates to the same
        internal logic as /api/company/create-workspace, so the two entry points
        can never drift.
      parameters:
        - name: token
          in: header
          required: true
          description: API token for authentication
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                workspace_name:
                  type: string
                  description: >-
                    Name for the new workspace. Must be unique within the
                    token's company.
              required:
                - workspace_name
      responses:
        '200':
          description: Workspace created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: WORKSPACE_CREATED_SUCCESSFULLY
                  data:
                    type: object
                    properties:
                      WORKSPACE_ID:
                        type: integer
                      WORKSPACE_NAME:
                        type: string
                      COMPANY_ID:
                        type: integer
                      OWNER_ID:
                        type: integer
                      CONCURRENCY:
                        type: integer
                      WORKSPACE_STATUS:
                        type: integer
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '422':
          description: >-
            WORKSPACE_NAME_ALREADY_EXISTS — an active workspace with this name
            already exists for the company
      security: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````