--- title: "Object Lock With the Wasabi S3 API" slug: "object-lock-with-the-wasabi-s3-api" updated: 2026-02-03T15:15:26Z published: 2026-02-03T15:15:26Z canonical: "docs.wasabi.com/object-lock-with-the-wasabi-s3-api" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.wasabi.com/llms.txt > Use this file to discover all available pages before exploring further. # Object Lock With the Wasabi S3 API You can add or update the object lock settings for an object using the tags described below. | Tag | Description | | --- | --- | | Mode | This tag should be either COMPLIANCE or GOVERNANCE, which are not case-sensitive. | | RetainUntilDate | This defines the retention time for an object. The object cannot be deleted before this time. Note that the retention time must be in the future. | | LegalHold | This should be either ON or OFF, which is not case-sensitive. | The following is an example of setting the object locking configuration on an object: ```actionscript PUT https://s3.wasabisys.com/qa.objectlock.002/beta_vpn.png?retention&versionId= 001617181245457483475-4ylsTbqqvP                compliance        2021-04-06T09:00:45Z ``` The following is an example of setting legal hold for an object: ```actionscript PUT https://s3.wasabisys.com/qa.objectlock.002/beta_vpn.png?legal-hold&versionId=001617181245457483475-4ylsTbqqvP                ON ``` The following is an example of setting governance mode for an object: ```actionscript PUT https://s3.wasabisys.com/qa.objectlock.002/public/ACL.PNG?retention                governance        2021-05-20T09:00:45Z ``` > The “x-amz-bypass-governance-retention =true” header must be included whenever you want to override governance settings for an object.