---
title: "Set lock options"
method: POST
path: "/locks"
tags: ["service"]
---

# Set lock options

`POST /locks`

Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options

## Request body

- LocksOption
  - `error_message` string, nullable
  - `write` boolean, required

## Response `200`

successful operation

- object
  - `time` number, float — Time spent to process this request
  - `status` string
  - `result` LocksOption
    - `error_message` string, nullable
    - `write` boolean, required

## Other responses

- `default` — error
- `4XX` — error

---

[API](https://skmtc.dev/qdrant/apis/qdrant-api.md) · [All operations](https://skmtc.dev/qdrant/apis/qdrant-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/qdrant/qdrant-api/revisions/32595103f462/schema)
