Skip to main content
POST
/
workspaces
Create a workspace
import requests

url = "https://app.ubik-agent.com/api/v1/workspaces"

payload = {
    "name": "New Project Workspace",
    "description": "Workspace for the new project.",
    "is_default": False
}
headers = {
    "X-API-KEY": "<api-key>",
    "Content-Type": "application/json"
}

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

print(response.text)
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "document_count": 123,
  "description": "<string>",
  "is_default": false
}

Authorizations

X-API-KEY
string
header
required

Body

application/json
name
string
required

The name of the workspace.

description
string | null

A brief description of the workspace's purpose.

is_default
boolean | null
default:false

Indicates if this is the default workspace for the user.

Response

Successful Response

id
string<uuid>
required

The unique identifier for the workspace.

name
string
required

The name of the workspace.

created_at
string<date-time>
required

The timestamp when the workspace was created.

updated_at
string<date-time>
required

The timestamp when the workspace was last updated.

document_count
integer
required

The number of documents contained within the workspace.

description
string | null

A brief description of the workspace's purpose.

is_default
boolean | null
default:false

Indicates if this is the default workspace for the user.