Looking for update Rankmath Post Details by API

#574231
  • Resolved Vivek
    Rank Math free

    Hi,

    I’m looking for an API to create/update rank math meta details like focus keyword and schema (job posting). I’m trying to create a WordPress post remotely via rest API. For that post I need to create job posting schema via API. Please help me to find the API for that.

    Thank you.

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you so much for getting in touch.

    It’s not possible to do that via the REST API with our plugin. What you can do is update the data from the postmeta table after the post creation using the WordPress REST API using the following route:

    
    /wp/v2/posts/{post_id}/meta
    

    Then you need to pass the meta key-value pairs like so:

    
    {
      "meta": {
        "meta_key1": "meta_value1",
        "meta_key2": "meta_value2"
      }
    }
    

    The data for the Schema cannot be updated like so, but all the others such as focus keywords, titles, and descriptions can.

    The meta keys for those are rank_math_title, rank_math_description, and rank_math_focus_keyword.

    Don’t hesitate to get in touch if you have any other questions.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘Looking for update Rankmath Post Details by API’ is closed to new replies.