---
title: "Lock Cluster"
method: POST
path: "/cluster/{clusterId}/lock"
tags: ["Clusters"]
---

# Lock Cluster

`POST /cluster/{clusterId}/lock`

## Request

- Base URL: `https://api.qovery.com`
- URL: `https://api.qovery.com/cluster/{clusterId}/lock`
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/qovery/apis/qovery-api/docs/cluster/:clusterId/lock/post.ts> (a function with typed inputs; its response is checked against the schema)

Lock a Cluster

## Request body

- ClusterLockRequest
  - `reason` string, required
  - `ttl_in_days` integer

## Response `200`

OK

- ClusterLock
  - `reason` string, required
  - `ttl_in_days` integer
  - `cluster_id` string, uuid, required
  - `locked_at` string, date-time, required
  - `owner_name` string, required

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found

---

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