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

# Install an app

> Installs an app for the given teams.



## OpenAPI

````yaml post /apps/install
openapi: 3.0.0
info:
  title: THENA APPS STUDIO
  description: >-
    Thena apps studio is a comprehensive API suite designed to facilitate the
    creation and management of apps.
  version: '1.0'
  contact: {}
servers:
  - url: https://apps-studio.thena.ai
security: []
tags: []
paths:
  /apps/install:
    post:
      tags:
        - App Installation
      summary: Install an app
      description: Installs an app for the given teams.
      operationId: installApp
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InstallAppDto'
      responses:
        '201':
          description: App installed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppInstallResponseDto'
        '400':
          description: Bad Request - Invalid input parameters
        '422':
          description: Bot Installation Failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BotInstallationExceptionResponse'
        '500':
          description: Internal Server Error
      security:
        - x-api-key: []
components:
  schemas:
    InstallAppDto:
      type: object
      properties:
        teamIds:
          example:
            - TGCA9557W4
            - TGCA9557W5
          description: Array of team IDs where the app will be installed
          type: array
          items:
            type: string
        appId:
          type: string
          example: 9FKHF3KJ10JQTR2YJ6QW1QZTHBZ85
          description: Unique identifier of the app to be installed
        appConfiguration:
          description: Configuration settings for the app installation
          allOf:
            - $ref: '#/components/schemas/AppInstallationConfiguration'
      required:
        - teamIds
        - appId
        - appConfiguration
    AppInstallResponseDto:
      type: object
      properties:
        appName:
          type: string
          description: Name of the installed app
          example: Thena.ai
        botSub:
          type: string
          description: Bot subscriber ID
          example: OGGA0557MV
        botTokenKey:
          type: string
          description: Bot token key for authentication
          example: pk_live_*******_*******
        botToken:
          type: string
          description: Bot token for authentication
          example: pk_live_*******_*******
        installedBySub:
          type: string
          description: Subscriber ID of the user who installed the app
          example: UGGA0557MV
        installedByEmail:
          type: string
          description: Email of the user who installed the app
          example: john.doe@example.com
        appInstalledForTeams:
          description: List of team IDs where the app is installed
          example:
            - TGGA0557MV
            - TGGA0557MV
          type: array
          items:
            type: string
        appIdentifier:
          type: string
          description: Identifier of the app
          example: thena-ai
        installedByOrgId:
          type: string
          description: Organization ID of the user who installed the app
          example: OGGA0557MV
        metadata:
          type: object
          description: Metadata of the app
          example:
            app_identifier: thena-ai
            app_name: Thena.ai
            app_description: Thena.ai is a platform for creating and managing AI agents.
            app_version: 1.0.0
            app_author: Thena.ai
            app_author_email: contact@thena.ai
            app_author_url: https://thena.ai
      required:
        - appName
        - botSub
        - botTokenKey
        - botToken
        - installedBySub
        - installedByEmail
        - appInstalledForTeams
        - appIdentifier
        - installedByOrgId
        - metadata
    BotInstallationExceptionResponse:
      type: object
      properties:
        statusCode:
          type: number
          enum:
            - 100
            - 101
            - 102
            - 103
            - 200
            - 201
            - 202
            - 203
            - 204
            - 205
            - 206
            - 300
            - 301
            - 302
            - 303
            - 304
            - 307
            - 308
            - 400
            - 401
            - 402
            - 403
            - 404
            - 405
            - 406
            - 407
            - 408
            - 409
            - 410
            - 411
            - 412
            - 413
            - 414
            - 415
            - 416
            - 417
            - 418
            - 421
            - 422
            - 424
            - 428
            - 429
            - 500
            - 501
            - 502
            - 503
            - 504
            - 505
          example: 422
          description: HTTP status code
        message:
          type: string
          example: 'Bot Installation Failed: Unable to create bot user'
          description: Detailed error message
        name:
          type: string
          example: BotInstallationException
          description: Name of the exception
      required:
        - statusCode
        - message
        - name
    AppInstallationConfiguration:
      type: object
      properties:
        required_settings:
          example:
            - check the app manifest for required_settings schema
          description: >-
            Required configuration settings that must be provided for the app
            installation
          type: array
          items:
            type: object
        optional_settings:
          example:
            - check the app manifest for optional_settings schema
          description: Optional configuration settings for the app installation
          type: array
          items:
            type: object
      required:
        - required_settings
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key

````