---
title: Content locking configuration
related:
  - https://docs.kentico.com/documentation/business-users/content-locking.md
  - https://docs.kentico.com/documentation/developers-and-admins/configuration/users/role-management.md
  - https://docs.kentico.com/documentation/developers-and-admins/configuration/workflows.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

[Content locking](https://docs.kentico.com/documentation/business-users/content-locking.md) protects editors' work by locking [pages](https://docs.kentico.com/documentation/business-users/website-content.md), [content items](https://docs.kentico.com/documentation/business-users/content-hub/content-items.md), [headless items](https://docs.kentico.com/documentation/business-users/headless-content.md), and [emails](https://docs.kentico.com/documentation/business-users/digital-marketing/emails.md) while they are being edited. When enabled, the system ensures only one user at a time can edit a given item and prevents others from making conflicting changes.

This page covers how to enable content locking, configure the related permissions, and describes how content locking affects the API. See [Content locking](https://docs.kentico.com/documentation/business-users/content-locking.md) for details about the locking mechanism and editors' experience.

## Enable content locking

Content locking is disabled by default. To enable it:

1. Open the **Settings** application.
2. Go to **Content** → **Content locking**.
3. Select the **Enable content locking** checkbox.
4. Select **Save**.

> **Note:** When you disable content locking after it has already been in use, all currently locked items are automatically unlocked.

![Enable content locking](https://docs.kentico.com/docsassets/documentation/content-locking-configuration/content-locking-setting.png "Enable content locking")

## Override content lock

When required, the administrator and designated users can [override the content lock](https://docs.kentico.com/documentation/business-users/content-locking.md). This prevents blocking work in situations when a user forgets to unlock their item and becomes unavailable.

By default, the administrator can unlock any locked item to let other users edit. Other users can be granted the _Override content lock_ [permission](https://docs.kentico.com/documentation/developers-and-admins/configuration/users/role-management.md) to release content locks in selected applications. The permission is granted per application and [workspace](https://docs.kentico.com/documentation/developers-and-admins/configuration/users/role-management/workspaces.md):

- **Website channel applications** – allows unlocking pages within the channel
- **Headless channel applications** – allows unlocking headless items within the channel
- **Email channel applications** – allows unlocking emails within the channel
- **Content hub** – allows unlocking content items within the workspace

See [Assign permissions to roles](https://docs.kentico.com/documentation/developers-and-admins/configuration/users/role-management.md#assign-permissions-to-roles) for instructions on assigning permissions.

## Content locking and API

When updating items via the API, **the system does not automatically check whether items are locked**. By default, items are modified via the API even when they are locked by editors. This can happen when you update [drafts of pages](https://docs.kentico.com/api/content-management/pages.md#update-page-drafts) or [content items](https://docs.kentico.com/api/content-management/content-items.md#update-content-item-drafts) that are locked by an editor.

If you need to avoid overwriting the editor's content, check whether the item is locked before modifying it. See the following API examples:

- [Verify whether a page is locked](https://docs.kentico.com/api/content-management/pages.md#verify-whether-a-page-is-locked)
- [Verify whether a content item is locked](https://docs.kentico.com/api/content-management/content-items.md#verify-whether-a-content-item-is-locked)

If an item is locked by an editor and you programmatically perform an [action that automatically releases the lock](https://docs.kentico.com/documentation/business-users/content-locking.md#automatic-release), the item is automatically unlocked. Actions that [automatically lock an item](https://docs.kentico.com/documentation/business-users/content-locking.md#when-content-is-locked) when performed in the admin UI do not automatically lock the item when done over the API.

### Lock and unlock items via API

To learn how to programmatically lock items and prevent other users from editing, see:

- [Lock and unlock pages](https://docs.kentico.com/api/content-management/pages.md#lock-and-unlock-pages)
- [Lock and unlock content items](https://docs.kentico.com/api/content-management/content-items.md#lock-and-unlock-content-items)

### Events

To track the changes in the lock status of an item, listen to respective _Update language metadata_ events and compare the changes in the `LockedBy` property. See [Content event classes](https://docs.kentico.com/documentation/developers-and-admins/customization/handle-global-events/handle-content-events.md#content-event-classes) for the list of available events.

## Remarks

- When a user's account is [disabled](https://docs.kentico.com/documentation/developers-and-admins/configuration/users/user-management.md#manage-users), the system automatically unlocks all items locked by the user.
