curl --request POST \
--url https://paradigm.lighton.ai/api/v3/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com",
"username": "<string>"
}
'import requests
url = "https://paradigm.lighton.ai/api/v3/users"
payload = {
"email": "jsmith@example.com",
"username": "<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({email: 'jsmith@example.com', username: '<string>'})
};
fetch('https://paradigm.lighton.ai/api/v3/users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 123,
"username": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"is_active": true,
"date_joined": "2023-11-07T05:31:56Z",
"account_expiration_date": "2023-11-07T05:31:56Z",
"last_login": "2023-11-07T05:31:56Z",
"invitation_status": "<string>",
"language": "<string>",
"company": {
"name": "<string>",
"id": 123
},
"roles": [
{
"name": "<string>",
"id": 123
}
],
"groups": [
{
"id": 123,
"name": "<string>",
"description": "<string>",
"role": "<string>",
"category": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}{
"id": null,
"code": 401,
"error": "unauthorized",
"detail": "Authentication credentials were not provided or are invalid.",
"doc_url": "https://developers.lighton.ai/errors#unauthorized"
}{
"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>"
]
}Create a new company member
This endpoint allows to create a new company member.
Permissions:
- Admin, SysAdmin, Account Manager: can create users for any company
- Company Admin: can create users for their own company
Throttling: 60 requests per minute
It is API Key protected and restricted to users with appropriate permissions.
curl --request POST \
--url https://paradigm.lighton.ai/api/v3/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com",
"username": "<string>"
}
'import requests
url = "https://paradigm.lighton.ai/api/v3/users"
payload = {
"email": "jsmith@example.com",
"username": "<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({email: 'jsmith@example.com', username: '<string>'})
};
fetch('https://paradigm.lighton.ai/api/v3/users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 123,
"username": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"is_active": true,
"date_joined": "2023-11-07T05:31:56Z",
"account_expiration_date": "2023-11-07T05:31:56Z",
"last_login": "2023-11-07T05:31:56Z",
"invitation_status": "<string>",
"language": "<string>",
"company": {
"name": "<string>",
"id": 123
},
"roles": [
{
"name": "<string>",
"id": 123
}
],
"groups": [
{
"id": 123,
"name": "<string>",
"description": "<string>",
"role": "<string>",
"category": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}{
"id": null,
"code": 401,
"error": "unauthorized",
"detail": "Authentication credentials were not provided or are invalid.",
"doc_url": "https://developers.lighton.ai/errors#unauthorized"
}{
"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
The email address of the user.
The username of the user. This value may contain only letters, numbers, and @/./+/-/_ characters.
^[\w.@+-]+$The first name of the user.
The last name of the user.
The unique identifier of the company.
List of user group IDs to assign the user to.
List of role IDs to assign to the user.
The account expiration date and time with timezone.
The preferred language of the user.
ar- Arabicen- Englishfr- Frenchde- German
ar, en, fr, de Whether the user should be created as active. Defaults to False.
Response
Company member created successfully
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes