Authors API =========== .. contents:: :depth: 2 The author API supports the creation of users that can create post drafts. Creating authors ---------------- Creates an author. .. code:: 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 ``role`` String Role - Optional - Defaults to ``Guest Editor`` Choices available: - ``Administrator`` - ``Editor`` - ``Guest Editor`` - ``Guest Writer`` - ``Reader`` - ``Developer`` - ``Guest Developer`` - ``Platform Engineer`` - ``Serverside Engineer`` - ``Community User`` ====================== ======= ============================================== .. note:: * ``image_id`` can be found as ``id`` 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. * ``role`` also accepts custom user roles if your site has the feature enabled. Response ******** .. code:: json :force: { "id": , "name": "andreabreanna", "displayname": "Andrea Breanna", "about_html": "This is me", "bio": "", "photo": "https:///res/avatars/default", "fb_id": null, "profile_url": "https:///u/andreabreanna/", "specific_data": {} } Editing authors ---------------- Edits an author's information. .. code:: PUT /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 ``role`` String Role - Optional Choices available: - ``Administrator`` - ``Editor`` - ``Guest Editor`` - ``Guest Writer`` - ``Reader`` - ``Developer`` - ``Guest Developer`` - ``Platform Engineer`` - ``Serverside Engineer`` - ``Community User`` ====================== ======= ========================================== .. note:: * ``first_name`` and ``last_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 as ``id`` 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. * ``role`` also accepts custom user roles if your site has the feature enabled. Response ******** .. code:: json :force: { "id": , "name": "andreabreanna", "displayname": "Andrea Breanna", "about_html": "This is me", "bio": "", "photo": "https:///res/avatars/default", "fb_id": null, "profile_url": "https:///u/andreabreanna/", "specific_data": {} } Get a single author ------------------- Fetch a single author by ID. .. code:: GET /api/1.1/authors/ Response ******** .. code:: json :force: { "id": , "name": "andreabreanna", "displayname": "Andrea Breanna", "about_html": "This is me", "bio": "", "photo": "https:///res/avatars/default", "fb_id": null, "profile_url": "https:///u/andreabreanna/", "specific_data": {} } .. _list-authors: List authors ------------ Fetches authors' information ordered by ID in descending order. .. code:: 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 ******** .. code:: json :force: [ { "id": , "name": "andreabreanna", "displayname": "Andrea Breanna", "about_html": "This is me", "bio": "", "photo": "https:///res/avatars/default", "fb_id": null, "profile_url": "https:///u/andreabreanna", "specific_data": [] } ] Search authors by email ----------------------- Fetches authors' information by email addresses. .. code:: GET /api/1.3/authors/email Parameters ********** ====================== ======= ========================================================================= Name Type Description ====================== ======= ========================================================================= ``emails`` String Required -- Multiple emails can be received with a comma-separated string ====================== ======= =========================================================================