wp.posts().create({
title: 'Your Post Title',
content: 'Your post content',
date: new Date("2022-09-01")
status: 'scheduled'
}).then(function( response ) {
// "response" will hold all properties of your newly-created post,
// including the unique `id` the post was assigned on creation
console.log( response.id );
})
Can I do something like following code ?