# Blogpost API for update

**URL:** <https://community.hubspot.com/t/blogpost-api-for-update/91252>\
**Category:** APIs & Integrations\
**Tags:** professional\
**Created:** [October 6, 2023, 5:02am UTC](https://community.hubspot.com/t/blogpost-api-for-update/91252 "2023-10-06T05:02:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xenn](https://avatars.discourse-cdn.com/v4/letter/x/898d66/32.png) [@Xenn](https://community.hubspot.com/u/Xenn)\
**Post date:** [October 6, 2023, 5:02am UTC](https://community.hubspot.com/t/blogpost-api-for-update/91252/1 "2023-10-06T05:02:20Z")

</div>

Hello,

have a question regarding the usage of update/patch for a blog post.

Just to simplify, I used hubspot client library for node to do the following

1. Query a blog post (printed contents shows this is successful)

2. Without any change to the blogpost object, push an ‘update’:

```lia-code-sample
hubspotClient.cms.blogs.blogPosts.blogPostsApi.getById('47136218848').then(blogPost => {
 hubspotClient.cms.blogs.blogPosts.blogPostsApi.update('47136218848', blogPost).then(resp => {
 });
});

```

Since the blog post content comes from the client library’s get call directly, why is the content invalid?

```lia-code-sample
 errorType: 'INVALID_JSON_VALUE',
 message: `Unable to set value for created on blog post from JSON: {"id":"47136218848","slug" ....

```

Have confirmed that getById returns a ‘BlogPost’ object type, and update expects a ‘BlogPost’ object type too

This also happens if I use postman instead of the library and manually paste it over with content-type set as ‘application/json’ during the post
