> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hybridbox.io/llms.txt
> Use this file to discover all available pages before exploring further.

# 将用户添加到组

> 向账户认证组添加用户成员

<script src="/locale-bridge.js" />


## OpenAPI

````yaml /openapi.zh-cn.json POST /v1/public/accounts/{account_id}/auth/groups/{group_id}/members/users
openapi: 3.1.0
info:
  title: Code API (Public)
  version: 1.0.0
servers:
  - url: https://api.hybridbox.io
security: []
paths:
  /v1/public/accounts/{account_id}/auth/groups/{group_id}/members/users:
    post:
      tags:
        - public-accounts
        - public-account-auth
      summary: 向账户认证组添加用户成员
      description: 添加绑定到路径账户的组。
      operationId: >-
        add_public_account_auth_group_user_member_v1_public_accounts__account_id__auth_groups__group_id__members_users_post
      parameters:
        - in: path
          name: group_id
          required: true
          schema:
            title: Group Id
            type: string
        - in: path
          name: account_id
          required: true
          schema:
            format: uuid
            title: Account Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GroupUserMembershipRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SnapshotRefreshResponse'
          description: ''
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: 验证错误
      security:
        - PublicBearerAuth: []
components:
  schemas:
    GroupUserMembershipRequest:
      description: 用于在组中添加或删除用户的请求架构。
      properties:
        user_id:
          minLength: 1
          title: 用户ID
          type: string
      required:
        - user_id
      title: GroupUserMembershipRequest
      type: object
    SnapshotRefreshResponse:
      properties:
        group_edges:
          title: 组边
          type: integer
        group_id:
          anyOf:
            - type: string
            - type: 'null'
          title: 组 ID
        groups_seen:
          title: 已查看组数
          type: integer
        total_edges:
          title: 边总数
          type: integer
        user_edges:
          title: 用户边
          type: integer
      required:
        - groups_seen
        - user_edges
        - group_edges
        - total_edges
      title: SnapshotRefreshResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: 详情
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: 位置
          type: array
        msg:
          title: 消息
          type: string
        type:
          title: 错误类型
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    PublicBearerAuth:
      bearerFormat: JWT or Hybridbox Service account token
      description: >-
        Public API bearer credential sent as `Authorization: Bearer <token>`.
        Use either an OAuth access token or a Hybridbox Service account token.
      scheme: bearer
      type: http

````