• Resolved stekone

    (@stekone)


    Hello,

    I would like your help to add metadata when using WP API:

    I’m using WordPress REST API to create blog posts and I would like to fill Yoast field using REST API.

    Request POST : https://mysite/wp-json/wp/v2/posts/

    JSON :

    {
    “title”: “Your Title”,
    “content”: “Your Content”,
    “meta”: {
    “_yoast_wpseo_title”: “SEO Title”,
    “_yoast_wpseo_metadesc”: “SEO Desc”
    “_yoast_wpseo_focuskw’”: “my keyword”
    }
    }

    I tried many things but nothing is working ( I tired “meta” “yoast_meta”, and many many)

    Maybe I have to create custom api fields, do you have any documentation ?

Viewing 1 replies (of 1 total)
  • Plugin Support Maybellyne

    (@maybellyne)

    Hello @stekone,

    Thanks for using the Yoast SEO plugin. Yoast SEO exposes several APIs, which are designed to help advanced users, developers, and integrators to access and manipulate our data and outputs. You may find some pointers in our API documentation.

Viewing 1 replies (of 1 total)
  • The topic ‘Add metadata when posting with WP API REST’ is closed to new replies.