Folder

Creates or updates the folder specified by the `folderPath`. If the folder's ancestors do not exist, they will be created automatically (with empty FolderSettings). Note: you don't need to create folders before uploading files to them. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.

Changed on

Creates or updates the folder specified by the folderPath.

If the folder's ancestors do not exist, they will be created automatically (with empty FolderSettings).

Note: you don't need to create folders before uploading files to them.

Requires a secret_* API key. Alternatively, you can use a public_* API key and JWT-based auth.

put/v2/accounts/{accountId}/folders

Request

Path parameters

accountIdstring required

Your account ID.

This is visible on the settings page:

https://www.bytescale.com/dashboard/settings

Example:A623uY2

Request body

allowUnnamedFolderboolean

You must specify true if the folderPath ends with a /.

This prevents the accidental creation of folders that produce file paths with double forward-slashes in them.

Default: false

folderPathstring required

Absolute path to a folder. Begins with a /. Should not end with a /.

Example request

{
  "folderPath": "/uploads"
}

Response

Success.

folderPathstring required

Absolute path to a folder. Begins with a /. Should not end with a /.

type'Folder' required

Indicates this item is a folder (as opposed to a file).

virtualboolean required

If true then the folder was created using the PutFolder operation.

If false then the folder was created automatically as the result of a file upload operation, and will disappear if/when the folder later becomes empty.

Example response

{
  "folderPath": "/uploads",
  "settings": {},
  "settingsInherited": {
    "publicPermissions": {
      "folderPath": "/",
      "value": [
        {
          "scope": "Children",
          "permissions": {
            "file": {
              "downloadFile": [
                "*"
              ]
            }
          }
        }
      ]
    },
    "storageLayer": {
      "folderPath": "/",
      "value": {
        "type": "InternalStorageV2"
      }
    }
  },
  "type": "Folder",
  "virtual": true
}

Changes

    • breaking

      the response property / became optional for the status

    • breaking

      the response property / became optional for the status

    • info

      the request property / became optional

    • info

      the request property / became optional

    • info

      the request property / became optional

    • info

      removed from the / response property allOf list for the response status

    • info

      removed from the / response property allOf list for the response status