# Add a Store or enterprise app to the MDM App Repository Add app to repository ## Endpoint `POST /api/v1/mdm/apps` ## Request URL `https://{server-hostname}:8383/api/v1/mdm/apps` ## Scope `MDMDeviceMgmt.CREATE` ## Header `Authorization: d92d4xxxxxxxxxxxxx15f52` ## Request Parameters ### Request Headers | Parameter | Type | Required | Value | |---|---|---|---| | Content-Type | string | Mandatory | application/json | | Accept | string | Mandatory | application/json | ### Query Parameters | Parameter | Type | Required | Description | |---|---|---|---| | platform | string | Optional | Filter results by device platform. Allowed values: 1=iOS, 2=Android, 3=Windows, 4=macOS, 6=tvOS | ### Request Body `application/json` | Parameter | Type | Required | Description | |---|---|---|---| | app_name | string | Mandatory | Name of the app to add to the repository | | app_type | integer | Mandatory | App type: 0 = Free Store App, 1 = Paid Store App, 2 = Enterprise App | | app_file | long | Optional | File ID of the app package file. Required for enterprise apps (app_type=2). Upload using [Upload File](https://www.manageengine.com/products/desktop-central/help/api/onpremise/files-upload-file-ems.html) | | display_image | long | Optional | File ID of the app display image. Upload using [Upload File](https://www.manageengine.com/products/desktop-central/help/api/onpremise/files-upload-file-ems.html) | | full_image | long | Optional | File ID of the app full-size image. Upload using [Upload File](https://www.manageengine.com/products/desktop-central/help/api/onpremise/files-upload-file-ems.html) | | config_file | long | Optional | File ID of the app configuration file. Upload using [Upload File](https://www.manageengine.com/products/desktop-central/help/api/onpremise/files-upload-file-ems.html) | | vpp_file_source | long | Optional | File ID of the VPP file source. Upload using [Upload File](https://www.manageengine.com/products/desktop-central/help/api/onpremise/files-upload-file-ems.html) | | app_category_id | integer | Optional | Identifier for the app category | | supported_devices | integer | Optional | Supported devices: 1 = Smartphone, 2 = Tablet, 3 = Both | | release_label_id | long | Optional | Release label ID (Stable or Beta channel). Obtain from the [Get App Details](https://www.manageengine.com/products/desktop-central/help/api/onpremise/app-management-get-app-details.html) response | | description | string | Optional | Custom description of the app | | bundle_identifier | string | Optional | App bundle identifier | | prevent_backup | boolean | Optional | Prevent app data backup during device backup. Default: false | ## Sample Request ```curl curl --request POST \ --url 'https://appdomain/api/v1/mdm/apps?platform=SOME_STRING_VALUE' \ --header 'Accept: application/json' \ --header 'Authorization: d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/json' \ --data '{"app_name":"Zylker MDM","prevent_backup":false,"app_type":2,"supported_devices":3,"release_label_id":9007199254741076,"description":"The is an enterprise app","bundle_identifier":"com.manageengine.mdm.iosagent","app_category_id":2,"app_file":9007199254741080}' ``` ## Sample Request Body ### Add an enterprise app with file ID and release label ```json { "app_name": "Zylker MDM", "prevent_backup": false, "app_type": 2, "supported_devices": 3, "release_label_id": 9007199254741076, "description": "The is an enterprise app", "bundle_identifier": "com.manageengine.mdm.iosagent", "app_category_id": 2, "app_file": 9007199254741080 } ``` ### Add a free store app without app file ```json { "app_name": "Google Chrome", "prevent_backup": false, "app_type": 0, "supported_devices": 1, "release_label_id": 9007199254741076, "description": "Google Chrome Browser", "bundle_identifier": "com.android.chrome", "app_category_id": 1, "app_file": 0 } ``` ## Response Parameters ### HTTP Code 200 Response Body: `application/json` | Parameter | Type | Description | |---|---|---| | app_id | long | Unique identifier for the newly created app | | app_name | string | Name of the app | | app_category | string | Category of the app | | app_type | integer | App type: 0 = Free Store App, 1 = Paid Store App, 2 = Enterprise App | | bundle_identifier | string | App bundle identifier (e.g., com.manageengine.mdm.iosagent) | | version | string | Version of the app | | platform_type | integer | Platform: 1 = iOS, 2 = Android, 3 = Windows | | description | string | Custom description of the app | | icon | string | URL link for the app icon image. May be null | | store_url | string | Store URL for the app (iOS only). May be null for enterprise apps | | is_app_paid | boolean | Whether the app is a paid app | | country_code | string | Country code for App Store (iOS only). May be null | | store_id | string | Identifier for the App Store (iOS only). May be null | | added_time | long | Epoch timestamp (milliseconds) when the app was added | | modified_time | long | Epoch timestamp (milliseconds) when the app was last modified | ## Possible Response Codes | Code | Type | |---|---| | 200 | HTTP code | ## Sample Response: HTTP 200 ### Successfully added enterprise app to the repository ```json { "store_id": "9007199254741069", "app_type": 2, "added_time": 1714630800000, "icon": "https://appDomain/mdm-logo.png", "description": "The is an enterprise app", "version": "1.1.1", "store_url": "https://www.zylker.com/app/zylker-mdm/id720111835?mt=8", "app_name": "Zylker MDM", "country_code": "US", "modified_time": 1714717200000, "platform_type": 2, "is_app_paid": false, "bundle_identifier": "com.manageengine.mdm.iosagent", "app_category": "Education", "app_id": 9007199254741080 } ``` ![ ](https://www.zohowebstatic.com/sites/zweb/images/people/ico-help.png) **Duration:** 1 minute | **Threshold:** 60 | **Lock period:** 5 minutes Duration - Time window for the threshold. Threshold - Number of API calls allowed within the specified duration. Lock Period - Wait time before consecutive API requests.