Request I'm sending: curl --location --request POST 'https://gorest.co.in/public/v2/posts/457749/comments' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer 9d....080' \ --data-raw '{ "post": "5375", "name": "NameNew", "email": "Waino.Dickinson92@gmail.com", "body": "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. " }'
Response with code 422: [ { "field": "post", "message": "must exist" } ]
Maybe I'm missing something? Any help would be nice. Also the post id is correct I've check that with GET request
Try post_id insted of post.
You don't need to pass post I'd as you are using nested url, just remove post and try, the post I'd in the url 457749 must exist