API documentation

Retrieve comments

GET /v1/comments/{slug}

This slug can only contain letters (lowercase), numbers and/or dashes (-). E.g. docs-api-v1.
The slug is the unique identifier for a page.

Tip! use the path as a starting point and replace slashes with dashes. E.g. /docs/api -> docs-api

Fields

Field Notes
id Comment unique identifier, base36 value
name Name of the commenter
text The actual comment/message.
timestamp Timestamp in UTC of when the comment was made.
responses List of response comments, with same structure as top level comments.

Response codes

Code Reason
200 Succesful request, see examples below
403 Your domain is not authorized or your subscription ran into limits

Example response bodies

Single comment response

[
    {
        "id": "ISLHEFHS1Z",
        "name": "test",
        "text": "Hello, this is a test comment to check happy flow.",
        "timestamp": "2021-11-14T19:11:03.229435Z",
        "responses": null
    }
]

Nested comment response

[
    {
        "id": "ISLHEFHS1Z",
        "name": "test",
        "text": "Hello, this is a test comment to check happy flow.",
        "timestamp": "2021-11-14T19:11:03.229435Z",
        "responses": [
            {
                "id": "UFYMBTJYOO",
                "name": "test2",
                "text": "Hello, this is a test comment to check happy flow.",
                "timestamp": "2021-11-14T19:11:03.229435Z",
                "responses": null
            }
        ]
    }
]

Multiple comment response

[
    {
        "id": "ISLHEFHS1Z",
        "name": "test",
        "text": "Hello, this is a test comment to check happy flow.",
        "timestamp": "2021-11-14T19:11:03.229435Z",
        "responses": null
    },
    {
        "id": "UFYMBTJYOO",
        "name": "test2",
        "text": "Hello, this is a test comment to check happy flow.",
        "timestamp": "2021-11-14T19:11:03.229435Z",
        "responses": null
    }
]

Create comment

POST /v1/comments/{slug}

This slug can only contain letters (lowercase), numbers and/or dashes (-). E.g. docs-api-v1.
The slug is the unique identifier for a page.

Tip! use the path as a starting point and replace slashes with dashes. E.g. /docs/api -> docs-api

Fields

Field Required Notes
name true Has to be between 2 and 255 characters long.
text true Has to be between 50 and 5000 characters long.
parent false Has to be a valid id, consisting of base36 characters. ^[A-Z0-9]+$
privacy true Indicates if privacy policy has been accepted should be either ‘true’ or ‘false’

Response codes

Code Reason
201 Comment is added
403 Your domain is not authorized or your subscription ran into limits
404 The comment did not pass validation
418 The privacy boolean was false

Example request bodies

{
    "name": "tester",
    "text": "Hello, this is a test comment to check happy flow.",
    "privacy": "true"
}