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

# Acheter des domaines

> Acheter des domaines via l’API client publique.

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


## OpenAPI

````yaml /openapi.fr.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: Acheter des domaines
      description: Acheter des domaines via l’API client publique.
      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: Erreur de validation
      security:
        - PublicBearerAuth: []
components:
  schemas:
    DomainPurchaseRequest:
      description: Schema pour acheter un ou plusieurs domaines.
      properties:
        contact_info:
          $ref: '#/components/schemas/ContactInfo'
        domains:
          items:
            type: string
          minItems: 1
          title: Domaines
          type: array
        workspace_id:
          format: uuid4
          title: Id de l’espace de travail
          type: string
      required:
        - domains
        - workspace_id
        - contact_info
      title: DomainPurchaseRequest
      type: object
    DomainPurchaseResponse:
      properties:
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: devise
        estimated_total:
          anyOf:
            - type: string
            - type: 'null'
          title: estimé total
        failed_count:
          default: 0
          title: échoués nombre
          type: integer
        payment_url:
          anyOf:
            - type: string
            - type: 'null'
          title: URL de paiement
        purchase_batch_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id du lot d achat
        results:
          items:
            $ref: '#/components/schemas/DomainPurchaseResult'
          title: Resultats
          type: array
        successful_count:
          default: 0
          title: réussis nombre
          type: integer
      required:
        - results
      title: DomainPurchaseResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Détail
          type: array
      title: HTTPValidationError
      type: object
    ContactInfo:
      description: Schéma des informations de contact du titulaire du domaine.
      properties:
        address_1:
          minLength: 1
          title: Adresse 1
          type: string
        city:
          minLength: 1
          title: Ville
          type: string
        country:
          description: Code pays ISO à 2 lettres
          maxLength: 2
          minLength: 2
          title: Pays
          type: string
        email:
          format: email
          title: E-mail
          type: string
        first_name:
          minLength: 1
          title: Prénom
          type: string
        last_name:
          minLength: 1
          title: Nom de famille
          type: string
        organization:
          minLength: 1
          title: Organisation
          type: string
        phone:
          description: Numéro de téléphone avec indicatif pays
          title: Téléphone
          type: string
        state:
          minLength: 1
          title: État
          type: string
        zip:
          minLength: 1
          title: Code postal
          type: string
      required:
        - first_name
        - last_name
        - organization
        - email
        - phone
        - address_1
        - city
        - state
        - zip
        - country
      title: ContactInfo
      type: object
    DomainPurchaseResult:
      description: Resultat du lancement de l achat d un domaine.
      properties:
        domain_name:
          title: Nom de domaine
          type: string
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Erreur
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: erreur code
        id:
          anyOf:
            - format: uuid4
              type: string
            - type: 'null'
          title: ID
        status:
          title: Statut
          type: string
      required:
        - domain_name
        - status
      title: DomainPurchaseResult
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Emplacement
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Type d erreur
          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

````