> ## 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.ja.json POST /v1/public/accounts/{account_id}/auth/groups
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:
    post:
      tags:
        - public-accounts
        - public-account-auth
      summary: アカウント認可グループを作成
      description: アカウントに紐づくグループを作成。
      operationId: >-
        create_public_account_auth_group_v1_public_accounts__account_id__auth_groups_post
      parameters:
        - in: path
          name: account_id
          required: true
          schema:
            format: uuid
            title: Account Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GroupCreateRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupResponse'
          description: ''
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: 検証エラー
      security:
        - PublicBearerAuth: []
components:
  schemas:
    GroupCreateRequest:
      description: 新しい認証グループを作成するためのリクエストスキーマ。
      properties:
        account_id:
          description: 新しいアカウントスコープグループの所有アカウント
          format: uuid
          title: アカウントID
          type: string
        attributes:
          anyOf:
            - additionalProperties:
                anyOf:
                  - items:
                      type: string
                    type: array
                  - type: string
              type: object
            - type: 'null'
          title: 属性
        description:
          anyOf:
            - type: string
            - type: 'null'
          description: ローカルグループの説明
          title: 説明
        name:
          maxLength: 255
          minLength: 1
          title: 名前
          type: string
      required:
        - name
        - account_id
      title: グループCreateリクエスト
      type: object
    GroupResponse:
      properties:
        account_id:
          format: uuid
          title: アカウントID
          type: string
        attributes:
          additionalProperties:
            items:
              type: string
            type: array
          title: 属性
          type: object
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: 説明
        id:
          title: ID
          type: string
        keycloak_account_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: キーcloak アカウント ID
        keycloak_name:
          title: キーcloak 名
          type: string
        linked_scopes:
          items:
            $ref: '#/components/schemas/GroupScopeLinkResponse'
          title: リンク済みスコープ
          type: array
        name:
          title: 名前
          type: string
        parent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: 親 ID
        path:
          anyOf:
            - type: string
            - type: 'null'
          title: パス
        permission_context:
          $ref: '#/components/schemas/PermissionInspectabilitySnapshot'
        subgroup_ids:
          items:
            type: string
          title: サブグループ ID
          type: array
      required:
        - id
        - account_id
        - name
        - keycloak_name
      title: グループレスポンス
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: 詳細
          type: array
      title: HTTPValidationエラー
      type: object
    GroupScopeLinkResponse:
      description: グループにリンクされたリソース スコープのスキーマ。
      properties:
        resource_id:
          format: uuid
          title: リソース ID
          type: string
        resource_type:
          title: リソースタイプ
          type: string
      required:
        - resource_type
        - resource_id
      title: グループスコープLinkレスポンス
      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: 権限InspectabilitySnapshot
      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: Validationエラー
      type: object
    OwnerAssignmentSnapshot:
      description: アカウント所有者の関係を示すスキーマ。
      properties:
        account_id:
          format: uuid
          title: アカウントID
          type: string
      required:
        - account_id
      title: Owner割り当てSnapshot
      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

````