---
title: "Get the caller's effective role on this team"
method: GET
path: "/teams/{team_id}/my-role"
tags: ["Teams"]
---

# Get the caller's effective role on this team

`GET /teams/{team_id}/my-role`

## Request

- Base URL: `https://api.mnemom.ai/v1`
- URL: `https://api.mnemom.ai/v1/teams/{team_id}/my-role`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-Mnemom-Api-Key`
  - API key in cookie `mnemom_session`

Returns the caller's role on this team for UI gating. Computed via the same logic as `requireTeamRole` (ADR-046) and `getTeamRole`. Values: `super_admin` (Mnemom staff cookie), `org_owner` / `org_admin` (when the caller has that role on the team's org), `team_admin` (an active `team_admin_grants` row for the caller), `org_member` / `org_viewer` / `org_auditor` (read-only org membership), or `null` (no role). Surfaces that don't load a template-sources envelope (team roster, identity card, admins tab) use this to gate edit affordances from the same single source of truth as the editors. See ADR-053.

## Path parameters

- `team_id` string, required

## Response `200`

Caller's effective role on the team.

- TeamMyRoleResponse: Response body of `GET /v1/teams/{team_id}/my-role`. Used by surfaces that don't load a template sources envelope (team roster tab, identity card tab, admins tab) to gate edit affordances from the same single source of truth as the editors.
  - `team_id` string, required
  - `my_role` 'super_admin' | 'org_owner' | 'org_admin' | 'team_admin' | 'org_member' | 'org_viewer' | 'org_auditor' | 'null', nullable, required: The caller's effective role on the resource. Computed server-side per ADR-053; frontends derive `canEdit` exclusively from this field. `team_admin` only appears on team-scope responses. `null` means the caller has no role on this resource (the request still authenticated, but no role applies — e.g. an org-scope response read by an unrelated user).

## Other responses

- `400`: Bad request
- `401`: Authentication required
- `403`: Forbidden
- `404`: Resource not found
- `429`: Rate-limit exceeded. The global per-IP limiter (100 requests/minute, applied to every `/v1/*` route) rejected this request. Back off until the window resets — `Retry-After` carries the cooldown in seconds and `X-RateLimit-Reset` the absolute reset time.
- `500`: Server error — request was well-formed but the server failed to fulfill it. Typically a downstream dependency (DB / RPC / external API) returned an unexpected error.

---

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