POST /api/users

create a user as a community admin

Success Response Code: 201

Params

Param name Description
activate_user
optional

activate the user or not (default=false)


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

skip new user emails (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>.
account_type
optional

Whether this user will be a standard member or external contributor (default=member)


Value: Must be one of: <code>member</code>, <code>external</code>.
group_id
optional

If this user is an external contributor, the group that they will be allowed to interact with (required for external contributors)


Value: Must be a Integer
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][email]
required

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 POST -v --basic -u "admin@socialcast.com:password" 'https://demo.socialcast.com/api/users' -H"Content-Type: application/json" -d'{"user": { "first_name":"Emily2", "last_name":"James", "contact_info": { "email": "emily2@socialcast.com" }}}'

Examples

POST /api/users.json
{
  "user": {
    "contact_info": {
      "email": "monkey@socialcast.com"
    },
    "first_name": "fuzzy",
    "last_name": "monkey"
  }
}
201
{
  "user": {
    "contact_info": {
      "email": "monkey@socialcast.com"
    },
    "manager": null,
    "custom_fields": [],
    "followable": false,
    "contact_id": null,
    "following_count": 0,
    "followers_count": 0,
    "status_message": null,
    "id": 57,
    "first_name": "fuzzy",
    "last_name": "monkey",
    "name": "fuzzy monkey",
    "html_name": "fuzzy monkey",
    "url": "https://socialcast.socialcast.test/users/57-fuzzymonkey",
    "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%2F20170722%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170722T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=21a4b08f689dd03d557cfa02023b6552775b7023b60806fca85c34befa6ca356",
      "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%2F20170722%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170722T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=51c5ef35993c97add35eb7da39e3ad20bc9e5d31a0526a025952dd541d26fbf0",
      "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%2F20170722%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170722T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=7c3fc15a3bb8117cc7c0d528846559d4a061592c53ac0cdf2ebf6d5a19ae2383",
      "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%2F20170722%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170722T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=2841a6ee6d194b62b2a37688bcfeb8b5d6179b3e70760811c7f3625372fc5293",
      "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%2F20170722%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170722T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=04def3541eca95ac71866e7c5e712dd01baaa51cf0efc07650aaa73587f31fd8",
      "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%2F20170722%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170722T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=9f6f6c9ddcd7be17eaaff5a762ea6b5ca3fcc55fa8cbcce003c46106f90cb884"
    },
    "username": "fuzzymonkey",
    "active": false,
    "terminated": false,
    "inactive": true,
    "role": "member",
    "type": "User",
    "title": null,
    "out_of_office": false,
    "out_of_office_on": null,
    "back_in_office_on": null,
    "company_login": null
  }
}