Get the caller's own organization
curl --request GET \
--url https://web-api.dev.soxai.site/api/myOrg \
--header 'Authorization: Bearer <token>'import requests
url = "https://web-api.dev.soxai.site/api/myOrg"
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/myOrg', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"isOrgUser": true,
"uid": "user123",
"email": "member@example.com",
"myOrg": {
"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": "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
Get the caller's own organization
Report which organization the caller belongs to, if any.
This is the entry point for an organization member: myOrg.orgId is the org_id every
other org-scoped endpoint takes.
Parameters
- None. This endpoint takes no path, query or body parameter.
Response
200{"isOrgUser": true, "uid", "email", "myOrg": {...}}when the caller carries anorgIdclaim and that organization exists.200{"isOrgUser": false, "uid", "email", "message"}when the caller belongs to no organization, or its claim names an organization that has since been deleted. The two are distinguished only bymessage.
Errors
- None specific to this endpoint. The statuses every endpoint can answer with are listed at the top of this page.
Authorization
- Scheme:
Authorization: Bearer <idToken>orsoxai-api-key: <api key>. - Any authenticated caller. The answer is built from the caller’s own claim and describes nobody else, so no role is required.
GET
/
api
/
myOrg
Get the caller's own organization
curl --request GET \
--url https://web-api.dev.soxai.site/api/myOrg \
--header 'Authorization: Bearer <token>'import requests
url = "https://web-api.dev.soxai.site/api/myOrg"
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/myOrg', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"isOrgUser": true,
"uid": "user123",
"email": "member@example.com",
"myOrg": {
"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": "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 caller's own organization membership. isOrgUser false carries a message instead of myOrg, both for a caller in no organization and for a claim naming an organization that has since been deleted.