Sorry, no results found for "".

Show examples in:
Javascript HTTP
Endpoint info
Available examples

Content Management API > Upload

Add tags to assets in bulk

Body parameters

tags Required

The tags to add to the assets

Type: Array<string>
Example: ["cats"]
uploads Required

Assets to tag

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.bulkTag({
tags: ["cats"],
uploads: [{ type: "upload", id: "q0VNpiNQSkG6z0lif_O1zg" }],
});
// Check the 'Returned output' tab for the result ☝️
console.log(upload);
}
run();
[]