Update a company member
curl --request PATCH \
--url https://api.lighton.ai/api/v2/users/{id}/update/ \
--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://api.lighton.ai/api/v2/users/{id}/update/"
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.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
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://api.lighton.ai/api/v2/users/{id}/update/', 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": {
"id": 123,
"name": "<string>"
},
"roles": [
{
"id": 123,
"name": "<string>"
}
],
"groups": [
{
"id": 123,
"name": "<string>",
"description": "<string>",
"role": "<string>",
"category": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}Users
Update a company member
This endpoint allows you to update the details of a company member.
It is restricted to admin and company admin users.
PATCH
/
api
/
v2
/
users
/
{id}
/
update
/
Update a company member
curl --request PATCH \
--url https://api.lighton.ai/api/v2/users/{id}/update/ \
--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://api.lighton.ai/api/v2/users/{id}/update/"
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.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
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://api.lighton.ai/api/v2/users/{id}/update/', 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": {
"id": 123,
"name": "<string>"
},
"roles": [
{
"id": 123,
"name": "<string>"
}
],
"groups": [
{
"id": 123,
"name": "<string>",
"description": "<string>",
"role": "<string>",
"category": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The unique identifier of the user.
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Response
200 - application/json
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes