LoudVoice API \ Authors \ Create new author

Resource/URI - Discussions GET POST PUT DELETE
Discussions /loudvoice/discussions.json List all discussions Create a discussion
Discussion /loudvoice/discussions/<discussion_token>.json /loudvoice/discussions/discussion.json?
discussion_reference=<discussion_reference>
Read a discussion Update a discussion Delete a discussion
Discussion messages /loudvoice/comments/<discussion_token>/comments.json /loudvoice/discussions/discussion/comments.json?
discussion_reference=<discussion_reference>
Read discussion comments
Resource/URI - Authors GET POST PUT DELETE
Authors /loudvoice/authors.json List all authors Create an author
Author /loudvoice/authors/<author_token>.json /loudvoice/authors/author.json?
author_reference=<author_reference>
Read an author Update an author Delete an author
Resource/URI - Author Sessions GET POST PUT DELETE
Author Sessions /loudvoice/authors/sessions.json Create/Update a session
Author Session /loudvoice/authors/sessions/<session_token>.json Delete a session
Resource/URI - Comments GET POST PUT DELETE
Comments /loudvoice/comments.json List all comments Create comment
Comment /loudvoice/comments/<comment_token>.json Read a comment Update comment Delete a comment

Workflow

Request: the code to send to the API

Send a POST request with the data below to the endpoint /loudvoice/authors.json to create a new author.

POST data that can be included in the request

    {
        "request":{
            "author":{
              "author_reference": "#author_reference#",
              "name": "#name#",              
              "email": "#email#",
              "description": "#description#",
              "picture_url": "#picture_url#",
              "website_url": "#website_url#"              
        }
    }
        
Key Description
Reference
author_reference
string
Your custom reference for this author, e.g. the unique id of the user in your system.
The value must be unique amongst all authors.
Example : USER-123456
Metadata
* name
string
Author name, as displayed in the LoudVoice widget
Example: John Doe
email
string
Author email address
Example: john.doe@oneall.com
description
string
Author description
Example: An unknown author
picture_url
string, uri
The fully qualified URL of the author's avatar
Example: https://graph.facebook.com/12789/picture?type=small
website_url
string, uri
The fully qualified URL of the author's website
Example: http://www.example.com/

Result: the code returned by the API

The API will either return a HTTP status code 201 on success or an appropriate message body with further details on the error that occured.

Resultset Example

 {
  "response": {
    "request": {
      "date": "Fri, 06 Apr 2018 12:49:38  0200",
      "resource": "/loudvoice/authors.json",
      "status": {
        "flag": "created",
        "code": 201,
        "info": "Your request has been processed successfully and resulted in a new resource being created"
      }
    },
    "result": {
      "data": {
        "author": {
          "author_token": "6055a380-549d-45d1-b51e-015aaa0882cc",
          "author_reference": null,
          "name": "John Doe",
          "email": "john.doe@example.com",
          "description": null,
          "picture_url": "http://www.example.com/john-doe/picture.jpg",
          "website_url": "http://www.example.com/",
          "num_comments": 0,
          "date_last_comment": null,
          "date_creation": "Fri, 06 Apr 2018 12:49:38  0200",
          "date_last_update": null
        }
      }
    }
  }
}

User Contributed Notes