Skip to main content
POST
/
api
/
v1
/
materials
/
bulk
/
move
Bulk move materials to a different folder
const url = 'https://studyfetchapi.com/api/v1/materials/bulk/move';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
  body: '{"materialIds":["<string>"],"folderId":"<string>"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
{
  "success": true,
  "movedCount": 123
}

Authorizations

x-api-key
string
header
required

API Key for authentication

Body

application/json
materialIds
string[]
required

Array of material IDs to move

folderId
string | null
required

Target folder ID (null for root)

Response

Materials moved successfully

success
boolean
required

Operation success status

movedCount
number
required

Number of materials moved

I