curl -X POST "https://app.drime.cloud/api/v1/folders?workspaceId=0" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "My New Folder",
"parentId": null
}'
const response = await fetch(
'https://app.drime.cloud/api/v1/folders?workspaceId=0',
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'My New Folder',
parentId: null // null = root, or specify folder ID
})
}
);
const { folder } = await response.json();
console.log(`Created folder: ${folder.name} (ID: ${folder.id})`);
import requests
response = requests.post(
'https://app.drime.cloud/api/v1/folders',
params={'workspaceId': 0},
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'},
json={
'name': 'My New Folder',
'parentId': None # None = root
}
)
folder = response.json()['folder']
print(f"Created folder: {folder['name']} (ID: {folder['id']})")
{
"status": "success",
"folder": {
"id": 485529680,
"name": "My New Folder",
"type": "folder",
"hash": "NDg1NTI5NjgwfA",
"file_size": 0,
"parent_id": null,
"workspace_id": 0,
"path": "485529680",
"created_at": "2024-01-20T10:00:00.000000Z",
"updated_at": "2024-01-20T10:00:00.000000Z"
}
}
{
"status": "error",
"message": "The given data was invalid.",
"errors": {
"name": "The name field is required."
}
}
Files & Folders
Create Folder
Create a new folder
POST
/
folders
curl -X POST "https://app.drime.cloud/api/v1/folders?workspaceId=0" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "My New Folder",
"parentId": null
}'
const response = await fetch(
'https://app.drime.cloud/api/v1/folders?workspaceId=0',
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'My New Folder',
parentId: null // null = root, or specify folder ID
})
}
);
const { folder } = await response.json();
console.log(`Created folder: ${folder.name} (ID: ${folder.id})`);
import requests
response = requests.post(
'https://app.drime.cloud/api/v1/folders',
params={'workspaceId': 0},
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'},
json={
'name': 'My New Folder',
'parentId': None # None = root
}
)
folder = response.json()['folder']
print(f"Created folder: {folder['name']} (ID: {folder['id']})")
{
"status": "success",
"folder": {
"id": 485529680,
"name": "My New Folder",
"type": "folder",
"hash": "NDg1NTI5NjgwfA",
"file_size": 0,
"parent_id": null,
"workspace_id": 0,
"path": "485529680",
"created_at": "2024-01-20T10:00:00.000000Z",
"updated_at": "2024-01-20T10:00:00.000000Z"
}
}
{
"status": "error",
"message": "The given data was invalid.",
"errors": {
"name": "The name field is required."
}
}
Overview
Creates a new folder in the specified location.Query Parameters
integer
Workspace ID. Use
0 for personal workspace.Request Body
string
required
Name for the new folder
integer
Parent folder ID. Use
null to create in root.Response
object
The newly created folder object
string
Request status (
success)curl -X POST "https://app.drime.cloud/api/v1/folders?workspaceId=0" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "My New Folder",
"parentId": null
}'
const response = await fetch(
'https://app.drime.cloud/api/v1/folders?workspaceId=0',
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'My New Folder',
parentId: null // null = root, or specify folder ID
})
}
);
const { folder } = await response.json();
console.log(`Created folder: ${folder.name} (ID: ${folder.id})`);
import requests
response = requests.post(
'https://app.drime.cloud/api/v1/folders',
params={'workspaceId': 0},
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'},
json={
'name': 'My New Folder',
'parentId': None # None = root
}
)
folder = response.json()['folder']
print(f"Created folder: {folder['name']} (ID: {folder['id']})")
{
"status": "success",
"folder": {
"id": 485529680,
"name": "My New Folder",
"type": "folder",
"hash": "NDg1NTI5NjgwfA",
"file_size": 0,
"parent_id": null,
"workspace_id": 0,
"path": "485529680",
"created_at": "2024-01-20T10:00:00.000000Z",
"updated_at": "2024-01-20T10:00:00.000000Z"
}
}
{
"status": "error",
"message": "The given data was invalid.",
"errors": {
"name": "The name field is required."
}
}
⌘I

