Members

GET /api/conversations/:conversation_id/members
list all conversation members

Success Response Code: 200

Params

Param name Description
conversation_id
required

referenced conversation


Value: Must be a Integer
page
optional

page for pagination (default=1)


Value: Must be a Integer
per_page
optional

number of paginated results to display per page (default=20, max=500)


Value: Must be a Integer

Response Fields

users list of members in a conversation Array<User>
user[id] id for user Integer
user[email] user's email address Integer
user[first_name] user's first name String
user[last_name] user's last name String
user[name] full name of the user String
user[cell_phone] user's cell phone number String
user[office_phone] user's cell phone number String
user[inactive] if user has activated their account [true, false]
user[terminated] if user's account has been terminated [true, false]
user[profile_photo[height]] user profile photo height Integer
user[profile_photo[width]] user profile photo width Integer

Example Curl Commands

curl -X GET -v --basic -u "emily@socialcast.com:demo" "https://demo.socialcast.com/api/conversations/2/members.json"

Examples

GET 
200
{
  "users": [
    {
      "id": 124,
      "name": "J'øhn112 D'øe110",
      "email": "active'109@socialcast.com",
      "cell_phone": null,
      "office_phone": null,
      "first_name": "J'øhn112",
      "last_name": "D'øe110",
      "profile_photo": {
        "height": 140,
        "width": 140,
        "url": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square140-7da7e1d98b33ef152280b1f653cfd80e2db24b01b625a72abc320673eea5af53.png",
        "is_system_default": true
      },
      "inactive": false,
      "terminated": false
    },
    {
      "id": 125,
      "name": "J'øhn113 D'øe111",
      "email": "active'110@socialcast.com",
      "cell_phone": null,
      "office_phone": null,
      "first_name": "J'øhn113",
      "last_name": "D'øe111",
      "profile_photo": {
        "height": 140,
        "width": 140,
        "url": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square140-7da7e1d98b33ef152280b1f653cfd80e2db24b01b625a72abc320673eea5af53.png",
        "is_system_default": true
      },
      "inactive": false,
      "terminated": false
    },
    {
      "id": 126,
      "name": "J'øhn114 D'øe112",
      "email": "active'111@socialcast.com",
      "cell_phone": null,
      "office_phone": null,
      "first_name": "J'øhn114",
      "last_name": "D'øe112",
      "profile_photo": {
        "height": 140,
        "width": 140,
        "url": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square140-7da7e1d98b33ef152280b1f653cfd80e2db24b01b625a72abc320673eea5af53.png",
        "is_system_default": true
      },
      "inactive": false,
      "terminated": false
    }
  ]
}

POST /api/conversations/:conversation_id/members
add new members to the referenced conversation

Success Response Code: 201

Params

Param name Description
conversation_id
optional

conversation to add members to


Value: Must be a Integer
members_email
optional

space separated list of email addresses to add to the conversation


Value: Must be a String

Response Fields

users array of user results Array<User>
user[id] id for user Integer
user[email] user's email address Integer
user[first_name] user's first name String
user[last_name] user's last name String
user[name] full name of the user String
user[cell_phone] user's cell phone number String
user[office_phone] user's cell phone number String
user[inactive] if user has activated their account [true, false]
user[terminated] if user's account has been terminated [true, false]
user[profile_photo[height]] user profile photo height Integer
user[profile_photo[width]] user profile photo width Integer

Example Curl Commands

curl -X POST -v --basic -u "emily@socialcast.com:demo" "https://demo.socialcast.com/api/conversations/2/members.json" -H"Content-Type: application/json" -d'{"members_emails":"bob@socialcast.com"}'

Examples

POST 
{
  "members_emails": "active'112@socialcast.com"
}
201
{
  "users": [
    {
      "id": 127,
      "name": "J'øhn115 D'øe113",
      "email": "active'112@socialcast.com",
      "cell_phone": null,
      "office_phone": null,
      "first_name": "J'øhn115",
      "last_name": "D'øe113",
      "profile_photo": {
        "height": 140,
        "width": 140,
        "url": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square140-7da7e1d98b33ef152280b1f653cfd80e2db24b01b625a72abc320673eea5af53.png",
        "is_system_default": true
      },
      "inactive": false,
      "terminated": false
    }
  ]
}

DELETE /api/conversations/:conversation_id/members/me
remove the authorized user from the referenced conversation

Success Response Code: 204

Params

Param name Description
conversation_id
optional

conversation to remove members from


Value: Must be a Integer

Example Curl Commands

curl -X DELETE -v --basic -u "emily@socialcast.com:demo" "https://demo.socialcast.com/api/conversations/2/members/me"

Examples

DELETE 
{}
204