Show examples in:
    Unpublish items in bulk

    Body Parameters

    items  Required  Array of { type: "item", id: item.id }

    Records to unpublish (a maximum of 200 records are allowed per request)

    Examples

    Example Basic example
    import { buildClient } from '@datocms/cma-client-node';
    async function run() {
    const client = buildClient({ apiToken: '<YOUR_API_TOKEN>' });
    const result = await client.items.bulkUnpublish({
    items: [
    {
    type: 'item',
    id: 'hWl-mnkWRYmMCSTq4z_piQ'
    }
    ]
    });
    console.log(result);
    }
    run();