Authors API¶
The author API supports the creation of users that can create post drafts.
Creating authors¶
Creates an author and sets its role as a guest editor.
POST /api/1.1/authors
Parameters¶
Name | Type | Description |
---|---|---|
first_name |
String | First name - Optional |
last_name |
String | Last name - Optional |
email |
String | User email - Optional |
password |
String | User password - Optional |
name |
String | Slug - Optional |
about_html |
String | User biography - Optional |
image_id |
Integer | ID of the uploaded image - Optional |
specific_data |
Object | Specific data - Optional |
Note
image_id
can be found asid
in the Image API response when images are uploaded or edited.specific_data
can be used to store custom information related to authors and then validated with a configured schema, if necessary. Ask your account manager for more information if this is something you will need.
Response¶
{
"id": <id>,
"name": "andreabreanna",
"displayname": "Andrea Breanna",
"about_html": "This is me",
"bio": "",
"photo": "https://<domain>/res/avatars/default",
"fb_id": null,
"profile_url": "https://<domain>/u/andreabreanna/",
"specific_data": {}
}
Editing authors¶
Edits an author’s information.
PUT /api/1.1/authors/<id>
Parameters¶
Name | Type | Description |
---|---|---|
first_name |
String | First name - Optional |
last_name |
String | Last name - Optional |
email |
String | User email - Optional |
password |
String | User password - Optional |
name |
String | Slug - Optional |
about_html |
String | User biography - Optional |
image_id |
Integer | ID of the uploaded image - Optional |
specific_data |
Object | Specific data - Optional |
Note
first_name
andlast_name
are both required.- If the user signed up using a social network, the
password
field cannot be set unless an email value is also set. image_id
can be found asid
in the Image API response when images are uploaded or edited.specific_data
can be used to store custom information related to authors and then validated with a configured schema, if necessary. Ask your Account Manager for more information if this is something you will need.
Response¶
{
"id": <id>,
"name": "andreabreanna",
"displayname": "Andrea Breanna",
"about_html": "This is me",
"bio": "",
"photo": "https://<domain>/res/avatars/default",
"fb_id": null,
"profile_url": "https://<domain>/u/andreabreanna/",
"specific_data": {}
}
Get a single author¶
Fetch a single author by ID.
GET /api/1.1/authors/<id>
Response¶
{
"id": <id>,
"name": "andreabreanna",
"displayname": "Andrea Breanna",
"about_html": "This is me",
"bio": "",
"photo": "https://<domain>/res/avatars/default",
"fb_id": null,
"profile_url": "https://<domain>/u/andreabreanna/",
"specific_data": {}
}
List authors¶
Fetches authors’ information ordered by ID in descending order.
GET /api/1.3/authors/search
Parameters¶
Name | Type | Description |
---|---|---|
offset |
Integer | Offset – Optional |
limit |
Integer | Limit – Optional, defaults to 10, maximum value is 30 |
Response¶
[
{
"id": <id>,
"name": "andreabreanna",
"displayname": "Andrea Breanna",
"about_html": "This is me",
"bio": "",
"photo": "https://<domain>/res/avatars/default",
"fb_id": null,
"profile_url": "https://<domain>/u/andreabreanna",
"specific_data": []
}
]