Remove a member from an organization
curl --request DELETE \
--url https://web-api.dev.soxai.site/api/orgs/{org_id}/orgUsers/{uid} \
--header 'Authorization: Bearer <token>'import requests
url = "https://web-api.dev.soxai.site/api/orgs/{org_id}/orgUsers/{uid}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://web-api.dev.soxai.site/api/orgs/{org_id}/orgUsers/{uid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"message": "OrgUser deleted successfully"
}{
"error": "http-error",
"error_msg": "Invalid authentication credentials. <reason>"
}{
"error": "forbidden",
"error_msg": "Not enough permission"
}{
"error": "not-found",
"error_msg": "OrgUser '<uid>' 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>"
}Organization Members
Remove a member from an 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 changes state that every Sandbox caller shares. It is published here because the Sandbox runs the same build; use it in Production. See Sandbox.
Remove a member from an organization’s roster and clear the
orgId claim that gave them org-scoped access.
Clearing the claim is best effort: a claim that cannot be cleared does not fail a removal that has already happened. The response reports the removal, and the failure is logged.
Parameters
org_id(path, required) - organization identifier.uid(path, required) - the member to remove.
Response
200{"message": "OrgUser deleted successfully"}, whether or not the claim could be cleared.
Errors
| Status | Condition |
|---|---|
| 403 | The member is the organization’s last admin, or the caller is removing itself |
| 404 | uid is not on this organization’s roster. Removing somebody who was never a member is not reported as a success |
Authorization
- Scheme:
Authorization: Bearer <idToken>orsoxai-api-key: <api key>. - Accepted roles:
PartnerAdmin,OrgAdmin Adminis accepted regardless of the roles above.PartnerAdminreaches only an org owned by its own company; any other caller must carry anorgIdclaim naming exactly{org_id}.- Denials: a
PartnerAdminnaming another company’s org receives403 PartnerAdmin can change only the org that belongs to your company; a caller whoseorgIdclaim does not name{org_id}receives403 orgId not match; anyone else receives403 Not enough permission.
DELETE
/
api
/
orgs
/
{org_id}
/
orgUsers
/
{uid}
Remove a member from an organization
curl --request DELETE \
--url https://web-api.dev.soxai.site/api/orgs/{org_id}/orgUsers/{uid} \
--header 'Authorization: Bearer <token>'import requests
url = "https://web-api.dev.soxai.site/api/orgs/{org_id}/orgUsers/{uid}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://web-api.dev.soxai.site/api/orgs/{org_id}/orgUsers/{uid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"message": "OrgUser deleted successfully"
}{
"error": "http-error",
"error_msg": "Invalid authentication credentials. <reason>"
}{
"error": "forbidden",
"error_msg": "Not enough permission"
}{
"error": "not-found",
"error_msg": "OrgUser '<uid>' 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
Path Parameters
Response
The member is off the roster, whether or not the claim could be cleared.