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

# Create Mobile App

> Register a new mobile app for deep linking and attribution tracking

## Request

<ParamField header="X-API-KEY" type="string" required>
  Your API key: `b2co_your_api_key`
</ParamField>

<ParamField body="platform" type="string" required>
  Platform type: `IOS` or `ANDROID`
</ParamField>

<ParamField body="name" type="string" required>
  Display name for the mobile app (1-255 characters)
</ParamField>

### iOS App Parameters

<ParamField body="bundleId" type="string">
  iOS bundle identifier (e.g., com.yourcompany.yourapp). Required for iOS apps.
</ParamField>

<ParamField body="appStoreFallback" type="string">
  App Store URL to redirect users without the app installed
</ParamField>

<ParamField body="appStoreId" type="string">
  App Store ID for the app (numeric string)
</ParamField>

<ParamField body="iosMinVersion" type="string">
  Minimum iOS version required (e.g., "14.0")
</ParamField>

### Android App Parameters

<ParamField body="packageName" type="string">
  Android package name (e.g., com.yourcompany.yourapp). Required for Android apps.
</ParamField>

<ParamField body="playStoreFallback" type="string">
  Play Store URL to redirect users without the app installed
</ParamField>

<ParamField body="androidMinVersion" type="string">
  Minimum Android API level required (e.g., "21")
</ParamField>

<Info>
  **Platform-Specific Fields**: Only provide fields relevant to your chosen platform.
  For iOS apps, provide iOS-specific fields. For Android apps, provide Android-specific fields.
</Info>

## Response

<ResponseField name="success" type="boolean">
  Indicates if the request was successful
</ResponseField>

<ResponseField name="data" type="object">
  The created mobile app object
</ResponseField>

<ResponseField name="data.id" type="string">
  Unique identifier for the created mobile app
</ResponseField>

<ResponseField name="data.name" type="string">
  Display name of the mobile app
</ResponseField>

<ResponseField name="data.platform" type="string">
  Platform type: `IOS` or `ANDROID`
</ResponseField>

<ResponseField name="data.bundleId" type="string">
  iOS bundle identifier (iOS apps only)
</ResponseField>

<ResponseField name="data.appStoreFallback" type="string">
  App Store fallback URL (iOS apps only)
</ResponseField>

<ResponseField name="data.packageName" type="string">
  Android package name (Android apps only)
</ResponseField>

<ResponseField name="data.playStoreFallback" type="string">
  Play Store fallback URL (Android apps only)
</ResponseField>

<ResponseField name="data.createdAt" type="string">
  ISO 8601 timestamp when the app was created
</ResponseField>

<ResponseField name="data.updatedAt" type="string">
  ISO 8601 timestamp when the app was last updated
</ResponseField>

<ResponseField name="timestamp" type="string">
  ISO 8601 timestamp of the response
</ResponseField>

<RequestExample>
  ```bash iOS App theme={null}
  curl -X POST "https://api.bit2connect.com/1.0/mobile-apps" \
    -H "X-API-KEY: b2co_your_api_key" \
    -H "Content-Type: application/json" \
    -d '{
      "platform": "IOS",
      "name": "My iOS App",
      "bundleId": "com.mycompany.myapp",
      "appStoreFallback": "https://apps.apple.com/app/id123456789",
      "appStoreId": "123456789",
      "iosMinVersion": "14.0"
    }'
  ```

  ```bash Android App theme={null}
  curl -X POST "https://api.bit2connect.com/1.0/mobile-apps" \
    -H "X-API-KEY: b2co_your_api_key" \
    -H "Content-Type: application/json" \
    -d '{
      "platform": "ANDROID",
      "name": "My Android App",
      "packageName": "com.mycompany.myapp",
      "playStoreFallback": "https://play.google.com/store/apps/details?id=com.mycompany.myapp",
      "androidMinVersion": "21"
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.bit2connect.com/1.0/mobile-apps', {
    method: 'POST',
    headers: {
      'X-API-KEY': 'b2co_your_api_key',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      platform: 'IOS',
      name: 'My iOS App',
      bundleId: 'com.mycompany.myapp',
      appStoreFallback: 'https://apps.apple.com/app/id123456789',
      appStoreId: '123456789',
      iosMinVersion: '14.0'
    })
  });

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://api.bit2connect.com/1.0/mobile-apps',
      headers={
          'X-API-KEY': 'b2co_your_api_key',
          'Content-Type': 'application/json'
      },
      json={
          'platform': 'IOS',
          'name': 'My iOS App',
          'bundleId': 'com.mycompany.myapp',
          'appStoreFallback': 'https://apps.apple.com/app/id123456789',
          'appStoreId': '123456789',
          'iosMinVersion': '14.0'
      }
  )

  data = response.json()
  print(data)
  ```
</RequestExample>

<ResponseExample>
  ```json iOS App Response theme={null}
  {
    "success": true,
    "data": {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "My iOS App",
      "platform": "IOS",
      "bundleId": "com.mycompany.myapp",
      "appStoreFallback": "https://apps.apple.com/app/id123456789",
      "appStoreId": "123456789",
      "iosMinVersion": "14.0",
      "packageName": null,
      "playStoreFallback": null,
      "androidMinVersion": null,
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-01-15T10:30:00Z"
    },
    "timestamp": "2024-01-15T10:30:00Z"
  }
  ```

  ```json Android App Response theme={null}
  {
    "success": true,
    "data": {
      "id": "550e8400-e29b-41d4-a716-446655440001",
      "name": "My Android App",
      "platform": "ANDROID",
      "bundleId": null,
      "appStoreFallback": null,
      "appStoreId": null,
      "iosMinVersion": null,
      "packageName": "com.mycompany.myapp",
      "playStoreFallback": "https://play.google.com/store/apps/details?id=com.mycompany.myapp",
      "androidMinVersion": "21",
      "createdAt": "2024-01-15T11:00:00Z",
      "updatedAt": "2024-01-15T11:00:00Z"
    },
    "timestamp": "2024-01-15T11:00:00Z"
  }
  ```
</ResponseExample>
