How to create a comment using comments API

How to create a comment using comments API?

please try this

curl -i -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization: Bearer YOUR-ACCESS-TOKEN" -XPOST "https://gorest.co.in/public/v2/comments" -d '{"post_id":123, "name":"Sanya Varma", "email":"sanya_varma@schiller-konopelski.co", "body":"this is how we can create a comment"}'

Similar code should work with any other language also, just make sure the post_id used is available in GET /public/v2/posts


Little markdown supported