A collection of methods related to the Blog API / Blog Posts API / Blog Authors API
Methods
-
Clones a blog post
Name Type Description optsobject Properties:
Name Type Description opts.idint opts.namestring Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.clonePost(opts).then(response => console.log(response)) -
Create a new comment.
Name Type Description optsobject Properties:
Name Type Description opts.commentstring opts.contentIdint opts.collectionIdint opts.contentAuthorEmailstring opts.contentAuthorNamestring opts.contentPermalinkstring opts.contentTitlestring opts.userEmailstring opts.userNamestring opts.userUrlstring Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.createComment(opts).then(response => console.log(response)) -
Create or update a blog author info.
Name Type Description optsobject Properties:
Name Type Description opts.idint opts.emailstring opts.fullNamestring opts.userIdstring opts.usernamestring opts.biostring opts.websitestring opts.twitterstring opts.linkedinstring opts.facebookstring opts.googlePlusstring opts.avatarstring Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.createOrUpdateAuthor(opts).then(response => console.log(response)) -
Create or update a blog post.
Name Type Description optsobject Properties:
Name Type Description opts.idint opts.archivedboolean opts.blog_author_idint opts.campaignstring opts.campaign_namestring opts.content_group_idint opts.statestring opts.featured_imagestring opts.footer_htmlstring opts.head_htmlstring opts.keywordsstring opts.meta_descriptionstring opts.namestring opts.post_bodystring opts.post_summarystring opts.publish_dateint opts.publish_immediatelyboolean opts.slugstring opts.topic_idsarray opts.use_featured_imageboolean opts.widgetsstring Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.createOrUpdatePost(opts).then(response => console.log(response)) -
Create or update a blog topic.
Name Type Description optsobject Properties:
Name Type Description opts.idint opts.namestring opts.descriptionstring Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.createOrUpdateTopic(opts).then(response => console.log(response)) -
Remove a blog author
Name Type Description idint Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.deleteAuthor(id).then(response => console.log(response)) -
Remove a blog comment
Name Type Description idint Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.deleteComment(id).then(response => console.log(response)) -
Remove a blog post
Name Type Description idint Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.deletePost(id).then(response => console.log(response)) -
Remove a blog topic
Name Type Description idint Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.deleteTopic(id).then(response => console.log(response)) -
Get info for all blogs on a particular portal
Name Type Description optsobject Properties:
Name Type Description opts.namestring opts.limitint opts.offsetint opts.createdint opts.deleted_atint Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.getAllBlogs(opts).then(response => console.log(response)) -
Retrieve blog author details
Name Type Description idint Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.getAuthor(id).then(response => console.log(response)) -
Retrieve all blog authors
Name Type Description optsobject Properties:
Name Type Description opts.emailstring opts.limitint opts.offsetint opts.idint opts.fullNamestring opts.slugstring opts.createdint opts.updatedint Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.getAuthors(id).then(response => console.log(response)) -
Retrieve blog info for specific blog
Name Type Description idint Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.getBlogById(id).then(response => console.log(response)) -
Get specific comment
Name Type Description commentIdint Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.getComment(commentId).then(response => console.log(response)) -
Get all comments for specific content
Name Type Description optsobject Properties:
Name Type Description opts.limitint opts.offsetint opts.portalIdint opts.statestring opts.contentIdint opts.reverseboolean opts.querystring Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.getComments(opts).then(response => console.log(response)) -
Retrieve blog post autosave buffer contents
Name Type Description postIdint Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.getPostAutosaveBuffer(postId).then(response => console.log(response)) -
Retrieve blog post autosave buffer status
Name Type Description postIdint Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.getPostAutosaveBufferStatus(postId).then(response => console.log(response)) -
Retrieve blog post info by ID
Name Type Description idint Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.getPostById(id).then(response => console.log(response)) -
Get all blog posts for specified blog
Name Type Description optsobject Properties:
Name Type Description opts.limitint opts.offsetint opts.archivedboolean opts.blog_author_idint opts.campaignstring opts.content_group_idint opts.slugstring opts.statestring opts.order_bystring opts.createdint opts.deleted_atint opts.namestring opts.updatedboolean Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.getPosts(opts).then(response => console.log(response)) -
Retrieve blog post version
Name Type Description versionIdint Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.getPostVersionById(versionId).then(response => console.log(response)) -
Retrieve blog post versions by post ID
Name Type Description postIdint Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.getPostVersions(postId).then(response => console.log(response)) -
Retrieve blog topic info
Name Type Description idint Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.getTopic(id).then(response => console.log(response)) -
Retrieve blog topic info
Name Type Description optsobject Properties:
Name Type Description opts.idint opts.namestring opts.createdint opts.slugstring opts.limitint opts.offsetint Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.getTopics(opts).then(response => console.log(response)) -
Merge multiple topics by ID into a single topic group.
Name Type Description optsobject Properties:
Name Type Description opts.groupedTopicNamestring opts.topicIdsarray.<int> Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.groupTopics(opts).then(response => console.log(response)) -
Publish, unpublish, or schedule a post
Name Type Description postIdint publishActionstring One of
schedule-publishorcancel-publishReturns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.publishOrSchedulePost(postId, publishAction).then(response => console.log(response)) -
Push the autosave buffer for a post to live.
Name Type Description postIdint Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.pushPostAutosaveBufferLive(postId).then(response => console.log(response)) -
Restore a previously deleted post
Name Type Description postIdint Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.restoredDeletedPost(postId).then(response => console.log(response)) -
Restore a deleted comment
Name Type Description idint Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.restoreDeletedComment(opts).then(response => console.log(response)) -
Restore a post version to a specific ID.
Name Type Description postIdint versionIdint Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.restorePostVersionById(postId, versionId).then(response => console.log(response)) -
Search blog authors
Name Type Description optsobject Properties:
Name Type Description opts.orderint opts.limitint opts.offsetint opts.qstring Free text search parameter
opts.activeboolean opts.blogint Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.searchAuthors(opts).then(response => console.log(response)) -
Search blog topics
Name Type Description optsobject Properties:
Name Type Description opts.idint opts.namestring opts.createdint opts.slugstring opts.limitint opts.offsetint opts.qstring Free text search parameter
opts.activeboolean opts.blogint Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.searchTopics(opts).then(response => console.log(response)) -
Update the autosave buffer for a post
Name Type Description optsobject Properties:
Name Type Description opts.idint opts.blog_author_idint opts.campaignstring opts.campaign_namestring opts.content_group_idint opts.featured_imagestring opts.footer_htmlstring opts.head_htmlstring opts.keywordsstring opts.meta_descriptionstring opts.namestring opts.post_bodystring opts.post_summarystring opts.publish_dateint opts.publish_immediatelyboolean opts.slugstring opts.topic_idsarray opts.use_featured_imageboolean opts.widgetsstring Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.updateAutosaveBuffer(opts).then(response => console.log(response)) -
Validate the autosave buffer on a post.
Name Type Description postIdint Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.blog.validatePostAutosaveBufferStatus(postId).then(response => console.log(response))