> ## 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}/invitations
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}/invitations:
    post:
      tags:
        - public-accounts
        - public-account-auth
      summary: 邀请账户用户加入组
      description: 邀请用户加入绑定到路径账户的组。
      operationId: >-
        invite_public_account_user_to_group_v1_public_accounts__account_id__auth_groups__group_id__invitations_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/GroupInviteRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/InviteResponse'
                  - $ref: '#/components/schemas/MaterializedInvitationAccessResponse'
                title: >-
                  Response Invite Public Account User To Group V1 Public
                  Accounts  Account Id  Auth Groups  Group Id  Invitations Post
          description: ''
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: 验证错误
      security:
        - PublicBearerAuth: []
components:
  schemas:
    GroupInviteRequest:
      description: 用于邀请用户直接加入组的请求架构。
      properties:
        email:
          description: 目标电子邮件地址
          title: 电子邮件
          type: string
        locale:
          anyOf:
            - type: string
            - type: 'null'
          description: 交易性邀请邮件的可选语言环境
          title: 区域设置
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: 笔记
      required:
        - email
      title: GroupInviteRequest
      type: object
    InviteResponse:
      properties:
        accepted_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: 接受时间
        accepted_subject_id:
          anyOf:
            - type: string
            - type: 'null'
          title: 接受主体 ID
        assignments:
          items:
            $ref: '#/components/schemas/InvitationAssignmentResponse'
          title: 分配
          type: array
        created_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: 创建时间
        email:
          title: 电子邮件
          type: string
        expires_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: 过期时间
        id:
          format: uuid
          title: ID
          type: string
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: 笔记
        permission_context:
          $ref: '#/components/schemas/PermissionInspectabilitySnapshot'
        status:
          title: 状态
          type: string
      required:
        - id
        - email
        - status
        - assignments
        - permission_context
      title: InviteResponse
      type: object
    MaterializedInvitationAccessResponse:
      properties:
        accepted_subject_id:
          title: 接受主体 ID
          type: string
        assignment_count:
          title: 分配计数
          type: integer
        email:
          title: 电子邮件
          type: string
        grant_count:
          title: 授予计数
          type: integer
        group_membership_count:
          title: 组成员关系计数
          type: integer
        mode:
          default: materialized
          title: 模式
          type: string
        permission_context:
          $ref: '#/components/schemas/PermissionInspectabilitySnapshot'
        role_assignment_count:
          title: 角色分配计数
          type: integer
        status:
          default: accepted
          title: 状态
          type: string
      required:
        - email
        - accepted_subject_id
        - assignment_count
        - group_membership_count
        - grant_count
        - role_assignment_count
        - permission_context
      title: MaterializedInvitationAccessResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: 详情
          type: array
      title: HTTPValidationError
      type: object
    InvitationAssignmentResponse:
      description: 邀请响应中单个权限分配的架构。
      properties:
        assignment_kind:
          title: 分配类型
          type: string
        capability_key:
          anyOf:
            - type: string
            - type: 'null'
          title: 能力键
        grant_kind:
          anyOf:
            - type: string
            - type: 'null'
          title: 授予类型
        group_id:
          anyOf:
            - type: string
            - type: 'null'
          title: 组 ID
        id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: ID
        position:
          title: 位置
          type: integer
        resource_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: 资源 ID
        resource_type:
          anyOf:
            - type: string
            - type: 'null'
          title: 资源类型
        role_key:
          anyOf:
            - type: string
            - type: 'null'
          title: 角色关键
      required:
        - assignment_kind
        - position
      title: InvitationAssignmentResponse
      type: object
    PermissionInspectabilitySnapshot:
      description: 用于用户、组和邀请管理的共享检查性快照。
      properties:
        assigned_bundle_keys:
          items:
            type: string
          title: 已分配捆绑包键
          type: array
        direct_capability_keys:
          items:
            type: string
          title: 直接能力键
          type: array
        owner_assignments:
          items:
            $ref: '#/components/schemas/OwnerAssignmentSnapshot'
          title: 所有者分配
          type: array
        resolved_capability_keys:
          items:
            type: string
          title: 已解析能力键
          type: array
        status:
          default: active
          title: 状态
          type: string
        subject_id:
          default: ''
          title: 主体 ID
          type: string
        subject_type:
          default: unknown
          title: 主体类型
          type: string
      title: PermissionInspectabilitySnapshot
      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
    OwnerAssignmentSnapshot:
      description: 指示帐户所有者关系的架构。
      properties:
        account_id:
          format: uuid
          title: 账户 Id
          type: string
      required:
        - account_id
      title: OwnerAssignmentSnapshot
      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

````