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

# Crear invitación

> Crear invitación de cuenta

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


## OpenAPI

````yaml /openapi.es.json POST /v1/public/accounts/{account_id}/auth/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/invitations:
    post:
      tags:
        - public-accounts
        - public-account-auth
      summary: Crear invitación de cuenta
      description: Crea una invitación en el ámbito de la cuenta.
      operationId: >-
        create_public_account_invitation_v1_public_accounts__account_id__auth_invitations_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/InviteRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/InviteResponse'
                  - $ref: '#/components/schemas/MaterializedInvitationAccessResponse'
                title: >-
                  Response Create Public Account Invitation V1 Public Accounts 
                  Account Id  Auth Invitations Post
          description: ''
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Error de validación
      security:
        - PublicBearerAuth: []
components:
  schemas:
    InviteRequest:
      description: Solicite un esquema para crear una invitación de nuevo usuario.
      properties:
        assignments:
          items:
            $ref: '#/components/schemas/InvitationAssignmentRequest'
          minItems: 1
          title: asignaciones
          type: array
        email:
          description: Dirección de correo electrónico de destino
          title: correo electrónico
          type: string
        locale:
          anyOf:
            - type: string
            - type: 'null'
          description: Optional locale para transactional invitation email
          title: configuración regional
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: nota
      required:
        - email
        - assignments
      title: InviteRequest
      type: object
    InviteResponse:
      properties:
        accepted_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: aceptado en
        accepted_subject_id:
          anyOf:
            - type: string
            - type: 'null'
          title: aceptado sujeto ID
        assignments:
          items:
            $ref: '#/components/schemas/InvitationAssignmentResponse'
          title: asignaciones
          type: array
        created_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: creado en
        email:
          title: correo electrónico
          type: string
        expires_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: expira en
        id:
          format: uuid
          title: ID
          type: string
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: nota
        permission_context:
          $ref: '#/components/schemas/PermissionInspectabilitySnapshot'
        status:
          title: Estado
          type: string
      required:
        - id
        - email
        - status
        - assignments
        - permission_context
      title: InviteResponse
      type: object
    MaterializedInvitationAccessResponse:
      properties:
        accepted_subject_id:
          title: aceptado sujeto ID
          type: string
        assignment_count:
          title: asignación recuento
          type: integer
        email:
          title: correo electrónico
          type: string
        grant_count:
          title: concesión recuento
          type: integer
        group_membership_count:
          title: grupo Membership recuento
          type: integer
        mode:
          default: materialized
          title: modo
          type: string
        permission_context:
          $ref: '#/components/schemas/PermissionInspectabilitySnapshot'
        role_assignment_count:
          title: Recuento de asignación de roles
          type: integer
        status:
          default: accepted
          title: Estado
          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: Detalle
          type: array
      title: HTTPValidationError
      type: object
    InvitationAssignmentRequest:
      description: Esquema para una única asignación de permiso dentro de una invitación.
      properties:
        capability_key:
          anyOf:
            - type: string
            - type: 'null'
          title: capacidad clave
        grant_kind:
          anyOf:
            - $ref: '#/components/schemas/GrantKind'
            - type: 'null'
        group_id:
          anyOf:
            - type: string
            - type: 'null'
          title: grupo ID
        resource_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: recurso ID
        resource_type:
          anyOf:
            - $ref: '#/components/schemas/ResourceType'
            - type: 'null'
        role_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Clave de rol
      title: InvitationAssignmentRequest
      type: object
    InvitationAssignmentResponse:
      description: >-
        Esquema para una asignación de permiso única dentro de una respuesta de
        invitación.
      properties:
        assignment_kind:
          title: asignación clase
          type: string
        capability_key:
          anyOf:
            - type: string
            - type: 'null'
          title: capacidad clave
        grant_kind:
          anyOf:
            - type: string
            - type: 'null'
          title: concesión clase
        group_id:
          anyOf:
            - type: string
            - type: 'null'
          title: grupo ID
        id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: ID
        position:
          title: posición
          type: integer
        resource_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: recurso ID
        resource_type:
          anyOf:
            - type: string
            - type: 'null'
          title: recurso tipo
        role_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Clave de rol
      required:
        - assignment_kind
        - position
      title: InvitationAssignmentResponse
      type: object
    PermissionInspectabilitySnapshot:
      description: >-
        Instantánea de inspeccionabilidad compartida para la gestión de
        usuarios, grupos e invitaciones.
      properties:
        assigned_bundle_keys:
          items:
            type: string
          title: Claves de paquete asignadas
          type: array
        direct_capability_keys:
          items:
            type: string
          title: Direct capacidad Keys
          type: array
        owner_assignments:
          items:
            $ref: '#/components/schemas/OwnerAssignmentSnapshot'
          title: propietario asignaciones
          type: array
        resolved_capability_keys:
          items:
            type: string
          title: resuelto capacidad Keys
          type: array
        status:
          default: active
          title: Estado
          type: string
        subject_id:
          default: ''
          title: sujeto ID
          type: string
        subject_type:
          default: unknown
          title: sujeto tipo
          type: string
      title: PermissionInspectabilitySnapshot
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Ubicación
          type: array
        msg:
          title: Mensaje
          type: string
        type:
          title: Tipo de error
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    GrantKind:
      description: Tipos de concesión de autorización.
      enum:
        - capability
        - account_owner
        - super_admin
      title: GrantKind
      type: string
    ResourceType:
      description: Authorization resource y scope types.
      enum:
        - client
        - account
        - workspace
        - domain
        - dns_record
        - mailbox
        - redirect
        - forwarding
        - credential
        - tenant
        - route
        - proxy
      title: ResourceType
      type: string
    OwnerAssignmentSnapshot:
      description: Esquema que indica una relación de propietario de cuenta.
      properties:
        account_id:
          format: uuid
          title: cuenta 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

````