---
title: "Get the current user and their organizations"
method: GET
path: "/user/me"
tags: ["Current user"]
---

# Get the current user and their organizations

`GET /user/me`

## Request

- Base URL: `https://api.elaichi.ai`
- URL: `https://api.elaichi.ai/user/me`
- Auth: HTTP bearer

Returns the current user and their organizations. The result is the profile of whoever the credential belongs to, plus one entry per organization they are an active member of, each carrying that org's roles, teams and effective permissions. Call this first: it is how a client learns which organization ids it may put in `X-Organization-Id` and which actions to offer. With an org API token this still returns the token owner's memberships, so read `organizations` rather than assuming the token's org is the only one.

## Response `200`

OK

- object
  - `id` string: User id (`usr_…`).
  - `email` string, email
  - `name` string, nullable
  - `avatar_url` string, nullable
  - `identities` object[]: Login identities linked to this account.
    - `provider` string: e.g. `google`, `email_code`, `invite`, or an SSO connection.
    - `connected_at` string, date-time
  - `is_active` boolean: Inactive accounts cannot authenticate at all.
  - `is_staff` boolean: True only for Elaichi support accounts. Always false for customer members; unrelated to organization roles.
  - `last_login_at` string, date-time, nullable
  - `created_at` string, date-time
  - `updated_at` string, date-time
  - `mfa_enabled` boolean: True when TOTP is active on this account.
  - `mfa_setup_required` boolean: True when THIS session would be refused (`403 mfa_setup_required`) in at least one organization the user belongs to, because the organization requires a second factor and the session has not shown one. Always `false` for an API token. A client routes the person to second-factor setup on this rather than working out which organizations require one.
  - `mfa_setup_required_org_ids` string[]: The organizations behind `mfa_setup_required`: a bounded page (at most 50), with the organization named by the `current_org_id` query parameter first when it is one of them. Not the whole set — `mfa_setup_required_org_count` is the true number; an organization not listed still refuses with `403 mfa_setup_required` when entered.
  - `mfa_setup_required_org_count` integer: How many organizations refuse this session for lack of a second factor.
  - `can_disable_mfa` boolean: `false` while an organization the user belongs to requires a second factor and they hold no passkey — turning the authenticator app off (`DELETE /user/me/mfa/totp`) is refused with `409 mfa_required_by_organization`. The reason is in `mfa_disable_blocked_reason`.
  - `mfa_disable_blocked_reason` string, nullable: A sentence saying why `can_disable_mfa` is `false`, or `null`.
  - `is_root_org_staff` boolean: True only for Elaichi support accounts. Always false for customer members.
  - `organizations` object[]: One entry per active membership. Organizations where membership has lapsed are omitted.
    - `organization` Organization
      - `id` string: Organization id (`org_…`) — the value for `X-Organization-Id`.
      - `name` string
      - `slug` string: Immutable after creation.
      - `plan` string: The stored plan: `gold`, `black`, or `none` when locked. This is not the same as the effective entitlement — read `GET /organization/{id}/entitlements` before gating a feature on it.
      - `region` string, nullable: Data location fixed at creation: `us`/`eu` pin a hard jurisdiction, `apac` is a placement hint.
      - `trial_ends_at` string, date-time, nullable
      - `trial_indefinite_at` string, date-time, nullable: Set when Elaichi granted this organization an indefinite trial, otherwise null. Unlocked with no end date: no countdown, no expiry email, billing still reachable.
      - `settings` object: Free-form org settings. `PATCH /organization/{id}` REPLACES this object wholesale.
      - `logo` string, uri, nullable: Public URL of the logo image, or null.
      - `can_delete` boolean: Whether the caller may delete this organization: the `org:delete` permission, which only the Org Owner role holds. Server-computed, so branch on this rather than inspecting roles. Always `false` on rows that have no member context to compute it from, such as the organization list `GET /organization`. It never overstates: trust it when true, and read `GET /user/me` or `GET /organization/{id}` (both compute it) when you need it for a list row.
      - `can_manage` boolean: Whether the caller may change this organization's settings: the `org:manage` permission that `PATCH /organization/{id}` requires, and the organization is neither suspended nor in its deletion grace period. Server-computed, and `false` wherever `can_delete` is false for lack of a member context; it never overstates.
      - `allow_staff_impersonation` boolean: Whether Elaichi support may sign in as this organization's members to help them. `true` by default. When `false`, every request made through such a support session against this organization is refused with `403 staff_impersonation_blocked`, reads included, and the organization is left out of that session's `GET /user/me` and `GET /organization`. Changed with `PATCH /organization/{id}` (`org:manage`).
      - `mfa_required` boolean: Whether members must hold a second factor to act in this organization. `false` by default. When `true`, a signed-in session that has not shown a second factor (no TOTP challenge at login, no passkey sign-in, no factor enrolled since) is refused on every organization-scoped route, reads included, with `403 mfa_setup_required`; `error.details.has_second_factor` says whether the person already has one and only needs to sign in with it. Exempt: org API tokens, Elaichi support sessions, and a session signed in through this organization's own SSO connection. MCP connections made before it was switched on, or from a session without a factor, are refused until the person connects again. Turning it off only lifts the organization requirement: a member who set up an authenticator app of their own is still challenged for it at every non-passkey sign-in. Changed with `PATCH /organization/{id}` (`org:manage`, interactive session only).
      - `can_require_mfa` boolean: Whether the CALLER may turn `mfa_required` ON right now: `can_manage`, from an interactive session that would itself pass the check it is about to create. `false` — with the reason in `can_require_mfa_reason` — when switching it on would lock the caller out of this organization. The PATCH refuses that regardless with `409 mfa_setup_required`. Turning it OFF is not governed by this field; it needs a step-up.
      - `can_require_mfa_reason` string, nullable: A sentence saying why `can_require_mfa` is `false` for a caller who can otherwise manage the organization. `null` otherwise.
      - `deletion_scheduled_at` string, date-time, nullable: Set when a deletion has been scheduled (`DELETE /organization/{id}`). The organization is read-only until `purge_after`. Null otherwise.
      - `purge_after` string, date-time, nullable: When a scheduled deletion becomes permanent — 30 days after `deletion_scheduled_at`. Null unless scheduled.
      - `can_restore` boolean: Whether the caller may cancel a scheduled deletion: the `org:manage` permission, and only while `purge_after` is still ahead. Server-computed like `can_delete`, and `false` on rows with no member context. Read `purge_after` to tell "too late" from "not yours to undo".
      - `can_authorize_apps` boolean: Whether the CALLER may connect an app (MCP OAuth consent) to this organization right now: `false` while it is suspended, scheduled for deletion, or has no active plan. Server-computed by the same gate `POST /oauth/authorize-request/{id}/approve` calls; present only on member-scoped responses. `authorize_apps_blocked_reason` says which.
      - `authorize_apps_blocked_reason` 'blocked' | 'pending_deletion' | 'no_plan' | 'null', nullable: Why `can_authorize_apps` is `false`, in the gate's own order: `blocked`, then `pending_deletion` (even when the subscription is also gone, since a soft delete cancels it), then `no_plan`. `null` when connecting is open.
      - `created_at` string, date-time
      - `updated_at` string, date-time
    - `member` object: Membership facts only — roles and teams are the sibling fields below, not nested here.
      - `user_id` string: User id (`usr_…`).
      - `status` string
      - `via` string, nullable: How they joined, e.g. invite or verified domain.
      - `joined_at` string, date-time
    - `roles` object[]: Role summaries held in this organization.
      - `id` string: Role id (`role_…`).
      - `name` string
      - `is_system` boolean
      - `seat_class` 'billable' | 'free_admin'
    - `teams` object[]
      - `id` string: Team id (`team_…`).
      - `name` string
    - `permissions` string[]: Effective permission names, unioned across roles. This is the authoritative list for deciding what to show; the server re-checks it on every request.

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `429`: Rate limited

---

[API](https://skmtc.dev/elaichi/apis/elaichi-api.md) · [All operations](https://skmtc.dev/elaichi/apis/elaichi-api/llms.txt) · [OpenAPI document](https://skmtc.dev/elaichi/apis/elaichi-api/revisions/b22cfb7b6d15?raw)
