Show examples in:
JavascriptHTTP
Endpoint info
Available examples
Content Management API > Record

Publish items in bulk

Body parameters

itemsRequired

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

Type:Array&#x3C;<a href="/docs/content-management-api/resources/item">ResourceLinkage&#x3C;"item"></a>>

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.bulkPublish({
items: [{ type: "item", id: "hWl-mnkWRYmMCSTq4z_piQ" }],
});
// Check the 'Returned output' tab for the result ☝️
console.log(item);
}
run();
[]