Skip to content

HTTP API

This document contains documentation on ConvoComet’s HTTP API.

Comments

Post a comment

RouteVerbProtectedRequest Body
/api/comments/[siteId]/[pageId]POSTSchema

To post a comment, send a POST request to /api/comments/[siteId]/[pageId] with a request body matching the above schema, encoded as either a URLEncoded form result or JSON. If you are signed in when doing this, the comment will automatically be attributed to you. Otherwise, it will be considered anonymous and will use the author field of the passed JSON.

Get comments

RouteVerbProtectedRequest Body
/api/comments/[siteId]/[pageId]GETNone

To get a list of comments for a given site and page, send a GET request to /api/comments/[siteId]/[pageId]. As it is a GET request, there is no request body, and it does not matter whether the request is signed in.

Delete a comment

RouteVerbProtectedRequest Body
/api/comment/[commentId]DELETENone

To delete a published comment, send a GET request to /api/comments/[siteId]/[pageId]. There is no request body required, but the request must be signed in as the owner of the instance.

Approve a comment

RouteVerbProtectedRequest Body
/api/comments/[siteId]/approveGETNone (commentId passed as comment in query params)

To approve a comment in the moderation queue, send a GET request to /api/comments/[siteId]/approve?comment=[commentId]. [commentId] should refer to the id of a comment currently in the moderation queue. This route is not necessary for instances with moderation disabled. Note that you will need to be signed in as the owner of the instance.

Reject a comment

RouteVerbProtectedRequest Body
/api/comments/[siteId]/rejectGETNone (commentId passed as comment in query params)

To reject a comment in the moderation queue, send a GET request to /api/comments/[siteId]/reject?comment=[commentId]. The request signature should be the same as comment approval, except for the different route. [commentId] should refer to the id of a comment currently in the moderation queue. This route is not necessary for instances with moderation disabled. Note that you will need to be signed in as the owner of the instance.