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

# Create a signed upload URL for an app

> Creates or updates an app and returns pre-signed upload URLs for each file



## OpenAPI

````yaml /api-reference/phones.yaml post /apps/create-signed-upload-url
openapi: 3.1.0
info:
  title: Phones
  version: v1
servers:
  - description: Droidrun Cloud API
    url: https://api.mobilerun.ai/v1
security:
  - bearerAuth: []
paths:
  /apps/create-signed-upload-url:
    post:
      tags:
        - Apps Cloud Storage
      summary: Create a signed upload URL for an app
      description: >-
        Creates or updates an app and returns pre-signed upload URLs for each
        file
      operationId: createSignedUploadUrlPublic
      requestBody:
        content:
          application/json:
            schema:
              properties:
                bundleId:
                  maxLength: 255
                  minLength: 1
                  pattern: ^[a-zA-Z][a-zA-Z0-9_]*(\.[a-zA-Z][a-zA-Z0-9_-]*)+$
                  type: string
                country:
                  default: US
                  description: Country code for Search Results
                  example: US
                  type: string
                description:
                  type: string
                developerName:
                  type: string
                displayName:
                  minLength: 1
                  type: string
                files:
                  items:
                    properties:
                      contentType:
                        enum:
                          - application/vnd.android.package-archive
                          - application/octet-stream
                          - application/zip
                        type: string
                      fileName:
                        minLength: 1
                        pattern: ^[^/\\]+\.(apk|xapk|apks|ipa)$/i
                        type: string
                      sha256:
                        pattern: ^[a-f0-9]{64}$/i
                        type: string
                    required:
                      - fileName
                      - contentType
                    type: object
                  minItems: 1
                  type: array
                iconURL:
                  anyOf:
                    - type: string
                    - format: uri
                      type: string
                    - type: string
                platform:
                  default: android
                  enum:
                    - android
                    - ios
                  type: string
                targetSdk:
                  type: number
                versionCode:
                  type: number
                versionName:
                  minLength: 1
                  type: string
              required:
                - bundleId
                - displayName
                - versionCode
                - versionName
                - files
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  appId:
                    description: App ID
                    format: uuid
                    type: string
                  r2UploadUrls:
                    description: Pre-signed URLs for uploading app files
                    items:
                      properties:
                        fileName:
                          type: string
                        r2UploadUrl:
                          format: uri
                          type: string
                      required:
                        - fileName
                        - r2UploadUrl
                      type: object
                    type: array
                  versionId:
                    description: App version ID
                    format: uuid
                    type: string
                required:
                  - versionId
                  - appId
                  - r2UploadUrls
                type: object
          description: Signed upload URL created successfully
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.apps.createSignedUploadURL({
              bundleId: 'NX0.JB-_-.m-u--_-p.Z1-u_2I.D--_T-_.dzZ-.Wx.L_a8--_.w_D_',
              displayName: 'x',
              files: [
                { contentType: 'application/vnd.android.package-archive', fileName: 'J!Q0Ok0bzJb7.apk/i' },
              ],
              versionCode: 0,
              versionName: 'x',
            });

            console.log(response.appId);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            response = client.apps.create_signed_upload_url(
                bundle_id="NX0.JB-_-.m-u--_-p.Z1-u_2I.D--_T-_.dzZ-.Wx.L_a8--_.w_D_",
                display_name="x",
                files=[{
                    "content_type": "application/vnd.android.package-archive",
                    "file_name": "J!Q0Ok0bzJb7.apk/i",
                }],
                version_code=0,
                version_name="x",
            )
            print(response.app_id)
components:
  securitySchemes:
    bearerAuth:
      bearerFormat: Opaque
      description: Bearer token via Authorization header
      scheme: bearer
      type: http

````

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