---
title: Lock/unlock
url: https://www.tines.com/docs/api/resources/locked/
updated: 2026-03-12T20:45:05+00:00
description: Lock or unlock a resource. Locking a resource prevents its value from being modified. Requires `RESOURCE_MANAGE` permission.
---

*[tines.com](https://www.tines.com/llms.txt) › [Docs](https://www.tines.com/llms.txt) › [Tines API](https://www.tines.com/llms.txt) › [Resources](https://www.tines.com/llm/docs/api/resources.md)*

# Lock/unlock

*[View on tines.com](https://www.tines.com/docs/api/resources/locked/)*

## Description

Lock or unlock a resource. Locking a resource prevents its value from being modified. Requires `RESOURCE_MANAGE` permission.

Unlocking via the API is **permanent** — the resource remains unlocked until explicitly locked again. This differs from the Tines UI, which offers a temporary unlock that automatically re-locks the resource after a single edit.

Locking or unlocking a resource also applies to its test resource. A test resource cannot be locked or unlocked independently from its live resource.

## Request

HTTP Method: **PUT**

| Parameter | Description                                             |
| --------- | ------------------------------------------------------- |
| id        | The ID of the resource.                                 |
| locked    | Boolean. `true` to lock the resource, `false` to unlock |

### Sample request

```bash
curl -X PUT \
  https://<tenant-domain>/api/v1/global_resources/<<resource_id>>/locked \
  -H 'content-type: application/json' \
  -H 'Authorization: Bearer <<CREDENTIAL.tines_api_key>>' \
  -d '{"locked": true}'
```

## Response

A successful request will return a JSON object with the resource's `id` and `locked` status.

### Sample response

```json
{
  "id": 9,
  "locked": true
}
```
