This page defines the marketing API endpoints that HubSpot offers to developers and customers. For questions, please post to our developers forum.

For more information on rate limits for our public APIs, view our API usage guidelines.

All API calls to HubSpot should be made to the "https://api.hubapi.com" base domain. The following is a list of the API endpoints HubSpot offers:

Contacts API

Contacts are the building blocks of HubSpot and the starting point for many uses of the HubSpot API.

Method Name Endpoint Description
Create a Contact POST  /contacts/v1/contact Create a new contact in HubSpot with a simple HTTP POST to the Contacts API.
Update a Contact POST /contacts/v1/contact/vid/:contact_id/profile Update an existing contact in HubSpot. This method lets you update one of many fields of a contact in HubSpot.
Create or Update a Contact POST  /contacts/v1/contact/createOrUpdate/email/:contact_email Create a contact if it doesn't already exist in HubSpot, or update it if it does.
Create or Update a Group of Contacts POST  /contacts/v1/contact/batch/ Create a group of contacts if they don't already exist in HubSpot, or update them if they already do.
Delete a Contact DELETE  /contacts/v1/contact/vid/:contact_id Delete an existing contact from a particular HubSpot portal.
Get All Contacts GET  /contacts/v1/lists/all/contacts/all Get all contacts from a HubSpot portal. Contacts returned will be paginated, with 20 contacts per page.
Get Recent Contacts GET  /contacts/v1/lists/recently_updated/contacts/recent Get new and recently updated contacts returned to you by the time that they were last updated.
Get Contact by ID GET  /contacts/v1/contact/vid/:contact_id/profile For a given portal, return information about a single contact by its ID.
Get Group of Contacts by ID GET  /contacts/v1/contact/vids/batch/:contact_ids For a given portal, return information about a group of contacts by their IDs.
Get Contact by Email GET  /contacts/v1/contact/email/:contact_email/profile For a given portal, return information about a single contact by its email address.
Get Group of Contacts by Email GET  /contacts/v1/contact/vids/batch/:contact_emails For a given portal, return information about a group of contacts by their email addresses.
Get Contact by User Token GET  /contacts/v1/contact/utk/:contact_utk/profile For a given portal, return information about a single contact by User Token (hubspotutk)
Get Group of Contacts by User Tokens GET  /contacts/v1/contact/utks/batch/:contact_utk For a given portal, return information about a group of contacts by their User Tokens (hubspotutk)
Search for Contacts GET  /contacts/v1/search/query For a given portal, search for contacts by name or email.
Get Contact Statistics GET  /contacts/v1/contacts/statistics For a given portal, return statistics about that portal's contacts.

Contact Lists API

HubSpot lists are collections of contacts. They represent a new system that HubSpot is building and launching. Lists let you segment contacts and then perform certain operations on those segment. This API is for performing operations on lists themselves, like creating and updating - adding and removing contacts, etc...

Method Name Endpoint Description
Create a Contact List POST  /contacts/v1/lists Create a new list in a given HubSpot portal to populate with contacts.
Update a Contact List POST  /contacts/v1/lists/:list_id Update a list in a given HubSpot portal.
Delete a Contact List DELETE  /contacts/v1/lists/:list_id Delete a list in a given HubSpot portal, identified by its unique ID.
Get a Contact List by ID GET  /contacts/v1/lists/:list_id For a given portal, return a contact list by its unique ID.
Get Contact Lists GET  /contacts/v1/lists For a given portal, return a set of contact lists that you specify with the count parameter. By default, we will only return up to 20 lists to you at a time. See the parameter below for more information on this.
Get a Group of Contact Lists GET  /contacts/v1/lists/batch For a given portal, return a set of contact lists that you specify with multiple listId parameters.
Get Static Contact Lists GET  /contacts/v1/lists/static Get static lists. For a given portal, return a set of static contact lists that you specify with the count parameter. Static lists (as opposed to dynamic lists) are lists that can be edited (added to or updated) manually - via API calls like the Add Contact to List method.
Get Dynamic Contact Lists GET  /contacts/v1/lists/dynamic Get dynamic lists. For a given portal, return a set of dynamic contact lists that you specify with the count parameter. Dynamic lists are lists that can only be edited by the contacts app - they are meant to update themselves when new contacts are created or are updated, meaning that you can't manually add contacts to dynamic lists.
Get Contacts in a List GET  /contacts/v1/lists/:list_id/contacts/all Get list contacts. For a given portal and a given list, identified by its unique ID, return a list of contacts that are in that list.
Get Recently Added Contacts in a List GET  /contacts/v1/lists/:list_id/contacts/recent Get contacts that have been recently added to a list, identified by the list ID of that list.
Refresh a Contact List POST  /contacts/v1/lists/:list_id/refresh Refresh a list in HubSpot. This is mostly for dynamic lists that you may have to deal with in a HubSpot portal. Refreshing a dynamic list will let you pull new contacts from that list that may have been placed there since your last pull.
Add Contact to List POST  /contacts/v1/lists/:list_id/add Add a contact record that has already been created in the system to a (static) contact list.
Remove Contact from List POST  /contacts/v1/lists/:list_id/remove Remove a contact record that has already been created in the system from a (static) contact list.

Contact Property Methods

Contact properties are the standard and custom pieces of "field" data that appear in HubSpot. you can collect property information for each contact using list import, forms, CRM integration, our API, and even by adding the information manually in the contact detail view.

Method Name Endpoint Description
Get All Properties GET  /contacts/v1/properties Returns all existing contact properties (fields) to you.
Create a New Property (Field) PUT  /contacts/v1/properties/:property_name Create a new property in HubSpot. Properties in HubSpot are fields that have been created. By default, there are many fields that come "out of the box" in a HubSpot portal, but users can also create new, custom properties as they please.
Update a New Property (Field) POST  /contacts/v1/properties/:property_name Update a property in HubSpot. Properties in HubSpot are fields that have been created. By default, there are many fields that come "out of the box" in a HubSpot portal, but users can also create new, custom properties as they please.
Delete a Property (Field) DELETE  /contacts/v1/properties/:property_name Delete a property in HubSpot. Properties in HubSpot are fields that have been created.
Get a Property Group GET  /contacts/v1/groups/:group_name There are certain property groups that are in place for each portal by default: 'Contact Information', 'Social Media Information', 'Company Information' and 'Email information' are examples. This method returns a property group to you based on the group name that you specify in the call to this endpoint.
Create a Property Group PUT  /contacts/v1/groups/:group_name There are certain property groups that are in place for each portal by default: 'Contact Information', 'Social Media Information', 'Company Information' and 'Email information' are examples. Create a new contact property group that you can then use to display information about any contact through the HubSpot user interface.
Update a Property Group POST  /contacts/v1/groups/:group_name There are certain property groups that are in place for each portal by default: 'Contact Information', 'Social Media Information', 'Company Information' and 'Email information' are examples. This method lets you update your own custom property group in a portal.
Delete a Property Group DELETE  /contacts/v1/groups/:group_name There are certain property groups that are in place for each portal by default: 'Contact Information', 'Social Media Information', 'Company Information' and 'Email information' are examples. This method lets you delete a custom property group in a portal.

Workflows API

The Workflows API enables developers to interact with workflow metadata, and to enroll/unenroll contacts from automated workflows.

Method Name Endpoint Description
Get all workflows GET  /automation/v2/workflows Returns all non-deleted workflows for a portal
Get a specific workflow GET  /automation/v2/workflows/:workflowId Returns the workflow metadata (if workflow is not deleted)
Enroll a contact into a workflow POST  /automation/v2/workflows/:workflowId/enrollments/contacts/:email Enrolls the contact tied to the email (if found)
Create a workflow POST  /automation/v2/workflows Creates a new workflow with specified steps in a portal
Delete a workflow DELETE  /automation/v2/workflows/{workflowId} Deletes a specific workflow
Unenroll (remove) a contact from a workflow DELETE  /automation/v2/workflows/:workflowId/enrollments/contacts/:email Unenrolls the contact tied to the email (if found)
Current enrollments GET  /automation/v2/workflows/enrollments/contacts/:vid Returns all the workflows in which a contact is currently enrolled.
Log events GET  /automation/v2/workflows/:workflowId/logevents/contacts/:vid/past Return all the log events for a contact that occurred in a workflow.
Upcoming (scheduled) events GET  /automation/v2/workflows/:workflowId/logevents/contacts/:vid/upcoming Finds all the log events for a contact that are scheduled to occur in the future.
Using Webhooks in Workflows Reference documentation Information about our retry policy and webhook behavior.

Forms API

The Forms API enables developers to submit form data and form submissions.

Method Name Endpoint Description
Submit Form Data POST  https://forms.hubspot.com/uploads/form/v2/:portal_id/:form_guid Submit data to a form.
Get Forms GET  /contacts/v1/forms Get all forms from a portal.
Get Form GET  /contacts/v1/forms/:form_guid Get a form by its unique ID.
Create a Form POST  /contacts/v1/forms Create a new form.
Update a Form POST  /contacts/v1/forms/:form_guid Update an existing form by its unique ID.
Delete a Form DELETE  /contacts/v1/forms/:form_guid Delete an existing form.
Get Form Fields GET  /contacts/v1/fields/:form_guid Get all fields from a form.
Get a Form Field GET  /contacts/v1/fields/:form_guid/:field_name Get a single field from a form.
Customizing the embed code Reference Documentation Advanced options for the embeddable form code

Email API

The Email API enables developers to manage email subscription (opt-out) preferences by email address.

Method Name Endpoint Description
Get Subscription Type Definitions GET  https://api.hubapi.com/email/public/v1/subscriptions Get a list of email types (subscription types) for a HubSpot hub.
View Subscription Status of Email Address GET  https://api.hubapi.com/email/public/v1/subscriptions/:email_address View the current subscription status of an email address in a given hub (portal).
Update Subscription Status of Email Address PUT  https://api.hubapi.com/email/public/v1/subscriptions/:email_address Modify the current subscription status of an email address in a given hub (portal).

Email Events API

The Email Events API enables developers to retrieve data about email campaigns and email events associated with those campaigns.

Method Name Endpoint Description
Get Campaign IDs for a Portal GET  https://api.hubapi.com/email/public/v1/campaigns Get a list of email campaign IDs for a given portal.
Get Campaign Data for a Particular Campaign GET  https://api.hubapi.com/email/public/v1/campaigns/:campaign_id Get data about a particular campaign.
Get Event Data for a Campaign GET  https://api.hubapi.com/email/public/v1/campaigns/:campaign_id/events Get data for individual events for a given campaign.

COS Blog API

Blogs

Method URL Description
List Blogs GET /content/api/v2/blogs Supports paging and filtering.
Get the Blog by ID GET /content/api/v2/blogs/:blog_id
Discards any existing auto-save buffer and resets to the live Blog POST /content/api/v2/blogs/:blog_id/discard-buffer Returns the previously published resource data
Copies the contents of the auto-save buffer into the live Blog and updates the fields. PUT /content/api/v2/blogs/:blog_id/push-buffer-live
List previous versions of the Blog GET /content/api/v2/blogs/:blog_id/versions
Get the previous version of the Blog GET /content/api/v2/blogs/:blog_id/versions/:version_id Version id is the id of the version from the list previous versions endpoint

Blog Posts

Method URL Description
Create a new Blog Post POST /content/api/v2/blog-posts Create a new object
List Blog Posts GET /content/api/v2/blog-posts Supports paging and filtering.
Update the Blog Post PUT /content/api/v2/blog-posts/:blog_post_id Updates the Blog Post in the database. ...
Delete the Blog Post DELETE /content/api/v2/blog-posts/:blog_post_id Marks the Blog Post as deleted. The Blog Post can be restored later via a POST to the restore-deleted endpoint.
Get the Blog Post by ID GET /content/api/v2/blog-posts/:blog_post_id
Updates the auto-save buffer PUT /content/api/v2/blog-posts/:blog_post_id/buffer Updates the auto-save buffer. Live objects will not be impacted.
Gets the current contents of the auto-save buffer GET /content/api/v2/blog-posts/:blog_post_id/buffer The auto-save buffer is updated continuously when a user is editing the content through the UI. Only when the user clicks "Save" or "Publish" does the auto-save buffer get copied to the live object.
Clone the Blog Post POST /content/api/v2/blog-posts/:blog_post_id/clone
Discards any existing auto-save buffer and resets to the live Blog Post POST /content/api/v2/blog-posts/:blog_post_id/discard-buffer Returns the previously published resource data
Determine if the auto-save buffer differs from the live Blog Post GET /content/api/v2/blog-posts/:blog_post_id/has-buffered-changes Returns a dictionary: {"has_buffered_changes": false/true} depending on if the buffer is different from the live object.
Publishes or unpublishes a Blog Post POST /content/api/v2/blog-posts/:blog_post_id/publish-action Either publishes or cancels publishing based on the POSTed JSON....
Copies the contents of the auto-save buffer into the live Blog Post and updates the fields. PUT /content/api/v2/blog-posts/:blog_post_id/push-buffer-live
Copies the contents of the auto-save buffer into the live Blog Post. POST /content/api/v2/blog-posts/:blog_post_id/push-buffer-live
Restores a previously deleted Blog Post POST /content/api/v2/blog-posts/:blog_post_id/restore-deleted
Validates the auto-save buffer version of the Blog Post POST /content/api/v2/blog-posts/:blog_post_id/validate-buffer No post body is needed.
List previous versions of the Blog Post GET /content/api/v2/blog-posts/:blog_post_id/versions
Get the previous version of the Blog Post GET /content/api/v2/blog-posts/:blog_post_id/versions/:version_id Version id is the id of the version from the list previous versions endpoint
Restore a previous version of the Blog Post POST /content/api/v2/blog-posts/:blog_post_id/versions/restore

Blog API Tutorial

First we create a draft blog post with the bare minimum amount of information.

This API call will generate a response with the full post body. Get the 'id' field out of that body for use with the succeeded api calls.

Now we'll update the post with required information. This will NOT publish the post - even if we set the publish date for an older time.

Now we'll publish the blog post.

We always use schedule publish as the action - even if we want the post to be shown immediately. If 'publish_immediately' is null or true then we will publish as soon as schedule-publish is called. If 'publish_immediately' is false, we publish the blog post at the 'publish_date'. Until that time, the post will be inacccessible on the web site. At that time, a job will trigger to send out any enabled emails and tweets.

Comments

Method URL Description
Create a new Comment POST /content/api/v2/comments Create a new object
List Comments GET /content/api/v2/comments Supports paging and filtering.
Update the Comment PUT /content/api/v2/comments/:comment_id Updates the Comment in the database. ...
Delete the Comment DELETE /content/api/v2/comments/:comment_id Marks the Comment as deleted. The Comment can be restored later via a POST to the restore-deleted endpoint.
Get the Comment by ID GET /content/api/v2/comments/:comment_id
Restores a previously deleted Comment POST /content/api/v2/comments/:comment_id/restore-deleted
List previous versions of the Comment GET /content/api/v2/comments/:comment_id/versions
Get the previous version of the Comment GET /content/api/v2/comments/:comment_id/versions/:version_id Version id is the id of the version from the list previous versions endpoint
Restore a previous version of the Comment POST /content/api/v2/comments/:comment_id/versions/restore

Blog Authors

Method URL Description
Create a new Blog Author POST /content/api/v2/blog-authors Create a new object
List Blog Authors GET /content/api/v2/blog-authors Supports paging and filtering.
Update the Blog Author PUT /content/api/v2/blog-authors/:blog_author_id Updates the Blog Author in the database. ...
Delete the Blog Author DELETE /content/api/v2/blog-authors/:blog_author_id Marks the Blog Author as deleted. The Blog Author can be restored later via a POST to the restore-deleted endpoint.
Get the Blog Author by ID GET /content/api/v2/blog-authors/:blog_author_id
Restores a previously deleted Blog Author POST /content/api/v2/blog-authors/:blog_author_id/restore-deleted

Topics

Method URL Description
Create a new Topic POST /content/api/v2/topics Create a new object
List Topics GET /content/api/v2/topics Supports paging and filtering.
Update the Topic PUT /content/api/v2/topics/:topic_id Updates the Topic in the database. ...
Delete the Topic DELETE /content/api/v2/topics/:topic_id Marks the Topic as deleted. The Topic can be restored later via a POST to the restore-deleted endpoint.
Get the Topic by ID GET /content/api/v2/topics/:topic_id
Restores a previously deleted Topic POST /content/api/v2/topics/:topic_id/restore-deleted

COS Page Publishing API

Method URL Description
Create a new Page POST /content/api/v2/pages Create a new object
List Pages GET /content/api/v2/pages Supports paging and filtering.
Update the Page PUT /content/api/v2/pages/:page_id Updates the Page in the database. ...
Delete the Page DELETE /content/api/v2/pages/:page_id Marks the Page as deleted. The Page can be restored later via a POST to the restore-deleted endpoint.
Get the Page by ID GET /content/api/v2/pages/:page_id
Updates the auto-save buffer PUT /content/api/v2/pages/:page_id/buffer Updates the auto-save buffer. Live objects will not be impacted.
Gets the current contents of the auto-save buffer GET /content/api/v2/pages/:page_id/buffer The auto-save buffer is updated continuously when a user is editing the content through the UI. Only when the user clicks "Save" or "Publish" does the auto-save buffer get copied to the live object.
Clone the Page POST /content/api/v2/pages/:page_id/clone
Discards any existing auto-save buffer and resets to the live Page POST /content/api/v2/pages/:page_id/discard-buffer Returns the previously published resource data
Determine if the auto-save buffer differs from the live Page GET /content/api/v2/pages/:page_id/has-buffered-changes Returns a dictionary: {"has_buffered_changes": false/true} depending on if the buffer is different from the live object.
Publishes or unpublishes a Page POST /content/api/v2/pages/:page_id/publish-action Either publishes or cancels publishing based on the POSTed JSON....
Copies the contents of the auto-save buffer into the live Page and updates the fields. PUT /content/api/v2/pages/:page_id/push-buffer-live
Copies the contents of the auto-save buffer into the live Page. POST /content/api/v2/pages/:page_id/push-buffer-live
Restores a previously deleted Page POST /content/api/v2/pages/:page_id/restore-deleted
Validates the auto-save buffer version of the Page POST /content/api/v2/pages/:page_id/validate-buffer No post body is needed.
List previous versions of the Page GET /content/api/v2/pages/:page_id/versions
Get the previous version of the Page GET /content/api/v2/pages/:page_id/versions/:version_id Version id is the id of the version from the list previous versions endpoint
Restore a previous version of the Page POST /content/api/v2/pages/:page_id/versions/restore

COS Files API

Files

Method URL Description
Upload a new file POST /content/api/v2/files This endpoint uses multi-part form encoding, rather than JSON
List the metadata for all files GET /content/api/v2/files
Upload a replacement file POST /content/api/v2/files/:file_id
Delete the file DELETE /content/api/v2/files/:file_id
Get the file metadata GET /content/api/v2/files/:file_id
The file will be hidden in file manager, but still visible from its original URL POST /content/api/v2/files/:file_id/archive
Delete the file and remove it from the CDN, along with all thumbnails and associated content. POST /content/api/v2/files/:file_id/full-delete
Move the file to a new folder POST /content/api/v2/files/:file_id/move-file
Restores a previously deleted File POST /content/api/v2/files/:file_id/restore-deleted
List previous versions of the File GET /content/api/v2/files/:file_id/versions
Get the previous version of the File GET /content/api/v2/files/:file_id/versions/:version_id Version id is the id of the version from the list previous versions endpoint
Restore a previous version of the File POST /content/api/v2/files/:file_id/versions/restore

Folders

Method URL Description
Create a folder POST /content/api/v2/folders
List the folder metadata GET /content/api/v2/folders
Update the Folder PUT /content/api/v2/folders/:folder_id Updates the Folder in the database. ...
Delete the Folder DELETE /content/api/v2/folders/:folder_id Marks the Folder as deleted. The Folder can be restored later via a POST to the restore-deleted endpoint.
Get the Folder by ID GET /content/api/v2/folders/:folder_id
Move a folder POST /content/api/v2/folders/:folder_id/move-folder
Restores a previously deleted Folder POST /content/api/v2/folders/:folder_id/restore-deleted
List previous versions of the Folder GET /content/api/v2/folders/:folder_id/versions
Get the previous version of the Folder GET /content/api/v2/folders/:folder_id/versions/:version_id Version id is the id of the version from the list previous versions endpoint
Restore a previous version of the Folder POST /content/api/v2/folders/:folder_id/versions/restore

COS Domains

Method URL Description
List Domains GET /content/api/v2/domains Supports paging and filtering.
Get the Domain by ID GET /content/api/v2/domains/:domain_id
List previous versions of the Domain GET /content/api/v2/domains/:domain_id/versions
Get the previous version of the Domain GET /content/api/v2/domains/:domain_id/versions/:version_id Version id is the id of the version from the list previous versions endpoint

COS Site Maps

Method URL Description
List SiteMaps GET /content/api/v2/site-maps Supports paging and filtering.
Get the SiteMap by ID GET /content/api/v2/site-maps/:sitemap_id
Gets the current contents of the auto-save buffer GET /content/api/v2/site-maps/:sitemap_id/buffer The auto-save buffer is updated continuously when a user is editing the content through the UI. Only when the user clicks "Save" or "Publish" does the auto-save buffer get copied to the live object.
Determine if the auto-save buffer differs from the live SiteMap GET /content/api/v2/site-maps/:sitemap_id/has-buffered-changes Returns a dictionary: {"has_buffered_changes": false/true} depending on if the buffer is different from the live object.
List previous versions of the SiteMap GET /content/api/v2/site-maps/:sitemap_id/versions
Get the previous version of the SiteMap GET /content/api/v2/site-maps/:sitemap_id/versions/:version_id Version id is the id of the version from the list previous versions endpoint

COS Templates

Method URL Description
Create a new Template POST /content/api/v2/templates Create a new object
List Templates GET /content/api/v2/templates Supports paging and filtering.
Update the Template PUT /content/api/v2/templates/:template_id Updates the Template in the database. ...
Delete the Template DELETE /content/api/v2/templates/:template_id Marks the Template as deleted. The Template can be restored later via a POST to the restore-deleted endpoint.
Get the Template by ID GET /content/api/v2/templates/:template_id
Updates the auto-save buffer PUT /content/api/v2/templates/:template_id/buffer Updates the auto-save buffer. Live objects will not be impacted.
Gets the current contents of the auto-save buffer GET /content/api/v2/templates/:template_id/buffer The auto-save buffer is updated continuously when a user is editing the content through the UI. Only when the user clicks "Save" or "Publish" does the auto-save buffer get copied to the live object.
Discards any existing auto-save buffer and resets to the live Template POST /content/api/v2/templates/:template_id/discard-buffer Returns the previously published resource data
Determine if the auto-save buffer differs from the live Template GET /content/api/v2/templates/:template_id/has-buffered-changes Returns a dictionary: {"has_buffered_changes": false/true} depending on if the buffer is different from the live object.
Copies the contents of the auto-save buffer into the live Template and updates the fields. PUT /content/api/v2/templates/:template_id/push-buffer-live
Copies the contents of the auto-save buffer into the live Template. POST /content/api/v2/templates/:template_id/push-buffer-live
Restores a previously deleted Template POST /content/api/v2/templates/:template_id/restore-deleted
List previous versions of the Template GET /content/api/v2/templates/:template_id/versions
Get the previous version of the Template GET /content/api/v2/templates/:template_id/versions/:version_id Version id is the id of the version from the list previous versions endpoint
Restore a previous version of the Template POST /content/api/v2/templates/:template_id/versions/restore

COS Layouts

Method URL Description
List Layouts GET /content/api/v2/layouts Supports paging and filtering.
Get the Layout by ID GET /content/api/v2/layouts/:layout_id
Gets the current contents of the auto-save buffer GET /content/api/v2/layouts/:layout_id/buffer The auto-save buffer is updated continuously when a user is editing the content through the UI. Only when the user clicks "Save" or "Publish" does the auto-save buffer get copied to the live object.
Determine if the auto-save buffer differs from the live Layout GET /content/api/v2/layouts/:layout_id/has-buffered-changes Returns a dictionary: {"has_buffered_changes": false/true} depending on if the buffer is different from the live object.
List previous versions of the Layout GET /content/api/v2/layouts/:layout_id/versions
Get the previous version of the Layout GET /content/api/v2/layouts/:layout_id/versions/:version_id Version id is the id of the version from the list previous versions endpoint

COS Url Mappings

Method URL Description
Create a new Url Mapping POST /content/api/v2/url-mappings Create a new object
List Url Mappings GET /content/api/v2/url-mappings Supports paging and filtering.
Update the Url Mapping PUT /content/api/v2/url-mappings/:url_mapping_id Updates the Url Mapping in the database. ...
Delete the Url Mapping DELETE /content/api/v2/url-mappings/:url_mapping_id Marks the Url Mapping as deleted. The Url Mapping can be restored later via a POST to the restore-deleted endpoint.
Get the Url Mapping by ID GET /content/api/v2/url-mappings/:url_mapping_id
Restores a previously deleted Url Mapping POST /content/api/v2/url-mappings/:url_mapping_id/restore-deleted
List previous versions of the Url Mapping GET /content/api/v2/url-mappings/:url_mapping_id/versions
Get the previous version of the Url Mapping GET /content/api/v2/url-mappings/:url_mapping_id/versions/:version_id Version id is the id of the version from the list previous versions endpoint
Restore a previous version of the Url Mapping POST /content/api/v2/url-mappings/:url_mapping_id/versions/restore

CMS Blog API

The HubSpot Blog API provides access to your blogs, blog posts, blog comments, and some analytics data about them. You can use to find blog posts, add new posts, and export related data.

Method Name Endpoint Description
List Blogs GET  /blog/v1/list.:ext There can be more than one blog per HubSpot portal. This method lets you get a list of those blogs in a given HubSpot portal.
Get Blog Info GET  /blog/v1/:blog_guid.:ext List information about a specific blog for a specific HubSpot portal.
List Blog Comments GET  /blog/v1/:blog_guid/comments.:ext List comments for a specific blog. You can search for the blogs available in a particular portal by using the List Blogs method.
List Blog Posts GET  /blog/v1/:blog_guid/posts.:ext In each blog, there are blog posts. This method lets you list those blog posts for a specific Blog.
Get Blog Post Info GET  /blog/v1/posts/:post_guid.:ext List information about those specific blog posts that you can search for using the method listed above.
List Blog Post Comments GET  /blog/v1/posts/:post_guid/comments.:ext Each individual blog post may have comments associated with it that have been left by readers. This post lets you list comments for any post. You can search for those posts using the method above.
Get Blog Comment Info GET  /blog/v1/comments/:comment_guid.:ext List information about a specific blog comment. You can search for blog comments using the method above.
Create a Blog Post POST  /blog/v1/:blog_guid/posts.atom Create a new blog post for a particular blog. By default, any blog post that you create through this endpoing will initially be in "draft" mode, which you can change by publishing it.
Update a Blog Post PUT  /blog/v1/posts/:post_guid.atom Update a blog post that already exists. The post may be in published or draft mode to update it.
Publish a Blog Post PUT  /blog/v1/posts/:post_guid.atom Change a blog post's status from draft to published. Once published, the post will appear live on that particular blog.
Create a Blog Comment POST  /blog/v1/posts/:post_guid/comments.atom Create a new blog comment on a particular post in a particular blog. Once you create this comment, it will be live - there is not a 'draft' mode for blog comments.

Keywords API

The Keywords API enables developers to access information about the keywords in a HubSpot portal. This information can be relevant for content-related work, search engine optimization, social media interactions and more. Developers can also add or remove keywords from a portal.

Method Name Endpoint Description
Get Keyword List GET  /keywords/v1/keywords.json Get a list of Keywords for a given portal.
Get a Keyword GET  /keywords/v1/keywords/:keyword_guid.json Get information about an individual Keyword.
Create a Keyword PUT  /keywords/v1/keywords.json Create a new Keyword in a given portal.
Delete a Keyword DELETE  /keywords/v1/keywords/:keywords_guid Delete a Keyword from a portal.

Prospects API

Prospects are website visitors that have viewed a website with the HubSpot JavaScript tracking code enabled (including HubSpot CMS and landing pages). We identify prospects by company, geographic region and also associate this information with leads that have converted. The purpose of this API is to enable developers to access prospect information for a particular HubSpot account, or "portal."

Using this API, developers can see who has visited the HubSpot customer's website, search for visitors from particular organizations, filter visitors by city, region, state, or country, and perform a couple of miscellaneous operations in HubSpot's new Prospects application.

Method Name Endpoint Description
Get Prospects GET  /prospects/v1/timeline Get a list of Prospects for a given portal. Prospects are website visitors that HubSpot will provide information about. The API will return the most recent 20 prospects to you.
Get Prospect Info GET  /prospects/v1/timeline/:organization Get information about a specific prospect's organization or company.
Search for Prospects GET  /prospects/v1/search/:search_type Search for Prospects using various criteria. Note the (search type) in the URL. This must be specified, and it must be one of 'city', 'region', or 'country'.
Hide a Prospect POST  /prospects/v1/filters Hide a Prospect from the HubSpot user interface.
Get Hidden Prospect GET  /prospects/v1/filters Get a list of hidden Prospects.
Un-Hide a Prospect DELETE  /prospects/v1/filters Un-Hide a Prospect that was previously hidden.

Settings API

Settings are related to a particular HubSpot account or "portal". You can access these setting via this API, update a selected subset of those settings and store your own custom settings, in a consistent and easy fashion.

Method Name Endpoint Description
Get Settings GET  /settings/v1/settings Get a list Settings from a HubSpot portal.
Create or Update Settings POST or PUT  /settings/v1/settings Update a setting within a HubSpot portal.
Delete a Setting DELETE  /settings/v1/settings Delete a Setting from a HubSpot portal.

Social Media API

The Social Media API enables developers to publish to social media channels and collect analytics about published messages.

Method Name Endpoint Description
Get Publishing Channels GET  /broadcast/v1/channels/setting/publish/current Get a list of channels available to publish to.
Get a Channel GET  /broadcast/v1/channels/:channel_guid Get details on a specific channel.
Get Broadcast messages GET  /broadcast/v1/broadcasts Get details on all broadcasts, with optional filters.
Get a Broadcast message GET  /broadcast/v1/broadcasts/:broadcast_guid Get the details on a specific broadcast message.
Create a Broadcast message POST  /broadcast/v1/broadcasts Create a new message to be published.
Cancel a Broadcast message DELETE  /broadcast/v1/broadcasts/:broadcast_guid Cancel a scheduled broadcast message.

Enterprise Events API

Enterprise Events are only for Enterprise customers and allow you to get a more in depth level of reporting, segmentation and lead scoring. These endpoints allow developers to trigger custom events using JavaScript and simple HTTP requests.

API Type Description
Javascript API Use our Javascript Events API to trigger custom events.
"HTTP" API Use the "HTTP" API to use standard Restful HTTP calls to trigger custom events.

OAuth

OAuth, (or Open Authorization) is an open standard for authorization. It allows users to share their private resources (e.g. leads, blog posts, prospects) stored on HubSpot with another site without having to hand out their credentials

Method Name Endpoint Description
Refresh an OAuth Access Token POST  /auth/v1/refresh Refresh an OAuth Access Token to gain access to a HubSpot portal's data. You can learn more about this method and OAuth at HubSpot here.