Show examples in:
    Add tags to assets in bulk

    Parameters

    tags  Array<string>  Required

    The tags to add to the assets

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

    Assets to tag

    Examples

    Example code:
    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: '666'
    }
    ]
    });
    console.log(result);
    }
    run();
    Returned output:
    []