Authors API¶
The author API supports the creation of users that can create post drafts.
Creating authors¶
Creates an author.
POST /api/1.1/authors
Parameters¶
Name |
Type |
Description |
|---|---|---|
|
String |
First name - Optional |
|
String |
Last name - Optional |
|
String |
User email - Optional |
|
String |
User password - Optional |
|
String |
Slug - Optional |
|
String |
User biography - Optional |
|
Integer |
ID of the uploaded image - Optional |
|
Object |
Specific data - Optional |
|
String |
Role - Optional - Defaults to
|
|
String |
Status - Optional - Defaults to
|
Note
image_idcan be found asidin the Image API response when images are uploaded or edited.specific_datacan 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.rolealso accepts custom user roles if your site has the feature enabled.
Response¶
{
"id": <id>,
"name": "andreabreanna",
"displayname": "Andrea Breanna",
"first_name": "Andrea",
"last_name": "Breanna",
"about_html": "This is me",
"bio": "",
"photo": "https://<domain>/res/avatars/default",
"fb_id": null,
"profile_url": "https://<domain>/u/andreabreanna/",
"status": "active",
"specific_data": {}
}
Editing authors¶
Edits an author’s information.
PUT /api/1.1/authors/<id>
Parameters¶
Name |
Type |
Description |
|---|---|---|
|
String |
First name - Optional |
|
String |
Last name - Optional |
|
String |
User email - Optional |
|
String |
User password - Optional |
|
String |
Slug - Optional |
|
String |
User biography - Optional |
|
Integer |
ID of the uploaded image - Optional |
|
Object |
Specific data - Optional |
|
String |
Role - Optional Choices available:
|
|
String |
Status - Optional Choices available:
|
Note
first_nameandlast_nameare both required.If the user signed up using a social network, the
passwordfield cannot be set unless an email value is also set.image_idcan be found asidin the Image API response when images are uploaded or edited.specific_datacan 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.rolealso accepts custom user roles if your site has the feature enabled.
Response¶
{
"id": <id>,
"name": "andreabreanna",
"displayname": "Andrea Breanna",
"first_name": "Andrea",
"last_name": "Breanna",
"about_html": "This is me",
"bio": "",
"photo": "https://<domain>/res/avatars/default",
"fb_id": null,
"profile_url": "https://<domain>/u/andreabreanna/",
"status": "active",
"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",
"first_name": "Andrea",
"last_name": "Breanna",
"about_html": "This is me",
"bio": "",
"photo": "https://<domain>/res/avatars/default",
"fb_id": null,
"profile_url": "https://<domain>/u/andreabreanna/",
"status": "active",
"specific_data": {}
}
List authors¶
Fetches authors’ information ordered by ID in descending order.
GET /api/1.3/authors/search
Parameters¶
Name |
Type |
Description |
|---|---|---|
|
Integer |
Offset – Optional |
|
Integer |
Limit – Optional, defaults to 10, maximum value is 30 |
Response¶
[
{
"id": <id>,
"name": "andreabreanna",
"displayname": "Andrea Breanna",
"first_name": "Andrea",
"last_name": "Breanna",
"about_html": "This is me",
"bio": "",
"photo": "https://<domain>/res/avatars/default",
"fb_id": null,
"profile_url": "https://<domain>/u/andreabreanna",
"status": "active",
"specific_data": []
}
]
Search authors by email¶
Fetches authors’ information by email addresses.
GET /api/1.3/authors/email
Parameters¶
Name |
Type |
Description |
|---|---|---|
|
String |
Required – Multiple emails can be received with a comma-separated string |