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

Adding Webhooks in 4 Steps


At Cosmic JS, we get questions every day about adding Webhooks to an application for better team & product management. Cosmic JS is an API-first cloud-based content management platform that allows you to easily integrate a CMS to your deployed or emerging application for content updates. Cosmic JS works by decoupling content from code, allowing you to build applications in your desired language since Cosmic JS can be integrated with any application, regardless of its programming language.

Cosmic JS makes it easy to add Webhooks that trigger a POST request to the endpoint of your choice when there is activity on your bucket. 


Let's insert Webhooks into your web application:


1. Go to your Bucket Dashboard



2. Go to the Webhooks tab



3. Add the Webhooks bucket upgrade - refer to Cosmic JS Pricing for bucket breakdowns




4. Use the Webhooks table to select an event and trigger a POST request to the API endpoint



Now this will post to the endpoint of your choice whenever the event signified occurs. This is great for static websites & great for the build process whenever content is changed. You can send a message on Slack to your team whenever you’ve added a new piece of content for draft review. Cosmic JS builds collaboration between developers & content editors in everything we do, because we work content-first.


Watch the Webhooks Tutorial: 

 


Read More:

  1. New: Track Your API Requests
  2. Build a Blog in 4 Steps
  3. The Cosmic Stack
  4. Three Ways to use The Cosmic Stack
  5. How to Create an Intuitive Website Navigation Menu


You may also like


Cosmic JS is great for hosting content for an entire website or application, but can also be used to add quick, dynamic content elements to any existing website.  In this short tutorial, I'll show you how you can add a news feed widget to your website in a few short steps.  Let's get to it:

1. Sign in to your Cosmic JS account.

2. After signing in, select "Add object type" in the left side nav of your bucket's dashboard and create a "News" object type.  Call the object type "News" (plural) and "Article" (singular).  Then add your articles (you can add content or metafields later, they're not required for this example).


3. In your HTML file add a div that will receive the news feed then add the Cosmic JS browser client to get your bucket's content.  You can download the Cosmic JS Browser Client on GitHub.  Next, in only a few lines of code, you can get the articles from your bucket.  Here is a quick JS Fiddle of everything you will need:

You can see how powerful this is.  A developer can add these dynamic areas to any portion of an existing site and enjoy the benefits of a CMS API.  Any non-dev team member can be invited to edit this content in the Cosmic JS admin dashboard quickly and easily with no database or server-side installation necessary!


In this installment of the Cosmic JS Developer Spotlight Series, we sat down with Owen Liversidge, a Web Developer residing in Atlanta, Georgia who's currently helping lead the development charge at renowned game development company Tripwire Interactive. Owen just built Tripwire's new corporate website on a React and Cosmic stack. Follow Owen on LinkedIn or GitHub, and enjoy the Q/A.

We have new Starter Apps available to help you get started building Cosmic-powered apps faster and easier.

Developers need time to build.  And content editors need time to test-drive a project as it's being built.  For these reasons, we're rolling out our new Builder Bucket Referral Program.

In this installment of the Cosmic JS Developer Spotlight Series, we sat down with Emma Wedekind, a developer and New York native now residing in Karlsruhe, Germany. Emma is a Software Engineer at LogMeIn and the Founder of CodingCoach.io. Follow Emma on Twitter, LinkedIn or Medium, and enjoy the Q/A.

We sat down with Jason Price for our latest installment of the Cosmic JS Developer Spotlight Series.