Show examples in:
Delete a model

Query parameters

skip_menu_items_deletion  Optional  boolean  Example: true

Skip the deletion of the menu items linked to the model

Returns

Returns a item_type resource object.

Examples

Example Basic example
import { buildClient } from '@datocms/cma-client-node';
async function run() {
const client = buildClient({ apiToken: '<YOUR_API_TOKEN>' });
const modelIdOrApiKey = 'blog_post';
const itemType = await client.itemTypes.destroy(modelIdOrApiKey);
console.log(itemType);
}
run();