---
agentTools:
  projectIndex: https://seafile-api.readme.io/llms.txt
---

# Set/Unset a group admin

To set or unset a member as an administrator in a specified group.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Account Operations - User",
    "description": "The official SeaTable API Reference (OpenAPI 3.0). - Part 'User Account Operations'.",
    "version": "13.0"
  },
  "servers": [
    {
      "url": "https://{server}",
      "variables": {
        "server": {
          "default": "cloud.seafile.com"
        }
      }
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "metrics-enabled": false,
    "proxy-enabled": false
  },
  "components": {
    "securitySchemes": {
      "AccountTokenAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "This is the [Account-Token](/reference/authentication)."
      }
    },
    "parameters": {
      "group_id": {
        "name": "group_id",
        "in": "path",
        "description": "The unique identifier of a group",
        "required": true,
        "schema": {
          "type": "integer"
        }
      },
      "user_id": {
        "name": "user_id",
        "description": "The unique user id in the form ...@auth.local. This is not the email address of the user.",
        "in": "path",
        "schema": {
          "type": "string",
          "pattern": "^[a-f0-9]{32}(@auth.local)$"
        },
        "required": true,
        "example": "23abc456def789ghi123jkl456mno789@auth.local"
      }
    },
    "schemas": {
      "is_admin": {
        "type": "string",
        "title": "is_admin",
        "enum": [
          "true",
          "false"
        ],
        "example": "true"
      }
    }
  },
  "paths": {
    "/api/v2.1/groups/{group_id}/members/{user_id}/": {
      "put": {
        "tags": [
          "Groups"
        ],
        "summary": "Set/Unset a group admin",
        "description": "To set or unset a member as an administrator in a specified group.",
        "security": [
          {
            "AccountTokenAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/group_id"
          },
          {
            "$ref": "#/components/parameters/user_id"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "is_admin": {
                    "$ref": "#/components/schemas/is_admin"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Member information",
                  "properties": {
                    "group_id": {
                      "type": "integer"
                    },
                    "name": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string"
                    },
                    "contact_email": {
                      "type": "string"
                    },
                    "login_id": {
                      "type": "string"
                    },
                    "avatar_url": {
                      "type": "string"
                    },
                    "is_admin": {
                      "type": "boolean"
                    },
                    "role": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "group_id": 3483,
                    "name": "&",
                    "email": "62e7d27c7d4f42d8afcc35e2002b812c@auth.local",
                    "contact_email": "Seahub@example.com",
                    "login_id": "",
                    "avatar_url": "https://cloud.seafile.com/media/avatars/e/6/f489f6bea362e91740fd7a3a111800/resized/80/1672a4ff48124e6ada03a4414518cf4a_t5KAlDm.png",
                    "is_admin": false,
                    "role": "Member"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "_id": {
    "buffer": {
      "0": 103,
      "1": 183,
      "2": 248,
      "3": 230,
      "4": 103,
      "5": 20,
      "6": 160,
      "7": 0,
      "8": 41,
      "9": 50,
      "10": 176,
      "11": 71
    }
  }
}
```