site-controller

Create a comment or a reply

post/api/sites/{slug}/comments

Request

  • Base URL: https://api.pagegoat.com
  • URL: https://api.pagegoat.com/api/sites/{slug}/comments
  • Auth: HTTP bearer

Path parameters

slugstring required

Request body

bodystring required

The comment text. Required; blank is rejected with 400.

anchorTextstring nullable

The selected text, when you have no full anchor to send. Ignored if anchor.text is present.

parentIdstring uuid nullable

Thread root, to post a reply. Omit for a top-level comment. Replying to a reply is rejected with 400.

Example request

{
  "body": "Can we soften this headline?",
  "anchorText": "Grow Faster With Smarter Marketing",
  "anchor": {
    "text": "Grow Faster With Smarter Marketing",
    "prefix": "Welcome to NovaFlow. ",
    "suffix": " Launch campaigns, reach more customers",
    "start": "body > section:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(1)",
    "startOffset": 36,
    "end": "body > section:nth-of-type(2) > div:nth-of-type(2) > p:nth-of-type(1)",
    "endOffset": 50,
    "page": "/",
    "version": 1
  }
}

Response

The created comment.

Changes

No recorded changes to this operation across all 1 revision of this API.