I managed it to create single posts with a simple JSON object via the WP REST API like…

{
  title: "My Title",
  content: "My Content",
  excerpt: "My Excerpt"
}

I’m wondering, if there is a way to create multiple posts in one go, like…

{
  "posts": [
    {
      title: "My title 1",
      content: "My content 1",
      excerpt: "My excerpt 1"
    },
    {
      title: "My title 2",
      content: "My content 2",
      excerpt: "My excerpt 2"
    }
  ]
}

Couldn’t find any information to this. There are only examples to create on post at at time.

0

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *