---
title: OnDemand
slug: neurons-api/ondemand
createdAt: 2026-08-19T08:34:10.401Z
---

In this method, the on-demand distribution category is assigned to the device. The app is installed once, with continual re-installation not being required.

**HTTP Method - POST**

Adds a new device to the on-demand distribution list and attempts to install the app on the targeted device as soon as possible.

- [POST /api/SwdPackage/targetDevice/external](docId\:UUIqy_7d2stXN9GelRGSg)

## POST Method

### Request URI

**POST /api/SwdPackage/targetDevice/external**

Adds a device to the system for on-demand distribution of the specified apps (package IDs).

### Header Parameters

| Name          | Type   | Description                                                                                                                                                                                                                                                   |
| ------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Authorization | String | Use the `Bearer <access-token>` value determined during the [../Shared-Content/authenticate\_api.htm](docId\:g63kPQj5_TALr1zpNkeeN)[app-distribution-authentication.htm](docId\:fd5_JmdAucKSdgC_uJ35I)[Authentication](docId\:g63kPQj5_TALr1zpNkeeN) process. |

### Request Body Parameters

| Name        | Type   | Description                     |
| ----------- | ------ | ------------------------------- |
| api-version | String | The current API version number. |

### Example Request

```xml
{
        "device": {
        "discoveryId": "5VEh5JYBaRBX15MehARz",
        "agentId": "A2E58A5DFA3976BD8357A2F2A80FA22550BAA6AF",
        "displayName": "bgc-aa-39",

        "domain": null,
        "os": "Microsoft Windows Server 2016 Server Standard Edition (full installation), 64-bit",
        "platform": "Windows",
        "deviceType": "Virtual Server"
                },
        "packageIds": [
        "60511c75-9cca-4a10-9ea9-ab1c09060b2c"
                ]

}
```
