> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kennhosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Achète un domaine : même commande que l'espace client, payée tout de suite avec le solde



## OpenAPI

````yaml /api/openapi.json post /domains
openapi: 3.1.2
info:
  title: API KENN HOSTING
  version: 1.0.0
  description: >-
    API REST de KENN HOSTING : gérez vos VPS, hébergements, domaines,
    applications, commandes et tickets. Authentification par clé API (en-tête
    `Authorization: Bearer kh_live_...`). Les opérations qui débitent votre
    solde exigent un en-tête `Idempotency-Key`.
servers:
  - url: https://kennhosting.com/api/v1
    description: Production
security:
  - cleApi: []
paths:
  /domains:
    post:
      tags:
        - Domains
      summary: >-
        Achète un domaine : même commande que l'espace client, payée tout de
        suite avec le solde
      operationId: v1.domains.store
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoreStandaloneDomainRequest'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '422':
          $ref: '#/components/responses/ValidationException'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error overview.
                required:
                  - message
components:
  schemas:
    StoreStandaloneDomainRequest:
      type: object
      properties:
        domain:
          type: string
          maxLength: 255
        years:
          type: integer
          minimum: 1
          maximum: 10
        promo_code:
          type:
            - string
            - 'null'
          maxLength: 50
        registrant:
          type:
            - object
            - 'null'
          properties:
            first_name:
              type:
                - string
                - 'null'
              maxLength: 64
            last_name:
              type:
                - string
                - 'null'
              maxLength: 64
            email:
              type:
                - string
                - 'null'
              format: email
              maxLength: 128
            phone:
              type:
                - string
                - 'null'
              maxLength: 32
            address:
              type:
                - string
                - 'null'
              maxLength: 128
            city:
              type:
                - string
                - 'null'
              maxLength: 64
            postal_code:
              type:
                - string
                - 'null'
              maxLength: 16
            postcode:
              type:
                - string
                - 'null'
              maxLength: 16
            country:
              type:
                - string
                - 'null'
              minLength: 2
              maxLength: 2
            state:
              type:
                - string
                - 'null'
              maxLength: 64
            organization:
              type:
                - string
                - 'null'
              maxLength: 128
            firstname:
              type:
                - string
                - 'null'
              maxLength: 64
            lastname:
              type:
                - string
                - 'null'
              maxLength: 64
      required:
        - domain
      title: StoreStandaloneDomainRequest
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    cleApi:
      type: http
      description: Clé API créée dans votre espace client (kh_live_... ou kh_test_...).
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.