'POST Request for ACF plugin is not working

I am trying to publish a post in WP using rest api. I need some extra field too. So I have installed ACF plugin to insert extra field. After sending the request it returning 201 (post is created) but extra field value remaining empty(not updating).

                data = {
                    "title": (data['title']),
                    "content": (data['full_content']),
                    "author": 1,
                    "status": "draft",
                    "featured_media": get_image_id,
                    "acf" : {
                            "intro": "another try"
                    }
                    
                }
                response = requests.post(url, headers=headers, json=post_data)

Here intro is my custom field. In ACF plugin REST API option is True and in get request acf values showing empty value.So how can I insert extra field value?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source