Content Management API > Record
Unpublish items in bulk
Body parameters
items Required
Records to unpublish (a maximum of 200 records are allowed per request)
Type:
Array<ResourceLinkage<"item">>
Examples
import { buildClient } from "@datocms/cma-client-node";
async function run() { const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const item = await client.items.bulkUnpublish({ items: [{ type: "item", id: "hWl-mnkWRYmMCSTq4z_piQ" }], });
// Check the 'Returned output' tab for the result ☝️ console.log(item);}
run();
[]