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



## OpenAPI

````yaml /api/openapi.json post /apps
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:
  /apps:
    post:
      tags:
        - Apps
      operationId: v1.apps.store
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 100
                repo_full_name:
                  type: string
                  maxLength: 150
                repo_branch:
                  type:
                    - string
                    - 'null'
                  maxLength: 100
                framework:
                  type:
                    - string
                    - 'null'
                  enum:
                    - Next.js
                    - React
                    - Vue
                    - Nuxt
                    - Astro
                    - SvelteKit
                    - Remix
                    - React Router
                    - NestJS
                    - Angular
                    - Laravel
                    - Symfony
                    - Django
                    - Flask
                    - FastAPI
                    - Express
                    - Node.js
                    - null
                color:
                  anyOf:
                    - $ref: '#/components/schemas/DeployedAppColor'
                    - type: 'null'
                runtime:
                  type: string
                  enum:
                    - node-22
                    - node-20
                    - php-8.4
                    - php-8.3
                    - python-3.12
                    - python-3.11
                    - static
                root_directory:
                  type:
                    - string
                    - 'null'
                  maxLength: 150
                install_command:
                  type:
                    - string
                    - 'null'
                  maxLength: 255
                build_command:
                  type:
                    - string
                    - 'null'
                  maxLength: 255
                start_command:
                  type:
                    - string
                    - 'null'
                  maxLength: 255
                port:
                  type:
                    - integer
                    - 'null'
                  minimum: 1
                  maximum: 65535
                output_directory:
                  type:
                    - string
                    - 'null'
                  maxLength: 150
                auto_deploy:
                  type: boolean
                database_type:
                  anyOf:
                    - $ref: '#/components/schemas/DeployedAppDatabaseType'
                    - type: 'null'
                env_vars:
                  type:
                    - array
                    - 'null'
                  items:
                    type: object
                    properties:
                      key:
                        type: string
                        pattern: ^[A-Za-z_][A-Za-z0-9_]*$
                        maxLength: 100
                      value:
                        type:
                          - string
                          - 'null'
                        maxLength: 2000
                      is_secret:
                        type:
                          - boolean
                          - 'null'
                    required:
                      - key
                  maxItems: 100
                  uniqueItems: true
              required:
                - name
                - repo_full_name
                - runtime
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: array
                    items: {}
                  meta:
                    type: object
                    properties:
                      state:
                        type: string
                        enum:
                          - deploying
                          - failed
                          - over_quota
                      deployment_id:
                        type:
                          - string
                          - 'null'
                      message:
                        type: string
                        enum:
                          - >-
                            Application créée. Elle se déploiera avec une offre
                            payante : vos applications gratuites incluses sont
                            déjà utilisées.
                          - >-
                            Application créée, mais le premier déploiement a
                            échoué. Relancez-le.
                          - Application créée, premier déploiement lancé.
                    required:
                      - state
                      - deployment_id
                      - message
                required:
                  - success
                  - data
                  - meta
        '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:
    DeployedAppColor:
      type: string
      description: >
        Palette de couleurs unies proposées pour identifier un projet (favicon
        généré, aperçu). Teintes assez sombres pour porter un texte blanc
        lisible en thème clair comme en thème sombre. Source unique : le front
        reçoit `color_hex` et la liste `colors`, il n'a pas de palette à lui.
      enum:
        - blue
        - cyan
        - teal
        - green
        - amber
        - orange
        - red
        - pink
        - violet
        - slate
      title: DeployedAppColor
    DeployedAppDatabaseType:
      type: string
      enum:
        - postgresql
        - mysql
        - redis
        - mongodb
      title: DeployedAppDatabaseType
  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.