---
title: "Lock a System"
method: POST
path: "/api/systems/{system_id}/command/builtin/lock"
tags: ["Systems"]
---

# Lock a System

`POST /api/systems/{system_id}/command/builtin/lock`

## Request

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

This endpoint allows you to run the lock command on the specified device. If a device is offline, the command will be run when the device becomes available. Only supported on Linux and Windows devices. Use Apple MDM security commands for macOS devices.

#### Sample Request
```
curl -X POST \
  https://console.jumpcloud.com/api/systems/{system_id}/command/builtin/lock \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: {API_KEY}' \
  -d {}
```

## Headers

- `x-org-id` string

## Response `201`

Command created

## Other responses

- `400`: Bad Request
- `401`: Unauthenticated
- `403`: Unauthorized
- `404`: Not Found
- `409`: Conflict
- `500`: Internal Server Error

---

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