I used the CPT to create a post type UserQuestion
with a few fields, such as ip_data
. I want to be able to create one of this posts through API. So I looked into WP REST API .
However, the API offers /v2/user_question
:
{
"title" : "test2",
"slug": "user_question",
"status": "publish",
"post_type": "user_question",
"meta": {
"ip" : "1111",
"question": "test question",
"answer": "yes, the answer"
}
}
The post is created, but it's not updating the customized fields data.
How should I make the request?