Show examples in:
    Add tags to assets in bulk

    Body Parameters

    tags  Required  Array<string>  Example: ["cats"]

    The tags to add to the assets

    uploads  Required  Array of { type: "upload", id: upload.id }

    Assets to tag

    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.uploads.bulkTag({
    tags: [
    'cats'
    ],
    uploads: [
    {
    type: 'upload',
    id: 'q0VNpiNQSkG6z0lif_O1zg'
    }
    ]
    });
    console.log(result);
    }
    run();