Data Types

PutFolder

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
cURL
1curl "https://api.bytescale.com/v2/accounts/{accountId}/folders" \
2 -X PUT \
3 -H "Authorization: Bearer YOUR_API_KEY" \
4 -H "Content-Type: application/json" \
5 -d @- << EOF
6 {
7 "folderPath": "/uploads"
8 }
9EOF
Response (200)
1{
2 "folderPath": "/uploads",
3 "settings": {},
4 "settingsInherited": {
5 "publicPermissions": {
6 "folderPath": "/",
7 "value": [
8 {
9 "scope": "Children",
10 "permissions": {
11 "file": {
12 "downloadFile": [
13 "*"
14 ]
15 }
16 }
17 }
18 ]
19 },
20 "storageLayer": {
21 "folderPath": "/",
22 "value": {
23 "type": "InternalStorageV2"
24 }
25 }
26 },
27 "type": "Folder",
28 "virtual": true
29}

Your account ID.

This is visible on the settings page:

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

Example: "A623uY2"

Type: String

Length: 7

Add one of these Authorization header values to your request:

Option 1: prefix "Bearer " to your API key. The result is your Authorization header value.

Option 2: use HTTP basic authorization with apikey as your username and your API key as your password.

For advanced options, please see:

https://www.bytescale.com/docs/auth

Note: this endpoint requires a secret_* API key.

Type: String

This endpoints requires a JSON request body.

Type: String

Value: "application/json"

Was this section helpful? Yes No

You are using an outdated browser.

This website requires a modern web browser -- the latest versions of these browsers are supported: