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

# Create App Version

> Create a managed app version (Self-Hosted Only). Adds a new version of a self-hosted application. To create and upload a new app version to our servers, use the [ManageXR CLI](https://docs.managexr.com/cli-reference/command/upload-app)



## OpenAPI

````yaml Post /v1/apps/{packageName}/versions
openapi: 3.1.0
info:
  title: ManageXR API
  description: API documentation for ManageXR
  version: 1.0.0
servers:
  - url: https://managexrapi.com
    description: ManageXR API Server
security:
  - basicAuth: []
paths:
  /v1/apps/{packageName}/versions:
    post:
      summary: Create app version (self-hosted)
      description: >-
        Create a managed app version (Self-Hosted Only). Adds a new version of a
        self-hosted application. To create and upload a new app version to our
        servers, use the [ManageXR
        CLI](https://docs.managexr.com/cli-reference/command/upload-app)
      parameters:
        - name: packageName
          in: path
          required: true
          schema:
            type: string
          description: The package name of the app
        - name: organizationId
          in: query
          required: false
          schema:
            type: string
          description: >
            Unique identifier of the organization. This parameter is only
            necessary when using multi-organization API keys. 


            Defaults to the organizationId associated with the API key.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                versionCode:
                  type: number
                  description: Version code of the app
                  example: 42
                apkUrl:
                  type: string
                  description: URL of the APK file
                  example: https://storage.example.com/apps/com.example.app.apk
                apkMd5:
                  type: string
                  description: MD5 hash of the APK file
                  example: d41d8cd98f00b204e9800998ecf8427e
                obbUrl:
                  type: string
                  description: URL of the OBB file
                  example: https://storage.example.com/apps/com.example.app.obb
                obbMd5:
                  type: string
                  description: MD5 hash of the OBB file
                  example: d41d8cd98f00b204e9800998ecf8427e
                versionName:
                  type: string
                  description: Version name of the app
                  example: 1.0.0
                versionLabel:
                  type: string
                  description: Label for uniqueness among app versions
                  example: Quest
                apkSize:
                  type: number
                  description: Size of the APK file in bytes
                  example: 72633861
                obbSize:
                  type: number
                  description: Size of the OBB file in bytes
                  example: 1024
              required:
                - versionCode
                - apkUrl
                - versionName
            example:
              versionCode: 42
              apkUrl: https://storage.example.com/apps/com.example.app.apk
              apkMd5: d41d8cd98f00b204e9800998ecf8427e
              obbUrl: https://storage.example.com/apps/com.example.app.obb
              obbMd5: d41d8cd98f00b204e9800998ecf8427e
              versionName: 1.0.0
              versionLabel: Quest
              apkSize: 72633861
              obbSize: 1024
      responses:
        '200':
          description: The created app version
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        description: Unique identifier of the app version
                        example: av_123
                      type:
                        type: string
                        enum:
                          - managed
                          - shared
                          - external
                          - instant
                        description: Type of the app version
                        example: managed
                      createdAt:
                        type: number
                        description: Creation timestamp
                        example: 1645615777448
                      updatedAt:
                        type: number
                        description: Last update timestamp
                        example: 1687352117203
                      versionCode:
                        type: number
                        description: Version code of the app
                        example: 83894522
                      versionName:
                        type: string
                        description: Version name of the app
                        example: 8.7.8.1206
                      versionLabel:
                        type: string
                        description: Label for uniqueness among app versions
                        example: Quest
                      apkSize:
                        type: number
                        description: Size of the APK file in bytes
                        example: 72633861
                      obbSize:
                        type: number
                        description: Size of the OBB file in bytes
                        example: 1024
                      selfHosted:
                        type: boolean
                        description: Whether the app is self-hosted
                        example: true
                      apkUrl:
                        type: string
                        description: URL of the APK file (only present if self-hosted)
                        example: https://storage.example.com/apps/com.example.app.apk
                      obbUrl:
                        type: string
                        description: URL of the OBB file (only present if self-hosted)
                        example: https://storage.example.com/apps/com.example.app.obb
              example:
                data:
                  id: av_123
                  type: managed
                  configurationDeployments:
                    config_123: 1
                    config_456: 0
                  createdAt: 1645615777448
                  updatedAt: 1687352117203
                  versionCode: 83894522
                  versionName: 8.7.8.1206
                  versionLabel: Quest
                  apkSize: 72633861
                  obbSize: 1024
                  selfHosted: true
                  apkUrl: https://storage.example.com/apps/com.example.app.apk
                  obbUrl: https://storage.example.com/apps/com.example.app.obb
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                    example: Invalid request
                  error:
                    type: string
                    example: ManageXR Error
              example:
                statusCode: 400
                message: Invalid request
                error: ManageXR Error
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 403
                  message:
                    type: string
                    example: Forbidden
                  error:
                    type: string
                    example: ManageXR Error
              example:
                statusCode: 403
                message: Forbidden
                error: ManageXR Error
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >
        API key based authentication where <encoded-value> is the Base64
        encoding of `API_KEY_ID`:`API_KEY_SECRET`

        - **Username**: The API Key ID.

        - **Password**: The API Key Secret.

````