Move Folder Items
curl --request POST \
--url https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/folders/{id}/items \
--header 'Content-Type: application/json' \
--data '
{
"items": [
"<string>"
]
}
'import requests
url = "https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/folders/{id}/items"
payload = { "items": ["<string>"] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({items: ['<string>']})
};
fetch('https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/folders/{id}/items', 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.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/folders/{id}/items",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'items' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/folders/{id}/items"
payload := strings.NewReader("{\n \"items\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}HttpResponse<String> response = Unirest.post("https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/folders/{id}/items")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/folders/{id}/items")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_bodyFolders
Move Folder Items
Move saved searches to a folder
POST
/
app
/
v1
/
organizations
/
{organizationId}
/
projects
/
{projectId}
/
folders
/
{id}
/
items
Move Folder Items
curl --request POST \
--url https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/folders/{id}/items \
--header 'Content-Type: application/json' \
--data '
{
"items": [
"<string>"
]
}
'import requests
url = "https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/folders/{id}/items"
payload = { "items": ["<string>"] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({items: ['<string>']})
};
fetch('https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/folders/{id}/items', 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.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/folders/{id}/items",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'items' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/folders/{id}/items"
payload := strings.NewReader("{\n \"items\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}HttpResponse<String> response = Unirest.post("https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/folders/{id}/items")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/folders/{id}/items")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_bodyMoves multiple saved searches to a target folder. The saved searches being moved must have a type that matches the target folder’s type.
Path Parameters
Organization ID
Project ID
Target folder ID
Request Body
Array of saved search IDs to move
Example Request
{
"items": ["ss123", "ss456"]
}
Response
Returns arrays of successfully moved and failed items.{
"moved": [
{ "id": "ss123", "type": "content" },
{ "id": "ss456", "type": "content" }
],
"failed": []
}
Partial Success Response
{
"moved": [
{ "id": "ss123", "type": "content" }
],
"failed": [
{
"id": "ss456",
"type": "asset",
"error": "Cannot move asset saved search to a content folder"
}
]
}
Error Responses
Folder Not Found
{
"error": {
"code": "NOT_FOUND",
"message": "Folder not found"
}
}
Type Mismatch
Type mismatches for individual items are returned in thefailed array of the response, not as request-level errors. A request-level error only occurs when the target folder is not found.
Code Examples
curl -X POST "https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/folders/folder123/items" \
-H "Authorization: Bearer YOUR_JWT" \
-H "Content-Type: application/json" \
-d '{
"items": ["ss123", "ss456"]
}'
const response = await fetch(
'https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/folders/folder123/items',
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_JWT',
'Content-Type': 'application/json'
},
body: JSON.stringify({
items: ['ss123', 'ss456']
})
}
);
const result = await response.json();
console.log(`Moved ${result.moved.length} items, ${result.failed.length} failed`);
⌘I