Create a new folder
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
parentFolderId: '<string>',
description: '<string>',
metadata: {}
})
};
fetch('https://studyfetchapi.com/api/v1/folders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://studyfetchapi.com/api/v1/folders \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"parentFolderId": "<string>",
"description": "<string>",
"metadata": {}
}
'import requests
url = "https://studyfetchapi.com/api/v1/folders"
payload = {
"name": "<string>",
"parentFolderId": "<string>",
"description": "<string>",
"metadata": {}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"_id": "<string>",
"name": "<string>",
"organizationId": "<string>",
"status": "active",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"parentFolderId": "<string>",
"description": "<string>",
"metadata": {
"color": "<string>",
"icon": "<string>",
"materialCount": 123,
"totalSize": 123,
"lastActivity": "2023-11-07T05:31:56Z"
}
}Folders
Create a new folder
POST
/
api
/
v1
/
folders
Create a new folder
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
parentFolderId: '<string>',
description: '<string>',
metadata: {}
})
};
fetch('https://studyfetchapi.com/api/v1/folders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://studyfetchapi.com/api/v1/folders \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"parentFolderId": "<string>",
"description": "<string>",
"metadata": {}
}
'import requests
url = "https://studyfetchapi.com/api/v1/folders"
payload = {
"name": "<string>",
"parentFolderId": "<string>",
"description": "<string>",
"metadata": {}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"_id": "<string>",
"name": "<string>",
"organizationId": "<string>",
"status": "active",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"parentFolderId": "<string>",
"description": "<string>",
"metadata": {
"color": "<string>",
"icon": "<string>",
"materialCount": 123,
"totalSize": 123,
"lastActivity": "2023-11-07T05:31:56Z"
}
}Authorizations
API Key for server-to-server authentication. Resolves to the owning organization.
Body
application/json
Response
201 - application/json
Folder created successfully
Folder ID
Folder name
Organization ID
Folder status
Available options:
active, deleted Creation date
Last update date
Parent folder ID
Folder description
Folder metadata
Show child attributes
Show child attributes
Was this page helpful?