---
title: "Lock Device"
method: POST
path: "/applemdms/{apple_mdm_id}/devices/{device_id}/lock"
tags: ["Apple MDM"]
---

# Lock Device

`POST /applemdms/{apple_mdm_id}/devices/{device_id}/lock`

## Request

- Base URL: `https://console.jumpcloud.com/api/v2`
- URL: `https://console.jumpcloud.com/api/v2/applemdms/{apple_mdm_id}/devices/{device_id}/lock`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/jumpcloud/apis/jumpcloud-api-2/docs/applemdms/:apple_mdm_id/devices/:device_id/lock/post.ts> (a function with typed inputs; its response is checked against the schema)

Locks a DEP-enrolled device.

#### Sample Request
```
  curl -X POST https://console.jumpcloud.com/api/v2/applemdms/{apple_mdm_id}/devices/{device_id}/lock \
  -H 'accept: application/json' \
  -H 'content-type: application/json' \
  -H 'x-api-key: {API_KEY}' \
  -d '{}'
```

## Headers

- `x-org-id` string

## Request body

- object
  - `pin` string: 6-digit PIN, required for MacOS, to lock the device

## Response `204`

## Other responses

- `400`
- `401`: Unauthenticated
- `403`: Unauthorized
- `404`: Not Found
- `409`: Conflict
- `500`

---

[API](https://skmtc.dev/jumpcloud/apis/jumpcloud-api-2.md) - [All operations](https://skmtc.dev/jumpcloud/apis/jumpcloud-api-2/llms.txt) - [OpenAPI document](https://skmtc.dev/jumpcloud/apis/jumpcloud-api-2/revisions/3f09fe63caaa?raw)
