Support

Account

Home Forums General Issues Rest API call to add new POST together with acf fields

Unread

Rest API call to add new POST together with acf fields

  • Hi, I am adding a new post to wordpress using the rest API.
    For testing purposes, I am using restninja.io

    Adding the post with title and content works perfectly fine.
    But when I try to add acf fields, it does not work.

    So here is what i tried (different versions):
    /wp-json/wp/v2/posts?title=test&content=abc&fields={“productname”: “test”}
    /wp-json/wp/v2/posts?title=test&content=abc&acf={“productname”: “test”}
    /wp-json/wp/v2/posts?title=test&content=abc&fields={\”productname\”: \”test\”}
    /wp-json/wp/v2/posts?title=test&content=abc&fields=[“productname”: “test”]

    Adding the post to WordPress works.
    However, the ACF field remains empty.

    What am I missing / doing wrong ?
    Thanks

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.