---
title: "Update Member Role"
method: PATCH
path: "/v1/teams/{team_id}/members/{user_id}"
tags: ["teams"]
---

# Update Member Role

`PATCH /v1/teams/{team_id}/members/{user_id}`

## Request

- Base URL: `https://api.pioneer.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pioneer.ai/v1/teams/{team_id}/members/{user_id}`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/pioneer/apis/brain-api/docs/v1/teams/:team_id/members/:user_id/patch.ts> (a function with typed inputs; its response is checked against the schema)

Update a member role.

Args:
    team_id: Team identifier.
    user_id: Target member identifier.
    request: Role update payload.
    auth: Authenticated caller.
    service: Team service.

Returns:
    Updated member.

## Path parameters

- `team_id` string, required
- `user_id` string, required

## Request body

- TeamRoleUpdate: Request model for updating a member's role.
  - `role` 'owner' | 'billing' | 'admin' | 'editor' | 'viewer', required: Team member roles with hierarchical permissions. Wire DTO mirror of the ORM ``TeamRoleType`` enum. Used only for API request/response serialization; authorization decisions route through the ORM matrix (``database_tables.permissions``), never this enum.

## Response `200`

Successful Response

- TeamMemberResponse: Response model for a team member. ``mfa_enabled`` and ``mfa_factor_count`` are sensitive targeting data and are populated only on the members-list response, and only for callers holding ``MANAGE_BILLING`` — matching the gated ``/teams/{id}/members/mfa-status`` surface. ``None`` means the field was not populated (caller lacks the permission, or the endpoint does not enrich it), never that MFA is disabled. Endpoints that do not enrich (e.g. role update) leave both fields ``None``.
  - `id` string, required
  - `team_id` string, required
  - `user_id` string, required
  - `role` 'owner' | 'billing' | 'admin' | 'editor' | 'viewer', required: Team member roles with hierarchical permissions. Wire DTO mirror of the ORM ``TeamRoleType`` enum. Used only for API request/response serialization; authorization decisions route through the ORM matrix (``database_tables.permissions``), never this enum.
  - `joined_at` string, required
  - `user_email` string, nullable
  - `user_name` string, nullable
  - `user_avatar_url` string, nullable
  - `mfa_enabled` boolean, nullable
  - `mfa_factor_count` integer, nullable

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-24** `0e5e86e2bae5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/pioneer/apis/brain-api/changes/v1/teams/:team_id/members/:user_id/patch.md)

---

[API](https://skmtc.dev/pioneer/apis/brain-api.md) - [All operations](https://skmtc.dev/pioneer/apis/brain-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pioneer/apis/brain-api/revisions/0e5e86e2bae5?raw)
