Product Changelog
DatoCMS new features, improvements and significant news
Deprecation notice on our Content Management API

Starting from February 1st, 2020, it will no longer possible to directly create, update or delete modular block items using the following endpoints:

  • POST /items
  • PUT /items/:id
  • DELETE /items/:id

The only supported way to perform any operation on modular block items will be by updating a modular content field on the parent item.

For example, to create an item with two modular blocks inside its modular content field:

import { SiteClient, buildModularBlock } from 'datocms-client';

const client = new SiteClient('YOUR_TOKEN');

client.items.create({
  itemType: '111',
  content: [
    buildModularBlock(text: "Foo", itemType: '222'),
    buildModularBlock(text: "Bar", itemType: '222'),
  ]
})

This change is required to ensure atomic, reliable operations on content.