I know comments have been available in Ghost since 2022, but I was curious if they were available through the Content or Admin APIs? The docs make no mention of Comment API endpoints aside from posts having a ‘Comment ID’ in the API response.
I have two websites I maintain, one using native self hosted Ghost platform which is brilliant, but the other site has eCommerce and a few other features that don’t mesh well with the native Ghost platform and I’m running Ghost headless there. I’ve built my own comment and post reaction functionality for the headless website, but if I could house more within the CMS and not have to maintain separate functionality that would be peachy.
Ex: Using content API to retrieve comments on a post, Admin API to create/edit comments, etc…
Hi,
Is there an API endpoint for comments?
I’m in the process of migrating a bunch of previous Wordpress comments so have all details but I can’t find any documentation on a comment endpoint.
Any ideas how to programmtically insert comments.
You’re reply suggests there are options that could be available for what I’m looking to do.
Creating a bunch of comments via API would be bit complex because you have to build fake member accounts, simulate login through API, then make comments.
my site has been on Wordpress since 2010. I’ve already migrated the content into Ghost. I’ve already created the non-fake member accounts for a small batch of comments that I have exported from my Wordpress instance.
The comments are detailed with the relationship to any parent comment and I have Admin API access and using n8n to establish any related database entries.
My question was whether there’s an endpoint or API details on how to do it.
There is no official documentation available. You can submit a comment and see how the comment API works by opening your browser’s developer tools, observing the API calls under the ‘Network’ tab, and finding the comment API and its parameters when you submit a comment