Idempotent/atomic CMS item creates

Is there some flag or some way to make CMS item create idempotent or fail if the slug exists already?

What happens right now is if you repeat an item create with the same slug, the duplicate item gets some random string appended to the slug you put. So, for example, if there’s any network issues when you post and you retry, you’ll get duplicate items. Or if you have multiple processes handling data and 2 publish the same item, again, duplicate items.

Reading the current list of items requires pagination to get all the current items, but there’s no way to lock the collection so there’s no guarantee that the items haven’t been modified since your request.

I thought maybe I could try doing an upsert (PATCH update with some random id I created), but that 404 which makes sense.

It would be nice to either allow for upserts of IDs/slugs or allow failures for existing slugs.