Delete Folder
curl --request POST \
--url https://api.memories.ai/serve/api/v1/folders/delete \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data folder_id=671631448308117500import requests
url = "https://api.memories.ai/serve/api/v1/folders/delete"
payload = { "folder_id": "671631448308117500" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<api-key>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({folder_id: '671631448308117500'})
};
fetch('https://api.memories.ai/serve/api/v1/folders/delete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.memories.ai/serve/api/v1/folders/delete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "folder_id=671631448308117500",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.memories.ai/serve/api/v1/folders/delete"
payload := strings.NewReader("folder_id=671631448308117500")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.memories.ai/serve/api/v1/folders/delete")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("folder_id=671631448308117500")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.memories.ai/serve/api/v1/folders/delete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "folder_id=671631448308117500"
response = http.request(request)
puts response.read_body{
"code": "0000",
"msg": "success",
"data": {},
"success": true,
"failed": false
}Folder Management
Delete Folder
Delete a folder from your Private Video Library.
POST
/
serve
/
api
/
v1
/
folders
/
delete
Delete Folder
curl --request POST \
--url https://api.memories.ai/serve/api/v1/folders/delete \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data folder_id=671631448308117500import requests
url = "https://api.memories.ai/serve/api/v1/folders/delete"
payload = { "folder_id": "671631448308117500" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<api-key>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({folder_id: '671631448308117500'})
};
fetch('https://api.memories.ai/serve/api/v1/folders/delete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.memories.ai/serve/api/v1/folders/delete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "folder_id=671631448308117500",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.memories.ai/serve/api/v1/folders/delete"
payload := strings.NewReader("folder_id=671631448308117500")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.memories.ai/serve/api/v1/folders/delete")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("folder_id=671631448308117500")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.memories.ai/serve/api/v1/folders/delete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "folder_id=671631448308117500"
response = http.request(request)
puts response.read_body{
"code": "0000",
"msg": "success",
"data": {},
"success": true,
"failed": false
}Product: Visual Search
Use case: Organize your indexed videos into folders and scope uploads/searches to a folder
Host:
https://api.memories.ai/serve/api/v1
Auth: Authorization: sk-mavi-... (no Bearer prefix)-1) and legacy API folder (-2) cannot be deleted.
Prerequisites
- You have created a memories.ai API key.
- You have a folder id from List Folders.
Request Example
Uses
application/x-www-form-urlencoded — send folder_id as a form field.import requests
headers = {"Authorization": "sk-mavi-..."}
response = requests.post(
"https://api.memories.ai/serve/api/v1/folders/delete",
headers=headers,
data={"folder_id": 671631448308117504},
)
print(response.json())
cURL
curl -X POST "https://api.memories.ai/serve/api/v1/folders/delete" \
-H "Authorization: sk-mavi-..." \
-d "folder_id=671631448308117504"
Parameters
integer
required
Id of the folder to delete. Must be > 0 and belong to your account. The Default folder (
-1) and legacy API folder (-2) cannot be deleted.Response Example
{
"code": "0000",
"msg": "success",
"data": null
}
Response Fields
string
Business status code.
0000 indicates success.string
Human-readable status message.
Notes & Limits
- If the folder contains a video with status
PARSE, deletion is rejected withData in the current folder cannot be deleted. Move parsed videos out with Move Videos first. - A folder that does not belong to your account returns
Folder does not exist or does not belong to the current user. - Passing
folder_id<= 0returns an error — the default/virtual folders are not deletable.
Authorizations
Body
application/x-www-form-urlencoded
Folder id to delete. Must be > 0 and belong to your account. Fails if it contains parsed videos.
Example:
671631448308117500
