List a company's users
curl --request GET \
--url https://web-api.soxai.site/api/companies/users/{company_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://web-api.soxai.site/api/companies/users/{company_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://web-api.soxai.site/api/companies/users/{company_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"users": [
{
"ex_uid": "employee-0001",
"uid": "user123"
}
]
}{
"error": "http-error",
"error_msg": "Invalid authentication credentials. <reason>"
}{
"error": "forbidden",
"error_msg": "PartnerAdmin can fetch only data that belongs to your company"
}{
"error": "not-found",
"error_msg": "Company '<company_id>' not found"
}{
"error": "unprocessable-entity",
"error_msg": "body.<field>: <validation message>"
}{
"error": "rate-limited",
"error_msg": "Rate limit exceeded. Retry after <n> seconds."
}{
"error": "internal-server-error",
"error_msg": "Failed to fetch data: <error_message>"
}Partner Companies
List a company's users
List the users registered under a partner company, as JSON or as a CSV download.
Membership comes from the company’s own user records, so it includes users who have joined none of that company’s organizations.
Parameters
company_id(path, required).to_csv(query, optional, defaultfalse) -truereturns a CSV file download.
Response
200returns one entry per registered user, carrying the company’s own identifier for them and the SOXAI uid it maps to.200withto_csv=truereturns the same rows as a file download.
Errors
| Status | Condition |
|---|---|
| 403 | A PartnerAdmin naming a company other than its own, answered as PartnerAdmin can fetch only data that belongs to your company |
| 404 | The company is not registered, or has no users |
In addition to the roles listed below, a PartnerAdmin reaches only its own company; an
Admin reaches any.
Authorization
- Scheme:
Authorization: Bearer <idToken>orsoxai-api-key: <api key>. - Accepted roles:
Admin,PartnerAdmin - Any other caller receives
403 Not enough permission.
GET
/
api
/
companies
/
users
/
{company_id}
List a company's users
curl --request GET \
--url https://web-api.soxai.site/api/companies/users/{company_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://web-api.soxai.site/api/companies/users/{company_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://web-api.soxai.site/api/companies/users/{company_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"users": [
{
"ex_uid": "employee-0001",
"uid": "user123"
}
]
}{
"error": "http-error",
"error_msg": "Invalid authentication credentials. <reason>"
}{
"error": "forbidden",
"error_msg": "PartnerAdmin can fetch only data that belongs to your company"
}{
"error": "not-found",
"error_msg": "Company '<company_id>' not found"
}{
"error": "unprocessable-entity",
"error_msg": "body.<field>: <validation message>"
}{
"error": "rate-limited",
"error_msg": "Rate limit exceeded. Retry after <n> seconds."
}{
"error": "internal-server-error",
"error_msg": "Failed to fetch data: <error_message>"
}Authorizations
HTTPBearerSoxaiApiKey
Response
One entry per registered user, carrying the company's own identifier and the SOXAI uid it maps to. to_csv=true answers with the same rows as a file download.