Skip to main content

POST /cards/{cardId}/comments

Description

Adds one or more new comments to a card and returns a JSON object containing the ID of the newly added comment.

This route processes HTTP POST requests sent to the /cards/{cardId}/comments endpoint.

Payload

The server expects a JSON object with the following properties:

NameTypeDescription
textstringRequired. The content of the comment.
dateobjectRequired. The date when the comment was made.

Example:

{
"text": "The comment content",
"date": "2023-05-18T09:13:56.656Z",
}

Response

The response includes a JSON object with the ID of the newly added comment.

Example:

{ 
"id": 1
}

The HTTP status code indicates whether the request was successful (response.status == 200) or encountered an error (response.status == 500).


Related articles: Working with server