Create a company
curl --request POST \
--url https://api.lighton.ai/api/v2/companies/create/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'import requests
url = "https://api.lighton.ai/api/v2/companies/create/"
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://api.lighton.ai/api/v2/companies/create/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 123,
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"max_users": 123,
"dpo_email": "jsmith@example.com",
"allow_company_admins_to_manage_sso": true,
"storage_limit_company_ws": 123,
"storage_limit_personal_ws": 123,
"storage_limit_custom_ws": 123,
"active_members_count": 123
}Companies
Create a company
This endpoint allows you to create a new company.
It is restricted to admin users.
POST
/
api
/
v2
/
companies
/
create
/
Create a company
curl --request POST \
--url https://api.lighton.ai/api/v2/companies/create/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'import requests
url = "https://api.lighton.ai/api/v2/companies/create/"
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://api.lighton.ai/api/v2/companies/create/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 123,
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"max_users": 123,
"dpo_email": "jsmith@example.com",
"allow_company_admins_to_manage_sso": true,
"storage_limit_company_ws": 123,
"storage_limit_personal_ws": 123,
"storage_limit_custom_ws": 123,
"active_members_count": 123
}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
200 - application/json