Skip to main content
POST
/
api
/
v3
/
company
/
workspaces
Create a workspace in your company
curl --request POST \
  --url https://paradigm.lighton.ai/api/v3/company/workspaces \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>"
}
'
import requests

url = "https://paradigm.lighton.ai/api/v3/company/workspaces"

payload = { "name": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};

fetch('https://paradigm.lighton.ai/api/v3/company/workspaces', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
{
  "id": 123,
  "name": "<string>",
  "workspace_type": "<string>",
  "document_upload_method": "<string>",
  "description": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "user_role": "<string>",
  "used_storage": 123,
  "files_count": 123
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

V3 Request serializer for creating a workspace in the user's company.

name
string
required
Maximum string length: 100
description
string
default:""

Response

Workspace created successfully

V3 Response serializer for company workspace creation and retrieval.

id
integer
required
name
string
required
workspace_type
string
required
document_upload_method
string
required
description
string
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
user_role
string
required
read-only
used_storage
number<double>
required
files_count
integer
required