Blog Authors 

Access and test APIs in beta. 

Please note: This API is currently under development and is subject to change based on testing and feedback. By using these endpoints you agree to adhere to our Developer TermsDeveloper BetaTerms. You also acknowledge and understand the risk associated with testing an unstable API. 

You can use the blog authors API to manage author information for your blog posts. Learn more about how to create and maintain your blog on the HubSpot Knowledge Base.

Changes in V3

The following properties are deprecated and will not be included in the response of any of the V3 endpoints:

  • user_id
  • username
  • googlePlus
  • gravatarUrl
  • twitterUsername
  • hasSocialProfiles

Limits

The blog author API endpoints are subject to the limits defined in HubSpot's API usage guidelines. Any limits specific to a certain endpoint will be listed with the associated endpoint in the Endpoints tab above.

Search blog authors

When you make a GET request to /cms/v3/blogs/authors, you can filter and sort the authors returned in the response using the operators and properties below. You can also use the standard filters using the createdAt and updatedAt dates.

Filtering

Provide any filters as query parameters in your request, by adding the property name, followed by two underscore characters, then include the associated operator as a suffix. For example, you can filter the results to only include authors where the displayName property contains the word John using the parameter: &displayName__icontains=john.

You can include any number of filters as query parameters in the request URL. All filters are ANDed together. ORing filters is not currently supported.

The available filter types are listed below:

Filter Operator
Equals eq (or none)
Not equal ne
Contains contains
Less than lt
Less than or equal lte
Greater than gt
Greater than or equal gte
Null is_null
Not null not_null
Like like
Not like not_like
Contains (case insensitive) icontains
Starts with startswith
In in

The table below lists the properties that can be filtered on, along with their supported filter types.

Property Supported filters
id Equal, In, Not In
fullName Equal, In, Contains
email Equal, Not Equal, Not Null
slug Equal
createdAt Equal, Greater than, Greater than or equal , Less than ,Less than or equal
updatedAt Equal, Greater than, Greater than or equal , Less than ,Less than or equal
name Equal, In, Contains
deletedAt Equal, Greater than, Greater than or equal , Less than ,Less than or equal
createdById Equal
updatedById Equal
language In, Not Null
translatedFromId Null, Not Null

To filter blog authors based on a multi-language group, you can include one of the query parameters in the table below. For example, to get blog authors associated with the German variation of your blog, you'd include language_in=de as a query parameter.

Description Query parameters
Primary blog author in a multi-language group translatedFromId__is_null
Variation blog author in a multi-language group translatedFromId__not_null
Blog author with specific language language__in

Sorting and paginating

You can provide sorting and pagination options as query parameters. Specify the property name as the value to the sort query parameter to return the blog authors in the natural order of that property. You can reverse the sorting order by including a dash character before the property name (e.g., sort=-createdAt).

By combining query parameters for filtering, sorting, and paging, you can retrieve blog authors that match more advanced search criteria. For example, the request below fetches blog authors that don't have a language assigned, ordered by the most recently updated. The limit and offset parameters below return the second page of results.

Shell script
curl
https://api.hubapi.com/cms/v3/blogs/authors?hapikey=YOUR_HUBSPOT_API_KEY&sort=-updatedAt&&language__not_null&limit=10&offset=10 \
  --request POST \
  --header "Content-Type: application/json"

Create blog authors

You can create blog authors by making a POST request to /cms/v3/blogs/authors, and including a JSON payload that represents the blog author model. The fullName field is required when creating a blog author. To set the URL of a blog author profile page, you must provide the slug field in your request. Review the required parameters and the structure of the blog author model in the Endpoints tab at the top of this article.

You can also create blog authors directly in your HubSpot account.

Edit blog authors

You can update a blog author by making a PATCH request to the /cms/v3/blogs/authors/{objectId} and provide the ID of the associated author as the objectId. Include a JSON payload representing the blog author model in your request. Review the required parameters and the structure of the blog author model in the Endpoints tab at the top of this article.

You can also edit a blog author's profile directly in your HubSpot account.

Multi-language management

To help you maintain blog authors across multiple languages, HubSpot's CMS allows you to group together blog authors of language variants of the same content. A blog author with a language set may only be used on blog posts of the same language. Blog authors that do not have a language set are considered global and may be used on all blog posts.

To learn more about working with multi-language blog authors, check out this Knowledge Base article.

Create a new language variant

You can create a new language variant for an existing blog author by making a POST request to the /multi-language/create-language-variant endpoint. The endpoint accepts a JSON payload containing the id of the blog author to clone and the language identifier of the new variant.

Attach a blog author to an existing multi-language group

You can add a blog author to an existing multi-language group by making a POST request to the /multi-language/attach-to-lang-group endpoint. The endpoint accepts a JSON payload containing the id of the target blog author, the language identifier of the blog author being added, and the primaryId of the blog author designated as the primary author in the target multi-language group.

Detach a blog author from a multi-language group

You can remove a blog author from a multi-language group by making a POST request to the /multi-language/detach-from-lang-group endpoint, and including a JSON payload that contains the id of the target blog author.


Was this page helpful? *
This form is for feedback on our developer docs. If you have feedback on the HubSpot product, please share it in our Idea Forum instead.