APIs & Integrations

spoloha
Member

Unable to Publish Blog Post

I’ve been trying to publish blogs via the blog post API, but I keep receiving 400 (Bad Request) errors. I’m currently trying to post to the following url: https://api.hubapi.com/content/api/v2/blog-posts/[blog_post_id]/publish-action?hapikey=[api key]. I am posting the following json: {“action”:“schedule-publish”}

I have been able to create blog posts via the api and then retrieve them without issue. However, no matter what I try, I can’t seem to make the publish feature work. Any suggestions would be greatly appreciated. Thanks!

0 Upvotes
3 Replies 3
spoloha
Member

Unable to Publish Blog Post

I was able to resolve this issue on my own. My blog posts were missing meta descriptions. Once I populated that field on the initial blog post creation, I was able to publish via the api without issue.

josephLayden
Contributor

Unable to Publish Blog Post

Did the error returned mention the missing description?

0 Upvotes
3PETE
HubSpot Employee
HubSpot Employee

Unable to Publish Blog Post

Thanks for the update with the solution.

0 Upvotes