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

# Unlock a device

> Unlock the device for the given device ID.

**Supported platforms:** macOS, Windows, Linux

**Platform-specific behavior:**
- **macOS**: Returns the 6-digit unlock PIN that was generated during the lock operation. The user must enter this PIN manually on the device to unlock it.
- **Windows/Linux**: Sends an unlock command to the device.

**Not supported:** iOS, Android, Chrome OS

<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}/unlock
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}/unlock:
    post:
      tags:
        - Devices
      summary: Unlock a device
      description: >-
        Unlock the device for the given device ID.


        **Supported platforms:** macOS, Windows, Linux


        **Platform-specific behavior:**

        - **macOS**: Returns the 6-digit unlock PIN that was generated during
        the lock operation. The user must enter this PIN manually on the device
        to unlock it.

        - **Windows/Linux**: Sends an unlock command to the device.


        **Not supported:** iOS, Android, Chrome OS
      operationId: unlockDevice
      parameters:
        - name: deviceId
          required: true
          in: path
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnlockDevice_Output'
components:
  schemas:
    UnlockDevice_Output:
      type: object
      properties:
        success:
          type: boolean
          const: true
        platform:
          type: string
          description: The platform of the unlocked device
          enum:
            - ANDROID
            - IOS
            - MACOS
            - WINDOWS
            - LINUX
            - CHROME_OS
            - IPADOS
            - UNKNOWN
        unlockPin:
          description: >-
            Unlock PIN to enter on the device (macOS only). Null for platforms
            where unlock is handled remotely.
          anyOf:
            - type: string
            - type: 'null'
        message:
          type: string
          description: A human-readable description of the unlock operation
      required:
        - success
        - platform
        - 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>`.

````