> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-1d264819.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 更新组织成员

> 更新组织成员的角色。



## OpenAPI

````yaml /zh/products/cloud/api-reference/cloud-openapi.json patch /v1/organizations/{organizationId}/members/{userId}
openapi: 3.0.1
info:
  contact:
    email: support@clickhouse.com
    name: ClickHouse Support
    url: >-
      https://clickhouse.com/docs/en/cloud/manage/openapi?referrer=openapi-299828
  title: OpenAPI spec for ClickHouse Cloud
  version: '1.0'
servers:
  - url: https://api.clickhouse.cloud
security:
  - basicAuth: []
tags:
  - name: Organization
  - name: User management
  - name: Billing
  - name: Service
  - name: Backup
  - name: OpenAPI
  - name: Prometheus
  - name: ClickPipes
paths:
  /v1/organizations/{organizationId}/members/{userId}:
    patch:
      tags:
        - User management
      summary: 更新组织成员
      description: 更新组织成员的角色。
      parameters:
        - description: 该成员所属组织的 ID。
          in: path
          name: organizationId
          required: true
          schema:
            format: uuid
            type: string
        - description: 要更新的用户 ID
          in: path
          name: userId
          required: true
          schema:
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MemberPatchRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  requestId:
                    description: 为每个请求分配的唯一 ID。UUIDv4
                    format: uuid
                    type: string
                  result:
                    $ref: '#/components/schemas/Member'
                  status:
                    description: HTTP 状态码。
                    example: 200
                    type: number
                type: object
          description: 成功响应
        '400':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: 详细 error 描述。
                    type: string
                  status:
                    description: HTTP 状态码。
                    example: 400
                    type: number
                type: object
          description: 由于请求存在被视为客户端错误的问题，服务器无法或不会处理该请求。
components:
  schemas:
    MemberPatchRequest:
      properties:
        role:
          description: 成员在组织中的角色。
          enum:
            - admin
            - developer
          type: string
    Member:
      properties:
        email:
          description: 成员的电子邮件地址，按个人用户 profile 中的设置。
          format: email
          type: string
        joinedAt:
          description: 成员加入组织的时间戳。ISO-8601。
          format: date-time
          type: string
        name:
          description: 成员名称，按个人用户 profile 中的设置。
          type: string
        role:
          description: 成员在组织中的角色。
          enum:
            - admin
            - developer
          type: string
        userId:
          description: 唯一用户 ID。如果用户属于多个组织，此 ID 将保持不变。
          type: string
  securitySchemes:
    basicAuth:
      description: >-
        使用在 ClickHouse Cloud 控制台中获取的 key ID 和 key
        secret：https://clickhouse.com/docs/cloud/manage/openapi
      scheme: basic
      type: http

````