Folder Locks

Create folder lock

Changed on

Creates a folder lock on a folder, preventing it from being moved and/or deleted.

You must be authenticated as the owner or co-owner of the folder to use this endpoint.

post/folder_locks

Request

  • Base URL
    https://api.box.com/2.0
  • URL
    https://api.box.com/2.0/folder_locks
  • Auth
    OAuth 2
    Authorization code: https://account.box.com/api/oauth2/authorize
    Token URL: https://api.box.com/oauth2/token

Request body

Example request

{
  "locked_operations": {
    "move": true,
    "delete": true
  },
  "folder": {
    "type": "folder",
    "id": "1234567890"
  }
}

Response

Returns the instance of the folder lock that was applied to the folder, including the user that applied the lock and the operations set.

idstring

The unique identifier for this folder lock.

typestring

The object type, always folder_lock.

created_atstring date-time

When the folder lock object was created.

lock_typestring

The lock type, always freeze.

Example response

{
  "folder": {
    "id": "12345",
    "etag": "1",
    "type": "folder",
    "sequence_id": "3",
    "name": "Contracts"
  },
  "id": "12345678",
  "type": "folder_lock",
  "created_by": {
    "id": "11446498",
    "type": "user"
  },
  "created_at": "2020-09-14T23:12:53Z",
  "locked_operations": {
    "move": true,
    "delete": true
  },
  "lock_type": "freeze"
}

Changes

    • warning

      added the new unprocessable_entity enum value to the response property for the response status

    • warning

      added the new unprocessable_entity enum value to the response property for the response status

    • warning

      added the new unprocessable_entity enum value to the response property for the response status