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

# Create Application API

> API endpoint to create a new application in the Autonoma platform for test automation.



## OpenAPI

````yaml post /application
openapi: 3.0.3
info:
  title: Autonoma API
  description: |
    API for managing test runs and test definitions in the Autonoma platform.

    **Important Note:** Media URLs (images, videos) expire after 1 hour.
  version: 1.0.0
  contact:
    name: Autonoma Support
servers:
  - url: https://autonoma.app/api
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /application:
    post:
      summary: Create application
      description: >-
        Create a new application by uploading a file (APK for Android, ZIP for
        iOS) or providing web application details
      parameters:
        - name: x-platform
          in: header
          required: true
          description: Application platform type
          schema:
            type: string
            enum:
              - android
              - ios
              - web
            example: android
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - name
                - file
              properties:
                file:
                  type: string
                  format: binary
                  description: Application file (APK for Android, ZIP for iOS)
                name:
                  type: string
                  description: Name of the application
                  example: My Mobile App
                cookies:
                  type: string
                  description: Optional cookies for web applications
                  example: session=abc123
                path:
                  type: string
                  description: URL path for web applications
                  example: https://myapp.com
                version:
                  type: string
                  description: Version name
                  example: 1.0.0
                geolocation:
                  type: string
                  description: JSON string containing geolocation data
                  example: '{"latitude": 40.7128, "longitude": -74.0060}'
                customID:
                  type: string
                  description: >-
                    Optional custom identifier for the version (e.g.,
                    "build-123", "release-v2.0")
                  example: build-123
            examples:
              android_app:
                summary: Android APK Upload
                description: Example of uploading an Android APK file
                value:
                  name: TestApiAndroid
                  file: '@/path/to/your/app.apk'
              ios_app:
                summary: iOS ZIP Upload
                description: Example of uploading an iOS ZIP file
                value:
                  name: TestApiIOS
                  file: '@/Users/axel/Downloads/autonoma-bank.zip'
              web_app:
                summary: Web Application
                description: Example of creating a web application
                value:
                  name: My Web App
                  path: https://myapp.com
                  version: 1.0.0
                  cookies: session=abc123
                  geolocation: '{"latitude": 40.7128, "longitude": -74.0060}'
      responses:
        '200':
          description: Application created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  application_id:
                    type: string
                    example: cm7dbowr80042waka7thyjhkq
                  application_version_id:
                    type: string
                    example: cm7dbowr80042waka7thyjhkr
                  message:
                    type: string
                    example: App uploaded successfully
              examples:
                success_response:
                  summary: Successful upload
                  value:
                    application_id: cm7dbowr80042waka7thyjhkq
                    application_version_id: cm7dbowr80042waka7thyjhkr
                    message: App uploaded successfully
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidCredentialsError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Internal Server Error
                  message:
                    type: string
                    example: Failed to create application
      security:
        - ApiKeyAuth: []
          ApiSecretAuth: []
      x-codeSamples:
        - lang: curl
          label: Android
          source: |
            curl --location --request POST 'https://autonoma.app/api/mobile' \
            --header 'autonoma-client-id: YOUR_CLIENT_ID' \
            --header 'autonoma-client-secret: YOUR_CLIENT_SECRET' \
            --header 'x-platform: android' \
            --form 'name=TestApiAndroid' \
            --form 'customID=build-123' \
            --form 'file=@"/path/to/your/app.apk"'
        - lang: curl
          label: iOS ZIP
          source: |
            curl --location --request POST 'https://autonoma.app/api/mobile' \
            --header 'autonoma-client-id: YOUR_CLIENT_ID' \
            --header 'autonoma-client-secret: YOUR_CLIENT_SECRET' \
            --header 'x-platform: ios' \
            --form 'name=TestApiIOS' \
            --form 'customID=release-v2.0' \
            --form 'file=@"/Users/axel/Downloads/autonoma-bank.zip"'
        - lang: curl
          label: Web Application
          source: |
            curl --location --request POST 'https://autonoma.app/api/mobile' \
            --header 'autonoma-client-id: YOUR_CLIENT_ID' \
            --header 'autonoma-client-secret: YOUR_CLIENT_SECRET' \
            --header 'x-platform: web' \
            --form 'name=My Web App' \
            --form 'path=https://myapp.com' \
            --form 'version=1.0.0' \
            --form 'customID=production-deploy' \
            --form 'cookies=session=abc123'
        - lang: javascript
          label: JavaScript (FormData)
          source: |
            const formData = new FormData();
            formData.append('name', 'TestApiIOS');
            formData.append('file', fileInput.files[0]);

            fetch('https://autonoma.app/api/mobile', {
              method: 'POST',
              headers: {
                'autonoma-client-id': 'YOUR_CLIENT_ID',
                'autonoma-client-secret': 'YOUR_CLIENT_SECRET',
                'x-platform': 'ios'
              },
              body: formData
            });
        - lang: python
          label: Python (requests)
          source: >
            import requests


            files = {'file': open('/Users/axel/Downloads/autonoma-bank.zip',
            'rb')}

            data = {'name': 'TestApiIOS'}

            headers = {
                'autonoma-client-id': 'YOUR_CLIENT_ID',
                'autonoma-client-secret': 'YOUR_CLIENT_SECRET',
                'x-platform': 'ios'
            }


            response = requests.post(
                'https://autonoma.app/api/mobile',
                files=files,
                data=data,
                headers=headers
            )
components:
  schemas:
    BadRequestError:
      type: object
      properties:
        error:
          type: string
          example: Bad Request
        message:
          type: string
          example: >-
            No applicationVersionID provided, and could not automatically
            determine an application from the tests within folder
            cmbsgljfr00fd060153r9x8ek. Please specify an applicationVersionID or
            ensure at least one test has an associated application.
    InvalidCredentialsError:
      type: object
      properties:
        error:
          type: string
          example: Unauthorized
        message:
          type: string
          example: Invalid authentication credentials
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: autonoma-client-id
      description: Client ID for authentication
    ApiSecretAuth:
      type: apiKey
      in: header
      name: autonoma-client-secret
      description: Client secret for authentication

````