---
title: "Appoint or remove a team administrator"
method: PATCH
path: "/team/{id}/members/{userId}"
tags: ["Teams"]
---

# Appoint or remove a team administrator

`PATCH /team/{id}/members/{userId}`

## Request

- Base URL: `https://api.elaichi.ai`
- URL: `https://api.elaichi.ai/team/{id}/members/{userId}`
- Auth: HTTP bearer

Toggles team-admin rights for one member. Team administrators may rename their team, manage its ordinary members, appoint further administrators and delete it, and may manage team-scoped connections. Appointing (`is_admin: true`) is allowed for `team:manage` or an administrator of this team; standing an administrator down (`is_admin: false`) requires `team:manage`. Nobody may appoint themselves.

## Path parameters

- `id` string, required
- `userId` string, required

## Headers

- `X-Organization-Id` string

## Request body

- object
  - `is_admin` boolean, required

## Response `200`

OK

- Team
  - `id` string: Team id (`team_…`).
  - `name` string: Unique within the organization.
  - `description` string, nullable
  - `member_count` integer: How many people are in the team. The row carries no roster array; `GET /team/{id}/member` is the roster.
  - `admin_count` integer: How many of them administer the team.
  - `admin_preview` object[]: The first few administrators, with display names already resolved, so a client can name them without a lookup per row. At most 5 — a preview for a hover, never the set; `admin_count` is the size. `name` and `email` are both null for someone who has left the organization.
    - `user_id` string
    - `name` string, nullable
    - `email` string, nullable
    - `avatar_url` string, nullable: The person's picture: their stored profile picture, else a Gravatar URL (`d=404`, 96px) derived from their email (the address itself is not sent), else null. Draw initials when it is null or the image fails to load.
    - `is_admin` boolean: Always true here.
  - `member_preview` object[]: The same, for the first few members (administrators included, flagged by `is_admin`). `member_count` is the size; `GET /team/{id}/member` is the full, paginated roster.
    - `user_id` string
    - `name` string, nullable
    - `email` string, nullable
    - `avatar_url` string, nullable: The person's picture: their stored profile picture, else a Gravatar URL (`d=404`, 96px) derived from their email (the address itself is not sent), else null. Draw initials when it is null or the image fails to load.
    - `is_admin` boolean
  - `created_at` string, date-time
  - `updated_at` string, date-time

## 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)
