Documentation

/users [POST]

ThoughtFarmer REST API Method: /users [POST]

Adds a user to ThoughtFarmer. Returns newly created user when successful.

URL:
http://yourserver.com/api/users

Response Formats:
JSON

HTTP Method(s):
POST

Requires Authentication:
true, user making call must pass a valid token parameter

Parameters:

Parameter Type Description
firstName string(100) Required. The first name of the user to add
lastName string(100) Required. The last name of the user to add
email string(255) The email address of the user to add. Must be a valid email and must not already be assigned to another user
username string(255) Required. The username of the user to add. eg. tf\joesmith
authenticationStore string Required. This value must be either ActiveDirectory or Database
userServiceUniqueIdentifier string The authentication provider Guid (if using Active Directory authentication store)
token string Required. A valid token authentication parameter

Response Status Codes:
200 - User created successfully
400 - Validation errors
401 - Token parameter is invalid
403 - No permissions to make update
409 - Conflict with existing user (username/email already exists)

Example request
POST http://yourserver.com/api/users
  Content-Type: application/json
{
    "firstName": "Test",
    "lastName": "Person",
    "username": "testperson",
    "email": "tester@test.com",
    "authenticationStore": "Database"
}
{
    "userId": 2216,
    "contentId": 10544,
    "firstName": "Ryan",
    "lastName": "Tester",
    "preferredName": "",
    "email": "ryan.tester.66666@test.com",
    "username": "ryantester66666",
    "jobTitle": "",
    "phoneNumbers": {
        "fax": "",
        "mobile": "",
        "tel": ""
    },
    "phoneFax": null,
    "phoneMobile": null,
    "phoneTel": null,
    "timeZone": "Eastern Standard Time",
    "defaultCulture": "en",
    "birthday": "0001-01-01T00:00:00",
    "images": {
        "small": "/themeimage/288000000000/347/50x50/False/profile-default.png",
        "medium": "/themeimage/288000000000/347/250x250/False/profile-default.png",
        "large": "/themeimage/288000000000/347/0x0/False/profile-default.png"
    }
}