API Clients CLI Content Management API
Updated JS Client for end-to-end type safety
October 10th, 2025
The DatoCMS JavaScript client is now fully type-safe. Records (the missing piece that wasn't) are also generated directly from your project’s schema.
This gives you real autocomplete and compile-time safety across your project.
The CLI bridges your schema and repo perfectly. Run a single command to generate types, and if your schema changes, rerun it to keep your code perfectly in sync.
$ npx datocms schema:generate schema.ts
The client also ships with new utilities to simplify record management, like duplicateBlockRecord()
, inspectItem()
, and mapBlocksInNonLocalizedFieldValue()
to handle nested blocks, relations, and localized fields automatically.
Quick Links: