> ## 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/authorizations
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/authorizations:
    post:
      tags:
        - public-accounts
        - public-account-auth
      summary: アカウント認可を付与
      description: アカウントスコープの認可を作成。
      operationId: >-
        grant_public_account_authorization_v1_public_accounts__account_id__auth_authorizations_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/GrantRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/code_api__routes__v1_private__account_auth__grant__GrantResponse
          description: ''
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: 検証エラー
      security:
        - PublicBearerAuth: []
components:
  schemas:
    GrantRequest:
      description: 新しいケイパビリティベース認可を付与するためのスキーマ。
      properties:
        capability_key:
          anyOf:
            - type: string
            - type: 'null'
          description: ケイパビリティ付与のケイパビリティキー
          title: ケイパビリティキー
        grant_kind:
          $ref: '#/components/schemas/GrantKind'
          description: 付与の種類
        resource_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          description: スコープ付きリソース識別子
          title: リソース ID
        resource_type:
          anyOf:
            - $ref: '#/components/schemas/ResourceType'
            - type: 'null'
          description: スコープ付きリソースタイプ
        subject_id:
          description: ユーザーまたはグループ識別子
          minLength: 1
          title: サブジェクト ID
          type: string
        subject_type:
          $ref: '#/components/schemas/SubjectType'
          description: 'サブジェクトの種類: ユーザーまたはグループ'
      required:
        - subject_type
        - subject_id
        - grant_kind
      title: Grantリクエスト
      type: object
    code_api__routes__v1_private__account_auth__grant__GrantResponse:
      properties:
        capability_key:
          anyOf:
            - type: string
            - type: 'null'
          title: ケイパビリティキー
        created_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: 作成日時
        grant_kind:
          title: 付与の種類
          type: string
        id:
          format: uuid
          title: ID
          type: string
        resource_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: リソース ID
        resource_type:
          anyOf:
            - type: string
            - type: 'null'
          title: リソースタイプ
        revoked_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: 取り消し日時
        subject_id:
          title: サブジェクト ID
          type: string
        subject_type:
          title: サブジェクトタイプ
          type: string
      required:
        - id
        - subject_type
        - subject_id
        - grant_kind
      title: Grantレスポンス
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: 詳細
          type: array
      title: HTTPValidationエラー
      type: object
    GrantKind:
      description: 認可付与の種類。
      enum:
        - capability
        - account_owner
        - super_admin
      title: GrantKind
      type: string
    ResourceType:
      description: 認可リソースおよびスコープタイプ。
      enum:
        - client
        - account
        - workspace
        - domain
        - dns_record
        - mailbox
        - redirect
        - forwarding
        - credential
        - tenant
        - route
        - proxy
      title: リソースType
      type: string
    SubjectType:
      description: 認可サブジェクトタイプ。
      enum:
        - user
        - group
        - service_account
      title: サブジェクトType
      type: string
    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
  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

````