> ## 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.

# Concedere autorizzazione

> Concedere autorizzazione account

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


## OpenAPI

````yaml /openapi.it.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: Concedere autorizzazione account
      description: Crea un’autorizzazione nell’ambito dell’account.
      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: Errore di convalida
      security:
        - PublicBearerAuth: []
components:
  schemas:
    GrantRequest:
      description: Schema per granting un new capability-based authorization.
      properties:
        capability_key:
          anyOf:
            - type: string
            - type: 'null'
          description: capacità key for capability grants
          title: capacità chiave
        grant_kind:
          $ref: '#/components/schemas/GrantKind'
          description: concessione kind
        resource_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          description: Identificatore della risorsa con ambito
          title: risorsa ID
        resource_type:
          anyOf:
            - $ref: '#/components/schemas/ResourceType'
            - type: 'null'
          description: Tipo di risorsa con ambito
        subject_id:
          description: Identificatore dell'utente o del gruppo
          minLength: 1
          title: soggetto ID
          type: string
        subject_type:
          $ref: '#/components/schemas/SubjectType'
          description: 'Tipo di oggetto: utente o gruppo'
      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: capacità chiave
        created_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: creato alle
        grant_kind:
          title: concessione tipo
          type: string
        id:
          format: uuid
          title: ID
          type: string
        resource_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: risorsa ID
        resource_type:
          anyOf:
            - type: string
            - type: 'null'
          title: risorsa tipo
        revoked_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: revocato alle
        subject_id:
          title: soggetto ID
          type: string
        subject_type:
          title: soggetto tipo
          type: string
      required:
        - id
        - subject_type
        - subject_id
        - grant_kind
      title: GrantResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Dettaglio
          type: array
      title: HTTPValidationError
      type: object
    GrantKind:
      description: Tipologie di concessione di autorizzazione.
      enum:
        - capability
        - account_owner
        - super_admin
      title: GrantKind
      type: string
    ResourceType:
      description: Authorization resource e scope types.
      enum:
        - client
        - account
        - workspace
        - domain
        - dns_record
        - mailbox
        - redirect
        - forwarding
        - credential
        - tenant
        - route
        - proxy
      title: ResourceType
      type: string
    SubjectType:
      description: Tipologie di soggetti autorizzativi.
      enum:
        - user
        - group
        - service_account
      title: SubjectType
      type: string
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Posizione
          type: array
        msg:
          title: Messaggio
          type: string
        type:
          title: Tipo errore
          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

````