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

# Add a Fleet-maintained app

> Add ONE app of the Fleet-maintained catalog to the company software, with Fleet's own install and uninstall scripts. Find its `fleetMaintainedAppId` and platform with `getFleetMaintainedApps`; an app whose `softwareId` is set is already there, so change it with `updateSoftware` instead. Targeting: `targetMethod` `None` (default: in the list, on no device), `All` (every device of the platform) or `DeviceGroup` with a non-empty `deviceGroupIds` and optional `excludeDeviceGroupIds`; preview the reach with `simulateSoftwareTargetCount`. With `automaticInstall`, Fleet installs the app on every targeted device as soon as it is added; with `selfService`, their users can install it themselves. `autoUpdatePolicies` updates devices that run an older version, `installDuringSetup` installs it on every new device of the platform during setup, ignoring the targeting: set it only when the user asks for that. All four default to false, as in the cockpit. Returns the new software `id`, which `getSoftware`, `updateSoftware` (targeting, settings, patch window) and `installDeviceSoftware` take. An app the company already has answers 409, `DeviceGroup` without `deviceGroupIds` 400, a company whose MDM is not configured 412, a demo company 403. App Store apps and custom packages cannot be added through this endpoint.

Key: WriteScope: Company


## OpenAPI

````yaml https://api.getprimo.com/openapi.json post /software/fleet-maintained-apps
openapi: 3.1.1
info:
  title: Public API - BETA
  description: Read docs on https://docs.getprimo.com/
  version: '1.0'
  contact: {}
servers:
  - url: https://api.getprimo.com
security:
  - apikey: []
tags: []
paths:
  /software/fleet-maintained-apps:
    post:
      tags:
        - Softwares
      summary: Add a Fleet-maintained app
      description: >-
        Add ONE app of the Fleet-maintained catalog to the company software,
        with Fleet's own install and uninstall scripts. Find its
        `fleetMaintainedAppId` and platform with `getFleetMaintainedApps`; an
        app whose `softwareId` is set is already there, so change it with
        `updateSoftware` instead. Targeting: `targetMethod` `None` (default: in
        the list, on no device), `All` (every device of the platform) or
        `DeviceGroup` with a non-empty `deviceGroupIds` and optional
        `excludeDeviceGroupIds`; preview the reach with
        `simulateSoftwareTargetCount`. With `automaticInstall`, Fleet installs
        the app on every targeted device as soon as it is added; with
        `selfService`, their users can install it themselves.
        `autoUpdatePolicies` updates devices that run an older version,
        `installDuringSetup` installs it on every new device of the platform
        during setup, ignoring the targeting: set it only when the user asks for
        that. All four default to false, as in the cockpit. Returns the new
        software `id`, which `getSoftware`, `updateSoftware` (targeting,
        settings, patch window) and `installDeviceSoftware` take. An app the
        company already has answers 409, `DeviceGroup` without `deviceGroupIds`
        400, a company whose MDM is not configured 412, a demo company 403. App
        Store apps and custom packages cannot be added through this endpoint.
      operationId: createFleetMaintainedApp
      parameters: []
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateFleetMaintainedAppResult_Output'
components:
  schemas:
    CreateFleetMaintainedAppResult_Output:
      type: object
      properties:
        id:
          type: string
          description: >-
            Id of the company software created, the one `getSoftware` and
            `updateSoftware` take
        name:
          type: string
        platform:
          type: string
          enum:
            - macos
            - windows
            - ios
            - ipados
            - android
            - linux
            - chromeos
            - unknown
        version:
          anyOf:
            - type: string
            - type: 'null'
        targetMethod:
          type: string
          description: >-
            `None`: in the company software, on no device yet. `All`: every
            device of the platform. `DeviceGroup`: the devices of
            `deviceGroupIds` minus those of `excludeDeviceGroupIds`
          enum:
            - None
            - All
            - DeviceGroup
        deviceGroupIds:
          type: array
          items:
            type: string
        excludeDeviceGroupIds:
          type: array
          items:
            type: string
        installationType:
          type: string
          description: >-
            `automatic`: Fleet installs the app on every targeted device.
            `manual`: installed on demand only
          enum:
            - manual
            - automatic
        selfService:
          type: boolean
        autoInstallUpdate:
          type: boolean
        installDuringSetup:
          type: boolean
        message:
          type: string
          description: A human-readable description of the action
      required:
        - id
        - name
        - platform
        - version
        - targetMethod
        - deviceGroupIds
        - excludeDeviceGroupIds
        - installationType
        - selfService
        - autoInstallUpdate
        - installDuringSetup
        - message
      additionalProperties: false
  securitySchemes:
    apikey:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: >-
        Use your Primo API key in the Authorization header as `Bearer
        <API_KEY>`.

````

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