The HubSpot API: Empowering Better HubSpot Integrations

10/01/2013 4 min read Written by Lynton

HubSpot API - Empowering HubSpot IntegrationsThe new HubSpot COS has provided a whole new set of tools to help build your website, but even with these new tools you may find yourself limited to what you can achieve with HubSpot. That is where the HubSpot API comes to the rescue. What's an API you ask? Read on inbound marketing legend...

HubSpot API - A Definition

API stands for Application Programming Interface, which is a fancy way of describing a public set of instructions for programmers to follow in order to access or manipulate data or functions inside of an application or software - like HubSpot. APIs are built so that developers can access them and integrate their own custom development projects with the application.

Almost every major web application, HubSpot included, has a publicly accessible and documented API that helps users and developers learn how to take advantage of the application's functions. Twitter for example has APIs for posting tweets, reading user data, reading tweets from a hashtag and many others. Google Maps has APIs for including maps on your website, marking them with points of interest and providing directions. These are some very basic examples of API capabilities, and you may be aware of ways to include some of this type of data in your website without an API. While this is possible (for example, using the embed code provided by Google Maps to include a map on your page), you don't get the amount of flexibility and data points that an API provides. 

The Anatomy of an API

Now that you know what an API is, lets dissect an API a little more so that you can see how they work. One of the first things you'll notice when you really start to look at APIs is that they are independent of any programming language. Although the application itself may be written in a particular language, the API is written to respond to HTTP requests. An HTTP request is any request sent over the HTTP layer, such as when you clicked the link that brought you to this blog post. Anytime you click a normal website link, or type a URL into your browser, you are performing a HTTP GET request. Essentially you are asking the web to "get" the website and display it. 

That's really all an API is, a layer of an application that responds to various types of HTTP requests.It sounds simple enough, but how are those APIs structured to understand different requests? APIs typically have multiple URLs that can be queried against that represent different functionality. To help structure an API, developers have grouped these URLs into what they call "endpoints". Endpoints are generally organized by the data object that is being manipulated. For example, the Contacts endpoint of the HubSpot API provides all the functions needed to manipulate contacts in your portal. 

Each endpoint within an API has a handful of functions that can be performed from the same URL structure. As you might have guessed there are more to HTTP requests than just the "GET" request. A single record (like a blog post) can have different actions performed against it based on the type of request made. 

The last part of an API request that we'll talk about is the authentication layer. APIs are publicly accessible, but they could be used to gain access to data that would otherwise not be attainable. It is because of this reason that APIs typically employ API keys in order to maintain the security of their client's data. The HubSpot API, for example, will only allow access to a portal's information if a API key is provided with the request. For now that's all the specifics you need to know, its just important to understand that web applications take security seriously and your data is protected by the API layer. 

The Limitless Potential of the HubSpot API

The HubSpot API opens up a limitless amount of possibilities for a skilled development team. Part of the success of the HubSpot API is the level of documentation that it has and the sheer number of endpoints provided. There are very few items in your portal that cannot be manipulated via the API.

Here are some nifty things the HubSpot API makes possible:

  • Chaging the settings of your HubSpot portal via the API. Blogs, Contacts, Lists, Forms, Events, Workflows, Emails
  • Migrating blogs from a external platform into HubSpot using the Blog API endpoint
  • Integrating Go To Webinar with HubSpot. Go To Webinar has its own API that allows you to access your webinars, attendees and the like - it's a match made in API heaven. 

Ok, still awake? Eyes not glossed over? Here's the good thing about this - we are really good at this API stuff. So give us a shout. 

Speak with online marketing and website experts

By: Lynton

Lynton is a HubSpot Elite Partner that provides certified knowledge and tools to grow your business through integrated inbound marketing, including lead generation strategies, website designs and development, and CRM integrations.

Subscribe Today

Stay Up-to-Date With HubSpot and Marketing Trends

Never miss a beat with the latest marketing strategies and tactics. Subscribe to the Lynton blog and receive valuable insights straight to your inbox.