PUT /api/users/:user_id

update the authenticated user or another user as a community admin

Success Response Code: 200

Params

Param name Description
user_id
required

id of user


Value: Must be a Integer
activate_user
optional

automatically activate the user or not (default=false)


Value: Must be one of: <code>true</code>, <code>false</code>.
skip_joined_notifications
optional

Do not send the user a welcome email or post a welcome message to the stream on their behalf (only effective when activate_user is also true) (default=false)


Value: Must be one of: <code>true</code>, <code>false</code>.
user
optional

Value: Must be a Hash
user[first_name]
required

first name of the user


Value: Must be a String
user[last_name]
required

last name of the user


Value: Must be a String
user[title]
optional

title of the user


Value: Must be a String
user[profile_photo_url]
optional

set the profile picture to the picture from this URL link


Value: Must be a String
user[profile_photo]
optional

Value: Must be a Hash
user[profile_photo][data]
optional

set the profile picture to a file upload from the local file path


Value: Must be a File
user[roles]
optional

Value: Must be a Hash
user[roles][tenant_admin_role]
optional

flag to set tenant admin role


Value: Must be one of: <code>true</code>, <code>false</code>.
user[contact_info]
optional

Value: Must be a Hash
user[contact_info][cell_phone]
optional

Value: Must be a String
user[contact_info][office_phone]
optional

Value: Must be a String
user[contact_info][aim]
optional

Value: Must be a String
user[contact_info][google_talk]
optional

Value: Must be a String
user[contact_info][yahoo]
optional

Value: Must be a String
user[contact_info][skype]
optional

Value: Must be a String
user[contact_info][jabber]
optional

Value: Must be a String
user[contact_info][msn]
optional

Value: Must be a String
user[contact_info][location]
optional

Value: Must be a String
user[contact_info][twitter]
optional

Value: Must be a String
user[contact_info][lync]
optional

Value: Must be a String
user[contact_info][google_talk]
optional

Value: Must be a String

Response Fields

user see #show for details User

Example Curl Commands

curl -X PUT -v --basic -u "emily@socialcast.com:demo" "https://demo.socialcast.com/api/users/25.json" -H"Content-Type: application/json" -d'{"user":{"first_name":"EmilyChanged"}}'
curl -X PUT -v --basic -u "emily@socialcast.com:demo" "https://demo.socialcast.com/api/users/25.json" -H"Content-Type: application/json" -d'{"user":{"profile_photo_url": "http://www.socialcast.com/sites/default/files/Logos/logo.png"}}'
curl -X PUT -v --basic -u "emily@socialcast.com:demo" "https://demo.socialcast.com/api/users/25.json" -F"user[profile_photo][data]=@./socialcast.jpg"
curl -X PUT -v --basic -u "admin@server.com:admin_password" "https://demo.socialcast.com/api/users/25.json" -H"Content-Type: application/json" -d'{"user":{"roles":{"tenant_admin":true}}}'

Examples

PUT /api/users/50.json
{
  "user": {
    "first_name": "changed"
  }
}
200
{
  "user": {
    "contact_info": {
      "email": "active'46@socialcast.com"
    },
    "manager": null,
    "custom_fields": [],
    "followable": false,
    "contact_id": null,
    "following_count": 0,
    "followers_count": 0,
    "status_message": null,
    "id": 50,
    "first_name": "changed",
    "last_name": "D'øe46",
    "name": "changed D'øe46",
    "html_name": "changed D&#39;øe46",
    "url": "https://socialcast.socialcast.test/users/50-changedd%C3%B8e46",
    "avatars": {
      "is_system_default": false,
      "id": 4,
      "square16": "https://s3.amazonaws.com/socialcast_test/tenants/1/profile_photos/4/rails_square16.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20180115%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180115T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=a8e301d7904b920054723ef38465a55c7a8ed09ad56d4d4f650afc83e8fec2d1",
      "square30": "https://s3.amazonaws.com/socialcast_test/tenants/1/profile_photos/4/rails_square30.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20180115%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180115T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=dae6a428c276e94766825769d9f9ca9a1bbc4d14d4ec547b9dd128257d2f2e7a",
      "square45": "https://s3.amazonaws.com/socialcast_test/tenants/1/profile_photos/4/rails_square45.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20180115%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180115T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=080a19ec88827215ee82eefe0ae5c22e36f9a11d81cea751863eb3b8a42badc9",
      "square70": "https://s3.amazonaws.com/socialcast_test/tenants/1/profile_photos/4/rails_square70.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20180115%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180115T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=c5ac48aae01b9a5bb47a6b49712a5e8e9d30e3469757044419e702a8be9bf9aa",
      "square140": "https://s3.amazonaws.com/socialcast_test/tenants/1/profile_photos/4/rails_square140.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20180115%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180115T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=81981e90c49974a04f9034c8b1fd0829f9c571874c8efe874ec90c48518f9773",
      "original": "https://s3.amazonaws.com/socialcast_test/tenants/1/profile_photos/4/rails.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20180115%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180115T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=b076b153c9dc07fb39037f411cad8a5b3569c5c635c6c71eec254f859f4ea535"
    },
    "username": "changedDøe46",
    "active": true,
    "terminated": false,
    "inactive": false,
    "role": "member",
    "type": "User",
    "title": null,
    "out_of_office": false,
    "out_of_office_on": null,
    "back_in_office_on": null,
    "company_login": null
  }
}