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",
"files_count": 123,
"user_role": "owner",
"used_storage": 123,
"sync": {
"datasource_type": "<string>",
"source_name": "<string>",
"last_status": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"failed_files_count": 123,
"next_import_date": "2023-11-07T05:31:56Z",
"editable": true,
"name": "<string>",
"instance_url": "<string>",
"tenant_id": "<string>",
"site_name": "<string>",
"client_id": "<string>",
"filter_criteria": "<unknown>"
},
"scoped_api_keys": [
{
"id": "<string>",
"name": "<string>",
"prefix": "<string>",
"role": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"scope_type": "workspace"
}
]
}{
"id": null,
"code": 409,
"error": "conflict",
"detail": "A resource with this name already exists.",
"doc_url": "https://developers.lighton.ai/errors#conflict"
}{
"id": null,
"code": 422,
"error": "validation_error",
"detail": "One or more fields failed validation.",
"doc_url": "https://developers.lighton.ai/errors#validation_error",
"fields": {
"<field_name>": [
{
"error": "required",
"detail": "This field is required."
}
]
}
}{
"id": null,
"code": 500,
"error": "internal_server_error",
"detail": "An unexpected error occurred. Please try again later.",
"doc_url": "https://developers.lighton.ai/errors#internal_server_error"
}{
"detail": "System is under maintenance.",
"error": "service_maintenance",
"mode": "full_shutdown",
"reason": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"endpoint_category_names": [
"<string>"
]
}Workspaces
Create a workspace in your company
⚠️ ALPHA ENDPOINT - This endpoint is in alpha and subject to breaking changes. Use with caution in production environments.
Create a new workspace within your company. Available to company and instance-level administrators.
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",
"files_count": 123,
"user_role": "owner",
"used_storage": 123,
"sync": {
"datasource_type": "<string>",
"source_name": "<string>",
"last_status": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"failed_files_count": 123,
"next_import_date": "2023-11-07T05:31:56Z",
"editable": true,
"name": "<string>",
"instance_url": "<string>",
"tenant_id": "<string>",
"site_name": "<string>",
"client_id": "<string>",
"filter_criteria": "<unknown>"
},
"scoped_api_keys": [
{
"id": "<string>",
"name": "<string>",
"prefix": "<string>",
"role": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"scope_type": "workspace"
}
]
}{
"id": null,
"code": 409,
"error": "conflict",
"detail": "A resource with this name already exists.",
"doc_url": "https://developers.lighton.ai/errors#conflict"
}{
"id": null,
"code": 422,
"error": "validation_error",
"detail": "One or more fields failed validation.",
"doc_url": "https://developers.lighton.ai/errors#validation_error",
"fields": {
"<field_name>": [
{
"error": "required",
"detail": "This field is required."
}
]
}
}{
"id": null,
"code": 500,
"error": "internal_server_error",
"detail": "An unexpected error occurred. Please try again later.",
"doc_url": "https://developers.lighton.ai/errors#internal_server_error"
}{
"detail": "System is under maintenance.",
"error": "service_maintenance",
"mode": "full_shutdown",
"reason": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"endpoint_category_names": [
"<string>"
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Response
Workspace created successfully
V3 Response serializer for company workspace creation and retrieval.
owner- ownereditor- editorviewer- viewer- `` -
Available options:
owner, editor, viewer Show child attributes
Show child attributes
Show child attributes
Show child attributes