Update a company member
curl --request PUT \
--url https://paradigm.lighton.ai/api/v3/users/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"account_expiration_date": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://paradigm.lighton.ai/api/v3/users/{id}"
payload = {
"first_name": "<string>",
"last_name": "<string>",
"account_expiration_date": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: '<string>',
last_name: '<string>',
account_expiration_date: '2023-11-07T05:31:56Z'
})
};
fetch('https://paradigm.lighton.ai/api/v3/users/{id}', 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>"
]
}Users
Update a company member
This endpoint allows to update a specific company member by ID.
PUT: Requires all fields (first_name, last_name, account_expiration_date, language). PATCH: Allows partial updates - only provide the fields you want to change.
Permissions:
- Admin, SysAdmin, Account Manager: can update any user
- Company Admin: can update users from their own company only
Throttling: 60 requests per minute
It is API Key protected and restricted to users with appropriate permissions.
PUT
/
api
/
v3
/
users
/
{id}
Update a company member
curl --request PUT \
--url https://paradigm.lighton.ai/api/v3/users/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"account_expiration_date": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://paradigm.lighton.ai/api/v3/users/{id}"
payload = {
"first_name": "<string>",
"last_name": "<string>",
"account_expiration_date": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: '<string>',
last_name: '<string>',
account_expiration_date: '2023-11-07T05:31:56Z'
})
};
fetch('https://paradigm.lighton.ai/api/v3/users/{id}', 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.
Path Parameters
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
The first name of the user.
The last name of the user.
The account expiration date and time with timezone.
The preferred language of the user.
ar- Arabicen- Englishfr- Frenchde- German
Available options:
ar, en, fr, de Response
Company member updated successfully
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes