working with rest api. i can able to create a new post to wp using http://v2.wp-api.org/. problem is i cannot assign a category to newly created post new posts created are all uncategorized . my working example follows
{
"title":"My New Title",
"type":"post",
"content":"this is my new content",
"terms":{
"category":[
{
"name":"sports"
}
]
}
am i completely on the wrong path. can any one show some light on how to assign category to newly created post.thanks in advance