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

# Refresh Primo's record of a device from the MDM

> Pull ONE device's current state from the MDM into Primo — hardware and OS details, disk encryption, users, compliance and MDM/EDR status — and refresh the labels and assignment suggestions that depend on them. This is the Primo side of a device refresh: `refetchDevice` asks the device to re-report to the MDM, this brings what the MDM holds into Primo, so after a fix the two together make `getDevice` answer with reality. Prefer this after any change made outside Primo; to refresh only the Primo-managed software rows, use `syncDeviceSoftware`. EXPENSIVE — do not call it in a loop or across a fleet: one call runs a full MDM sync and queues label, device-user and assignment-suggestion jobs behind it. Call it once for the device you just changed, then re-read `getDevice`. Set `forceEnforcerExecution` to also re-run the MDM control enforcers and re-fetch the disk encryption key — slower still, and it can queue commands on the device.

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


## OpenAPI

````yaml https://api.getprimo.com/openapi.json post /devices/{deviceId}/sync
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:
  /devices/{deviceId}/sync:
    post:
      tags:
        - Devices
      summary: Refresh Primo's record of a device from the MDM
      description: >-
        Pull ONE device's current state from the MDM into Primo — hardware and
        OS details, disk encryption, users, compliance and MDM/EDR status — and
        refresh the labels and assignment suggestions that depend on them. This
        is the Primo side of a device refresh: `refetchDevice` asks the device
        to re-report to the MDM, this brings what the MDM holds into Primo, so
        after a fix the two together make `getDevice` answer with reality.
        Prefer this after any change made outside Primo; to refresh only the
        Primo-managed software rows, use `syncDeviceSoftware`. EXPENSIVE — do
        not call it in a loop or across a fleet: one call runs a full MDM sync
        and queues label, device-user and assignment-suggestion jobs behind it.
        Call it once for the device you just changed, then re-read `getDevice`.
        Set `forceEnforcerExecution` to also re-run the MDM control enforcers
        and re-fetch the disk encryption key — slower still, and it can queue
        commands on the device.
      operationId: syncPrimoDevice
      parameters:
        - name: deviceId
          required: true
          in: path
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceActionResult_Output'
components:
  schemas:
    DeviceActionResult_Output:
      type: object
      properties:
        success:
          type: boolean
          const: true
        message:
          type: string
          description: A human-readable description of the action
      required:
        - success
        - 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>`.

````