curl --request GET \
--url https://web-api.dev.soxai.site/api/companies/users/{company_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://web-api.dev.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.dev.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>"
}List a company's users
A request authenticated with a Sandbox soxai-api-key is answered 403 This endpoint is not available in the sandbox., because it is internal or operational, outside the Sandbox surface. It is published here because the Sandbox runs the same build; use it in Production. See Sandbox.
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.
curl --request GET \
--url https://web-api.dev.soxai.site/api/companies/users/{company_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://web-api.dev.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.dev.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
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.