Skip to content

Add Object

Use the Cosmic API to add Objects to your Bucket. For more information on adding Objects, go to the add Object section in the docs.

Setup

Step 1. Log in to your Cosmic dashboard and go to Bucket Settings > API Accesss to get your Bucket slug, read_key, and write_key.

Step 2. Create an Object Type for "Products" with the following metafields: Price (Number) and Additional Info (Textarea).

Add Object using React

View full screen / fork on StackBlitz

Next steps

💡

Learn More
Go to the Objects section in the docs to learn more about the Objects model and available methods.