---
title: "Lock user"
method: POST
path: "/2/drive/{drive_id}/users/{user_id}/lock"
tags: ["Drive > Users"]
---

# Lock user

`POST /2/drive/{drive_id}/users/{user_id}/lock`

Sets status to locked, preventing access to drive.

## Path parameters

- `drive_id` integer, required
- `user_id` integer, required

## Response `200`

OK

- object
  - `result` 'success' | 'error' | 'asynchronous', required — Result of the HTTP request
  - `data` boolean

## Other responses

- `400` — User not associated with drive
- `403` — Forbidden
- `503` — Service Unavailable

---

[API](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools.md) · [All operations](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/infomaniak/api-reference-developer-tools/revisions/667aae28fec6/schema)
