How to insert Comment metadata via REST API

I am trying to insert comment from my android app , i am using REST API and POST method

/wp-json/wp/v2/comments/

The method is working great , but I would like to include metadata when inserting the comment , to replace this line :

add_comment_meta( $comment->comment_ID, 'comment_type', 'answer', true );

i tried inserting type with parameters but i get :
rest_invalid_comment_type

I tried ‘ meta ‘ and i got the error :
rest_invalid_param

So is there a way to insert a comment with metadata in one POST request

Thank you

0

Leave a Comment