Create a company
curl --request POST \
--url https://paradigm.lighton.ai/api/v3/instance/companies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'import requests
url = "https://paradigm.lighton.ai/api/v3/instance/companies"
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/instance/companies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 123,
"name": "<string>",
"allow_company_admins_to_manage_sso": true,
"created_at": "2023-11-07T05:31:56Z",
"dpo_email": "jsmith@example.com",
"max_users": -1,
"auto_provision_external_users": true,
"storage_limit_company_ws": -1,
"storage_limit_personal_ws": -1,
"storage_limit_custom_ws": -1,
"login_method": "password",
"kg_tags_enabled": true,
"kg_summaries_enabled": true,
"kg_queries_enabled": true,
"tier": "free"
}{
"id": null,
"code": 403,
"error": "insufficient_permissions",
"detail": "You do not have permission to perform this action.",
"doc_url": "https://developers.lighton.ai/errors#insufficient_permissions"
}{
"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."
}
]
}
}{
"detail": "System is under maintenance.",
"error": "service_maintenance",
"mode": "full_shutdown",
"reason": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"endpoint_category_names": [
"<string>"
]
}Companies
Create a company
This endpoint allows authorized users to create a new company.
Only SysAdmin and Account Manager roles can create companies.
POST
/
api
/
v3
/
instance
/
companies
Create a company
curl --request POST \
--url https://paradigm.lighton.ai/api/v3/instance/companies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'import requests
url = "https://paradigm.lighton.ai/api/v3/instance/companies"
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/instance/companies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 123,
"name": "<string>",
"allow_company_admins_to_manage_sso": true,
"created_at": "2023-11-07T05:31:56Z",
"dpo_email": "jsmith@example.com",
"max_users": -1,
"auto_provision_external_users": true,
"storage_limit_company_ws": -1,
"storage_limit_personal_ws": -1,
"storage_limit_custom_ws": -1,
"login_method": "password",
"kg_tags_enabled": true,
"kg_summaries_enabled": true,
"kg_queries_enabled": true,
"tier": "free"
}{
"id": null,
"code": 403,
"error": "insufficient_permissions",
"detail": "You do not have permission to perform this action.",
"doc_url": "https://developers.lighton.ai/errors#insufficient_permissions"
}{
"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."
}
]
}
}{
"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
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Response
Company created successfully
Serializer for company creation response