Skip to content

Lock files via the Google Drive API to prevent content edits

What’s changing 

You can now add and remove content restrictions via the Drive API. By using the new ContentRestriction API, any file type in Drive can be “locked,” preventing changes to the item’s content, title, and comments. 

Content restrictions can be added or removed via the API and removed via Google Drive on the web by any user who has at least editor access level for the item. 

Who’s impacted 

Admins, end users, and developers 

Why you’d use it 

While Google Drive’s collaborative editing and commenting features are often helpful and beneficial, sometimes it’s important to know that changes are not being made to a document. Locking a file with the ContentRestriction API can help accomplish this, and could be used to: 

  • Lock authoritative versions of documents to create “official” or “final” documents for record keeping. 
  • Prevent changes to documents that are involved in a workflow, automation, or business process. 
  • Freezing activity on a document for a period of reviews or audits. 

Getting started 

Rollout pace 

  • This feature is available now for all users. 


  • Available to all customers 




Net Universe offers all Google devices with worldwide Delivery Services.
Send us an email to [email protected] for more information or visit
You can visit our Shop Online


On Trend