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

# Post cliauthpoll



## OpenAPI

````yaml /api/openapi.json post /cli/auth/poll
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:
  /cli/auth/poll:
    post:
      tags:
        - CliAuth
      operationId: v1.cli.auth.poll
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                device_code:
                  type: string
                  maxLength: 100
              required:
                - device_code
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
                    properties:
                      token:
                        type:
                          - string
                          - 'null'
                      user:
                        type: object
                        properties:
                          name:
                            type:
                              - string
                              - 'null'
                          email:
                            type:
                              - string
                              - 'null'
                        required:
                          - name
                          - email
                    required:
                      - token
                      - user
                  meta:
                    type: string
                required:
                  - success
                  - data
                  - meta
        '403':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: string
                    required:
                      - code
                      - message
                      - details
                required:
                  - success
                  - error
        '404':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: string
                    required:
                      - code
                      - message
                      - details
                required:
                  - success
                  - error
        '410':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: string
                    required:
                      - code
                      - message
                      - details
                required:
                  - success
                  - error
        '422':
          $ref: '#/components/responses/ValidationException'
        '428':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: string
                    required:
                      - code
                      - message
                      - details
                required:
                  - success
                  - error
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error overview.
                required:
                  - message
components:
  responses:
    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.