Update Yoast Focus keyphrase _yoast_wpseo_focuskw via cURL

52 Views Asked by At

I am trying to update the Focus keyphrase for a post via cURL, however, it does not insert nor update the Post.

Here is my curl. Any ideas what I'm missing, or what am I doing wrong? (I'm trying different variables below because I'm not sure which is the right one).

curl -X PATCH -u myusername:password -H "Content-Type: application/json" -d '{"meta_data": [{"key": "_yoast_wpseo_focuskw", "value": "test one"}, {"key": "yoast_wpseo_focuskw", "value": "test two"}]}' https://www.example.com/wp-json/wp/v2/posts/405

*From the above request I'm getting 200 response, but it does not update!

0

There are 0 best solutions below