Sorry, no results found for "".

Show examples in:
Javascript HTTP
Endpoint info
Available examples

Content Management API > Upload

Put assets into a collection in bulk

Body parameters

uploads Required

Assets to assign to the collection

upload_collection Required

Asset collection to put uploads into

Examples

import { buildClient } from "@datocms/cma-client-node";
async function run() {
const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const upload = await client.uploads.bulkSetUploadCollection({
uploads: [{ type: "upload", id: "q0VNpiNQSkG6z0lif_O1zg" }],
upload_collection: null,
});
// Check the 'Returned output' tab for the result ☝️
console.log(upload);
}
run();
[]