> ## 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.

# Update a software

> Update ONE software's targeting and settings. Targeting is required: set `targetMethod` to `All` (every device) or `DeviceGroup` with a non-empty `deviceGroupIds`. Optional settings: selfService, autoUpdateSoftware, autoUpdatePolicies, automaticInstall, installDuringSetup, and the auto-update window. Changing targeting can uninstall the software from devices that lose it. Use `simulateSoftwareTargetCount` to preview the reach first. This endpoint does NOT accept install scripts, and because targeting is mandatory here it always rewrites it — to change a script and nothing else, use `updateSoftwareScripts` instead.

<span className="badge-write">Key: Write</span><span className="badge-company">Scope: Company</span>


## OpenAPI

````yaml https://api.getprimo.com/openapi.json put /software/{softwareId}
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/{softwareId}:
    put:
      tags:
        - Softwares
      summary: Update a software
      description: >-
        Update ONE software's targeting and settings. Targeting is required: set
        `targetMethod` to `All` (every device) or `DeviceGroup` with a non-empty
        `deviceGroupIds`. Optional settings: selfService, autoUpdateSoftware,
        autoUpdatePolicies, automaticInstall, installDuringSetup, and the
        auto-update window. Changing targeting can uninstall the software from
        devices that lose it. Use `simulateSoftwareTargetCount` to preview the
        reach first. This endpoint does NOT accept install scripts, and because
        targeting is mandatory here it always rewrites it — to change a script
        and nothing else, use `updateSoftwareScripts` instead.
      operationId: updateSoftware
      parameters:
        - name: softwareId
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
components:
  securitySchemes:
    apikey:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: >-
        Use your Primo API key in the Authorization header as `Bearer
        <API_KEY>`.

````