Bulk replace all members for a custom group
curl --request PUT \
--url https://paradigm.lighton.ai/api/v3/company/groups/{id}/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"users": [
{
"id": 123
}
]
}
'import requests
url = "https://paradigm.lighton.ai/api/v3/company/groups/{id}/members"
payload = { "users": [{ "id": 123 }] }
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({users: [{id: 123}]})
};
fetch('https://paradigm.lighton.ai/api/v3/company/groups/{id}/members', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"users": [
{
"id": 123,
"email": "<string>",
"role": "<string>"
}
]
}{
"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": 404,
"error": "not_found",
"detail": "The requested resource was not found.",
"doc_url": "https://developers.lighton.ai/errors#not_found"
}{
"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>"
]
}User Groups
Bulk replace all members for a custom group
Bulk replace the entire list of members for a custom group in your company. This endpoint is available to company-level and instance-level administrators.
Permissions:
- Sys Admin, Account Manager, Company Admin: Can replace members for custom groups
- Only custom groups can be modified
- All users must belong to the same company as the group
Behavior:
- Replaces ALL existing members with the provided list
- An empty users array removes all members from the group
- Each user must have both id and role fields
- Valid roles: ‘member’ or ‘owner’
PUT
/
api
/
v3
/
company
/
groups
/
{id}
/
members
Bulk replace all members for a custom group
curl --request PUT \
--url https://paradigm.lighton.ai/api/v3/company/groups/{id}/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"users": [
{
"id": 123
}
]
}
'import requests
url = "https://paradigm.lighton.ai/api/v3/company/groups/{id}/members"
payload = { "users": [{ "id": 123 }] }
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({users: [{id: 123}]})
};
fetch('https://paradigm.lighton.ai/api/v3/company/groups/{id}/members', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"users": [
{
"id": 123,
"email": "<string>",
"role": "<string>"
}
]
}{
"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": 404,
"error": "not_found",
"detail": "The requested resource was not found.",
"doc_url": "https://developers.lighton.ai/errors#not_found"
}{
"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
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
V3 API: Bulk replace all group members
List of users with their roles. An empty array removes all members from the group.
Show child attributes
Show child attributes
Response
Members replaced successfully. Returns all group members with their roles.
The members of a group: {"users": [{id, email, role}, ...]}.
Show child attributes
Show child attributes