Json api create comments I am using the JSON API module and I would like to create a comment. I was able to create nodes based on the documentation found here, but I can't figure out how to create comments.

How can I add a comment using that module? I managed to do it through the default REST API module.
It follows the same pattern in the POST request with relationships section of the docs you linked to.


Your endpoint will be /jsonapi/comment/$MY_COMMENT_TYPE.
Your data payload will need to contain both the data property (the  comment's properties) and relationships property (which will contain the comment's author &amp; the entity reference commented on). To get a more concrete example of your data payload, perform a GET /jsonapi/comment/$MY_COMMENT_TYPE to see examples of existing comments.