Jan 14, 20204:32 AM - edited Jan 14, 20204:34 AM
Member
Publish CMS Page
SOLVE
I am integrating an application with the API and I encounter a difficulty when I publish pages of the website in Hubspot. I publish the page perfectly but it is being impossible for me to leave it in a state published from the API.
Once this is done, my page is created but is returned in draft mode, this is signified by the following values that are returned in your response when the page is created:
"is_draft": true,
"is_published": false,
Now, if we're looking to publish this page, we can make a new request to the following endpoint:
This is documented in the second link above. You'll see that this endpoint is specifically targetting the page we've just created through the use of the page_id which is returned in the intial response when the page is created using the above method.
Once this is sent, the page we've just created will be updated and the is_published value set to true providing we receive the 204 No Content status.
Once this is done, my page is created but is returned in draft mode, this is signified by the following values that are returned in your response when the page is created:
"is_draft": true,
"is_published": false,
Now, if we're looking to publish this page, we can make a new request to the following endpoint:
This is documented in the second link above. You'll see that this endpoint is specifically targetting the page we've just created through the use of the page_id which is returned in the intial response when the page is created using the above method.
Once this is sent, the page we've just created will be updated and the is_published value set to true providing we receive the 204 No Content status.