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

# Acquista domini

> Acquista domini tramite l'API cliente pubblica.

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


## OpenAPI

````yaml /openapi.it.json POST /v1/public/accounts/{account_id}/domains/purchase
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}/domains/purchase:
    post:
      tags:
        - public-accounts
        - public-domains
      summary: Acquista domini
      description: Acquista domini tramite l'API cliente pubblica.
      operationId: >-
        purchase_public_domains_v1_public_accounts__account_id__domains_purchase_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/DomainPurchaseRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DomainPurchaseResponse'
          description: ''
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Errore di validazione
      security:
        - PublicBearerAuth: []
components:
  schemas:
    DomainPurchaseRequest:
      description: Schema per acquistare uno o più domini.
      properties:
        contact_info:
          $ref: '#/components/schemas/ContactInfo'
        domains:
          items:
            type: string
          minItems: 1
          title: Domini
          type: array
        workspace_id:
          format: uuid4
          title: Id area di lavoro
          type: string
      required:
        - domains
        - workspace_id
        - contact_info
      title: DomainPurchaseRequest
      type: object
    DomainPurchaseResponse:
      properties:
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: valuta
        estimated_total:
          anyOf:
            - type: string
            - type: 'null'
          title: stimato totale
        failed_count:
          default: 0
          title: non riusciti conteggio
          type: integer
        payment_url:
          anyOf:
            - type: string
            - type: 'null'
          title: URL pagamento
        purchase_batch_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id lotto acquisto
        results:
          items:
            $ref: '#/components/schemas/DomainPurchaseResult'
          title: Risultati
          type: array
        successful_count:
          default: 0
          title: riusciti conteggio
          type: integer
      required:
        - results
      title: DomainPurchaseResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Dettaglio
          type: array
      title: HTTPValidationError
      type: object
    ContactInfo:
      description: Schema per le informazioni di contatto del registrante del dominio.
      properties:
        address_1:
          minLength: 1
          title: Indirizzo 1
          type: string
        city:
          minLength: 1
          title: Città
          type: string
        country:
          description: Codice paese ISO a 2 lettere
          maxLength: 2
          minLength: 2
          title: Paese
          type: string
        email:
          format: email
          title: E-mail
          type: string
        first_name:
          minLength: 1
          title: Nome
          type: string
        last_name:
          minLength: 1
          title: Cognome
          type: string
        organization:
          minLength: 1
          title: Organizzazione
          type: string
        phone:
          description: Numero di telefono con prefisso internazionale
          title: Telefono
          type: string
        state:
          minLength: 1
          title: Stato/provincia
          type: string
        zip:
          minLength: 1
          title: CAP
          type: string
      required:
        - first_name
        - last_name
        - organization
        - email
        - phone
        - address_1
        - city
        - state
        - zip
        - country
      title: ContactInfo
      type: object
    DomainPurchaseResult:
      description: Risultato dell'avvio dell'acquisto di un singolo dominio.
      properties:
        domain_name:
          title: Nome dominio
          type: string
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Errore
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: errore codice
        id:
          anyOf:
            - format: uuid4
              type: string
            - type: 'null'
          title: ID
        status:
          title: Stato
          type: string
      required:
        - domain_name
        - status
      title: DomainPurchaseResult
      type: object
    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

````