Folders
Create folder
Create a new folder in a workspace.
POST
/
folders
cURL
curl -X POST https://app.mavera.io/api/v1/folders \
-H "Authorization: Bearer mvra_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Marketing Assets",
"workspace_id": "ws_abc123"
}'import requests
api_key = "mvra_live_your_key_here"
headers = {"Authorization": f"Bearer {api_key}"}
folder = requests.post(
"https://app.mavera.io/api/v1/folders",
headers=headers,
json={
"name": "Marketing Assets",
"workspace_id": "ws_abc123"
}
).json()
print(f"Folder created: {folder['id']}")const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', workspace_id: '<string>'})
};
fetch('https://app.mavera.io/api/v1/folders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.mavera.io/api/v1/folders"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"workspace_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "<string>",
"object": "folder",
"name": "<string>",
"workspace_id": "<string>",
"file_count": 123,
"is_shared": true,
"is_favorite": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}Authorizations
API key prefixed with mvra_live_. Create keys at Settings > Developer > API Keys.
Body
application/json
Response
Folder created successfully
A folder for organizing files
Unique folder identifier
Available options:
folder Folder name
Workspace ID
Number of files in the folder
Whether the folder is shared with all workspace members
Whether the folder is in your favorites
⌘I
cURL
curl -X POST https://app.mavera.io/api/v1/folders \
-H "Authorization: Bearer mvra_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Marketing Assets",
"workspace_id": "ws_abc123"
}'import requests
api_key = "mvra_live_your_key_here"
headers = {"Authorization": f"Bearer {api_key}"}
folder = requests.post(
"https://app.mavera.io/api/v1/folders",
headers=headers,
json={
"name": "Marketing Assets",
"workspace_id": "ws_abc123"
}
).json()
print(f"Folder created: {folder['id']}")const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', workspace_id: '<string>'})
};
fetch('https://app.mavera.io/api/v1/folders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.mavera.io/api/v1/folders"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"workspace_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "<string>",
"object": "folder",
"name": "<string>",
"workspace_id": "<string>",
"file_count": 123,
"is_shared": true,
"is_favorite": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}