Sorry, no results found for "".

General concepts > Draft/published system

Draft/published system

You can decide to activate the draft/published system on a per-model basis:

If you do so:

  • When you create a new record, it will be put into a Draft status. This means that the record is still not published: you can continue making changes and saving the record without having to worry about showing unfinished content to your end users.

  • Once you're satisfied with the changes, you can click on the Publish button: the latest revision of your record will be marked as the Published version, and it will be instantly available in the DatoCMS APIs:

  • If you make a change to a published record, its status will be become Updated. Again, those changes won't be visible to end users and published until you explicitly click on the Publish button again.

For more information on how the system manages the draft/published status, you can refer to this in-depth guide: Data consistency: key concepts and implications.

Saving Invalid Drafts

In some instances you may need to create posts via the UI or the API that may not have all validations in place (for instance, bulk creating records missing a specific required field like a title).

In these cases, if you have the Draft/Published flow enabled, you can also choose to allow saving records on a draft stage without passing all validations.

The feature affects the CMS and, of course, the CMA (Content Management API). When draft saving is active, it's possible to POST/PUT invalid records to CMA and have them saved: the endpoints respond with a 200, and the record just saved as a payload.

However, validations will take effect when the record is published. If the record is not valid, publication fails, and editors need to fix the content to ensure all rules are handled before proceeding to move the record into the Published stage.

Finer grain control on linked records

In case of linked records you can decide which behaviour to have when a record gets published. For example, you can determine if all the linked records should be published as well or if you want to emit a validation error. The same goes for unpublishing and deleting.

In the field validation you can pick the option that you prefer:

To know more about how DatoCMS saves versions, check out this video tutorial: