To add a new comment to either a segment or a document. Comments can indeed be attached to different objects.
The parameters are a JSON object included in the request body:
The scope object. The segment must be within the scope.
Type of comment to add:
|sid||The segment id. Required if you add a segment level comment.||Optional|
|did||The document id. Required if you add a document level comment.||Optional|
The comment text. Plain text.
The locale to which the comment is attached. This can be a source or target locale.
|cat||Optionally, the comments category. Defines the category (a name) as well as visual style.||Optional|
The comment status if it's solved or not. (true) means the comment is solved. (false) means the comment is not solved.
Sending the value as null or not sending it (the system will set it to false by default).
A JSON object with the full comment details. See Comment (Object) for details.