Skip to content

Create Comment ​

Resource URL ​

https://api.multividas.com/rest/v1/threads/{thread:id}/comments

Resource Information ​

MethodPOST
Response formatsJSON
Requires authentication?YES

Parameters ​

Param NameParam TypeDescriptionRequired
contentStringThe main content of the commentYes
statusObjectValues indicating the status of the comment, including anonymous status. Status

Status Details ​

FieldTypeDescriptionRequired
isAnonymouslyStringIndicates if the comment is anonymous or notYes

Request Body (JSON) ​

json
{
  "content": "Nice !",
  "status": {
    "isAnonymously": true
  }
}

Response [422] ​

json
{
    "info": "The given data was invalid.",
    "code": 422,
    "meta": {
        "fields": {
            "content": [
                "Content field is required."
            ]
        }
    }
}

Response [201 Created] ​

json
{
    "data": {
        "id": "01hered6ssgz8en3prvn5kx1jp",
        "content": "Nice !",
        "isAnonymously": true,
        "likesCount": 0,
        "user": null,
        "tags": [],
        "createdAt": "2023-11-09T16:08:03.000000Z",
    },
    "code": 200,
    "meta": {}
}

Released under the MIT License.