Resolved-caller identity + cross-org membership list
const url = 'https://your-org.evershell.ai/v1/me/session';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://your-org.evershell.ai/v1/me/session \ --header 'Authorization: Bearer <token>'Permissions: any signed-in caller.
Returns the WorkOS-authenticated identity for the bearer token, including the caller’s role, permission scopes, and the list of other organizations they belong to.
Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”OK
Resolved-caller identity. Two field groups carry the operator-visible “who am I” label, mutually exclusive depending on how the caller authenticated:
- User-session callers (browser / SSO):
email+role. - API-key callers (evershell login + CI):
api_key_label+api_key_permission_set, lifted from the local api_keys mirror row.user_idis the fixedsystemsentinel andemail/roleare empty.
object
Populated for user-session callers, empty for API-key callers.
Populated for user-session callers, empty for API-key callers.
object
Set once an Owner has scheduled the org for decommission; the console reads it to render the wind-down banner deadline.
Null while the membership is still pending invitation acceptance.
Operator-visible label set on the API key at creation time. Populated for API-key callers only; absent for user-session callers.
Closed-enum permission template the operator picked at
create time. Populated for API-key callers only.
Documentary — the actual auth gating reads permissions.
Example
{ "user_id": "usr_01HX", "org_id": "org_acme", "role": "owner", "permissions": [ "workspace:read", "workspace:write", "tasks:write:own", "audit:read" ], "memberships": [ { "role": "owner", "billing_status": "trial" } ], "api_key_label": "ci-deploy", "api_key_permission_set": "full_access"}Missing or invalid credential
object
object
Closed-enum slug (e.g. permission_denied, validation_error, workspace_not_found)
Human-readable summary
Server-generated request id for correlating logs
Optional structured context. Validation errors land at
details.fields as a per-field map.
object
Example
{ "error": { "code": "permission_denied", "message": "caller lacks required scope", "request_id": "7f3a9c2e" }}