Adding Authors via the REST API

PublishPress Authors does integrate with WordPress' REST API.

Adding posts via should be handled by the core WordPress REST API. In the PublishPress Authors plugin, authors are created as taxonomies. This article explains the data structure in PublishPress Authors.

To assign authors when creating posts, you can assign taxonomy terms to your posts. In this example code, ppma_author is REST API slug. 87 is the taxonomy term ID for the author.

{
"title": "The story of Dr Foo",
"content": "This is the story content",
"ppma_author": [87],
"status":"publish",
"excerpt":"Dr Foo story"
}

Here is another approach to that code with 87 and 103 as the term IDs for authors.

[
'title' => 'The story of Dr Foo',
'content' => 'This is the story content',
'ppma_author' => [87, 103],
'status' => 'publish',
'excerpt' => 'Dr Foo story'
]

Professional publishing plugins for WordPress! Get PublishPress