> ## 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.ko.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: GrantRequest
      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: GrantResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: 세부 정보
          type: array
      title: HTTP검증 오류
      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: ResourceType
      type: string
    SubjectType:
      description: 권한 주체 유형입니다.
      enum:
        - user
        - group
        - service_account
      title: SubjectType
      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: 검증 오류
      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

````