Get one organization
curl --request GET \
--url https://web-api.dev.soxai.site/api/orgs/{org_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://web-api.dev.soxai.site/api/orgs/{org_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/orgs/{org_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"orgId": "org_ab12cd34",
"orgName": "SOXAI Research",
"orgEmail": "research@example.com",
"orgPhone": "03-0000-0000",
"orgAddress": "1-1-1 Chiyoda, Tokyo",
"companyId": "company_9f8e7d"
}{
"error": "http-error",
"error_msg": "Invalid authentication credentials. <reason>"
}{
"error": "forbidden",
"error_msg": "Not enough permission"
}{
"error": "not-found",
"error_msg": "Org '<org_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>"
}Organizations
Get one organization
Not callable with a Sandbox key
A request authenticated with a Sandbox soxai-api-key is answered 403 This endpoint is not available in the sandbox., because it requires an administrator role the Sandbox never grants. It is published here because the Sandbox runs the same build; use it in Production. See Sandbox.
Fetch a single organization document.
Parameters
org_id(path, required) - organization identifier, as returned byPOST /api/orgsor listed byGET /api/orgs.
Response
200returns the organization document:orgName,orgEmail,orgPhone,orgAddress, andcompanyIdwhen it belongs to a company.
Errors
| Status | Condition |
|---|---|
| 403 | A PartnerAdmin naming an organization that belongs to another company or does not exist. The two are deliberately answered the same way, so the status cannot be used to test whether an org_id is in use |
| 404 | The organization does not exist. Only an Admin receives this |
Authorization
- Scheme:
Authorization: Bearer <idToken>orsoxai-api-key: <api key>. - Accepted roles:
Admin,PartnerAdmin - Any other caller receives
403 Not enough permission.
GET
/
api
/
orgs
/
{org_id}
Get one organization
curl --request GET \
--url https://web-api.dev.soxai.site/api/orgs/{org_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://web-api.dev.soxai.site/api/orgs/{org_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/orgs/{org_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"orgId": "org_ab12cd34",
"orgName": "SOXAI Research",
"orgEmail": "research@example.com",
"orgPhone": "03-0000-0000",
"orgAddress": "1-1-1 Chiyoda, Tokyo",
"companyId": "company_9f8e7d"
}{
"error": "http-error",
"error_msg": "Invalid authentication credentials. <reason>"
}{
"error": "forbidden",
"error_msg": "Not enough permission"
}{
"error": "not-found",
"error_msg": "Org '<org_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
The organization document. companyId is present only when it belongs to a company.