Documentation

/groups/{contentId}/users [POST]

ThoughtFarmer REST API Method: /groups/{contentId}/users

Add users to a group.

URL:
http://yourserver.com/api/groups/{contentId}/users

Response Formats:
JSON, XML

HTTP Method(s):
POST

Requires Authentication:
true, user making call must pass a valid token parameter and must have edit permissions. Also, the group membership state must be set to allow modifying the members of the group.

Parameters:

Parameter Type Description
contentId int Required. The contentId of the group to add the members to
userIds array[int] Required. An array of user ids to add to the group
token string Required. A valid token authentication parameter

Response Status Codes:
200 - Update successful
400 - No user ids provided
401 - Token parameter is invalid
403 - No permission to modify group membership
404 - Group not found

Example request
POST http://yourserver.com/api/group/{contentId}/users
  Content-Type: application/json
[ 189, 100, 168 ]
{
    "added": [
        {
            "userId": 189,
            "contentId": 1073,
            "firstName": "Ryan",
            "lastName": "Criddle",
            "preferredName": "asdfasfd",
            "email": "ryan@openroad.ca",
            "username": "ryan",
            "jobTitle": "",
            "phoneFax": "",
            "phoneMobile": "",
            "phoneTel": "asdf",
            "timeZone": "Eastern Standard Time",
            "defaultCulture": "en",
            "birthday": "0001-01-01T00:00:00",
            "images": {
                "small": "/profileimage/193821700000/1357/50x50/False/0,0,200,200/test.png",
                "medium": "/profileimage/193821700000/1357/250x250/False/0,0,200,200/test.png",
                "large": "/profileimage/193821700000/1357/0x0/False/0,0,200,200/test.png"
            }
        }
    ],
    "failed": [ 100, 168 ]
}