Back to blog
Blog

Batch Operations: Create, Update, and Delete at Scale

Cosmic's avatar

Cosmic

April 6, 2026

Batch Operations: Create, Update, and Delete at Scale - cover image

Batch Operations: Create, Update, and Delete at Scale

If you've ever needed to migrate content, seed a new environment, or let an AI agent manage dozens of objects at once, you know how painful it is to make one API call per object. Batch operations fix that.

You can now perform object batch operations: create, update, and delete operations in a single API call. Each operation succeeds or fails independently, so a bad record doesn't block the rest.

  • New endpoint: accepts mixed , , and operations in one request
  • SDK: gives you a clean, typed interface
  • CLI: for scripted or terminal-driven workflows
  • AI Agents: Team Agents now automatically use batch when handling 3 or more objects at once


Conditional Fields: Cleaner Forms for Content Editors

Content models can get messy fast. A product that doesn't require "Shipping" shouldn't show the additional shipping fields.

You can now set conditional fields on Object type metafields. Conditional fields let you show or hide metafields based on the value of another field, so editors only see what's relevant to them.

  • Declarative rules: Use , , , and operators directly on any metafield definition
  • Smart validation: Hidden fields are automatically skipped during validation, so required fields won't block a save when they're not visible
  • Fully backward compatible: The API stores and returns all values regardless of visibility. Nothing breaks.
  • AI Agent support: Agents can set rules when creating or updating object types


Metafield Updates: Unique Constraint, Cleaner Select, and Multi Select

Unique Constraint: Data Integrity Built In

Have you ever had duplicate slugs, emails, or SKUs sneak into your content? The new metafield property enforces value uniqueness across all objects of the same type at the API level. No custom validation logic required.

CleanShot-2026-04-06-at-11-06-382x.png

  • Duplicate values return a error with a clear message
  • Works on , , , , and fields at the top level
  • Locale-aware: translations can share values with the original without triggering conflicts
  • A new "Unique" toggle appears in the metafield validation UI for eligible types

Select Metafield: Now Returns Plain Strings

The type used to return objects in your metadata. That meant extra parsing every time you wanted to use the value in your app. It now returns a plain string.

  • instead of
  • is deprecated. Use for all new single-select fields.
  • Migration script available on request if you need to convert existing fields

Multi Select: Choose More Than One

Sometimes one option isn't enough. The new metafield type lets editors pick multiple values from a predefined list, returned as a string array.

  • in your metadata response
  • Optional and constraints on selection count
  • Same options format as , easy to adopt


Read the docs for all of the above updates: Objects API, Metafields API, AI Team Agents, and CLI.

Ready to get started?

Build your next project with Cosmic and start creating content faster.

No credit card required • 75,000+ developers