The built in commenting system creates comments like this on the /members/api/comments/ endpoint:
{
html: "<p>this is another comment!</p>"
post_id: "63b95d863fdfa4003dabcfb9"
status: "published"
}
It determines who is commenting from the logged in user.
More promising is this endpoint: /ghost/api/admin/comments , used to hide comments. A PUT there takes:
{comments: [{id: "63c18ccd3dd8d5003daba86e", status: "hidden"}]}
I think the odds are pretty good that it’ll also take the other fields in comments! Try it!
Here’s the comments object Ghost returns when you visit a page with comments - that gives you the field names Ghost wants, which can probably be used at that admin endpoint above:
{
"comments": [
{
"id": "63c18ccd3dd8d5003daba86e",
"status": "hidden",
"html": null,
"created_at": "2023-01-13T16:54:37.000Z",
"edited_at": null,
"member": {
"id": "63bec12abc71c1003de57b11",
"uuid": "a7c5a097-2520-4021-96a9-d2dd5fec7386",
"name": "Trialing member",
"expertise": null,
"avatar_image": "https://www.gravatar.com/avatar/b8d37e3eaee25bf0fb8617ed9edf089e?s=250&r=g&d=blank"
},
"replies": [],
"liked": false,
"count": {
"replies": 0,
"likes": 0
}
},
{
"id": "63c18b7e3dd8d5003daba86d",
"status": "published",
"html": "<p>this is another comment!</p>",
"created_at": "2023-01-13T16:49:02.000Z",
"edited_at": null,
"member": {
"id": "63bb62f6756b27003d3c1c0a",
"uuid": "2e69ea47-26a8-4a91-bd1c-71834ffcb6d0",
"name": "My paid user",
"expertise": "I have some expertise!",
"avatar_image": "https://www.gravatar.com/avatar/915c787bf1ec21f92d29a1b35df4535a?s=250&r=g&d=blank"
},
"replies": [],
"liked": false,
"count": {
"replies": 0,
"likes": 0
}
},
{
"id": "63c18b5f3dd8d5003daba86c",
"status": "published",
"html": "<p>I'm making a comment here!</p>",
"created_at": "2023-01-13T16:48:31.000Z",
"edited_at": null,
"member": {
"id": "63bb62f6756b27003d3c1c0a",
"uuid": "2e69ea47-26a8-4a91-bd1c-71834ffcb6d0",
"name": "My paid user",
"expertise": "I have some expertise!",
"avatar_image": "https://www.gravatar.com/avatar/915c787bf1ec21f92d29a1b35df4535a?s=250&r=g&d=blank"
},
"replies": [],
"liked": false,
"count": {
"replies": 0,
"likes": 0
}
}
],
"meta": {
"pagination": {
"page": 1,
"limit": 5,
"pages": 1,
"total": 3,
"next": null,
"prev": null
}
}
}