Cosmic JS Blog Stay tuned for community news, company announcements and updates from the Cosmic JS team.

API Updates: Authentication, Add Buckets and More

Cosmic JS is on a mission to help you build apps faster.  With this goal in mind, we're happy to announce some additions to our API that will help you manage your application content faster and easier, right from the Cosmic JS API.

We’ve added new endpoints to the API which include:
1. User Authentication
2. Add Buckets to your account
3. Add / Edit / Delete Object Types in your Bucket
4. Add Media to a folder in your Bucket
Check out the Docs page for all of the new additions to the API.

Have you ever wanted to access your account from the API and create new Buckets from the comfort of your own application?  Well now you can thanks to the new POST /authenticate endpoint.  Simply add your Cosmic JS email and password, get your token, then begin performing account-specific tasks from the API.  Currently this only includes Bucket creation, but we plan to open up more features for account management soon.

POST /authenticate

  "email": "",
  "password": "CatsAreAwesome"

Read more about Authentication

Add Buckets
Use the new POST /buckets endpoint to add your new Bucket to your account.  The only required fields are title and a Header with Authorization: Bearer <token>.
Read more about adding Buckets

Add / Edit / Delete Object Types
Add Object Types with POST /:your-bucket-slug/add-object-type
Edit Object Types with PUT /:your-bucket-slug/edit-object-type
Delete Object Types with DELETE /:your-bucket-slug/:object-type-slug
Read more about Object Types

Add Media to Folders
You can now add Media to your Bucket and specify which folder to place it in.

POST /:your-bucket-slug/media

  "media": FILE_DATA,
  "folder": "your-folder-slug"

Read more about adding Media

I hope you find these new additions to the API useful for building your applications.  Browse the API docs to see more detail on how to use the new additions to the API.  If you have any questions reach out to us on Twitter and join our Slack community.

Icon provided by Iconfinder.

You may also like

A new Developer Hero joins us in our latest installment of the Cosmic JS Developer Spotlight Series. We sat down with Brian Mullis, a developer in Portland who  lead the charge on innovative app development for his interactive agency.

In the frenzy surrounding new tech, simplicity gets forgotten. Services like Cosmic JS challenge this. So in the spirit of doing the opposite, we're going to build a sleek real estate listing app (with a social flavor) that's as easy to use as a Wordpress blog.

We're excited to announce that the Cosmic JS Community has exceeded 3 Million API Requests. 

We're on a mission to help teams of all sizes collaborate to build apps faster and easier.  In some cases incorporating a new solution into a workflow for larger team involves challenges for user onboarding and management.

In this tutorial, we are going to be creating a simple inventory management application with Laravel and Vue.js as our frontend.

Today we are announcing a new role, Contributor, which gives you the power to collaborate on content in an entirely new way.