Groups

GET /api/groups/:group_id/members
Get a list of members for a group visible to the user. Can request admins only (role=admin) for private groups allowing access requests.

Also see Users#show.

Success Response Code: 200

Params

Param name Description
group_id
required

id of group


Value: Must be a Integer
separate_roles
optional

list admins before members (default=false)


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

type of members to show (default=member)


Value: Must be one of: <code>member</code>, <code>admin</code>.
page
optional

page number to view (default=1)


Value: Must be a Integer
per_page
optional

number of users to be returned per page (default=20, max=500)


Value: Must be a Integer

Response Fields

users see Users#show for user details Array<User>

Example Curl Commands

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

Examples

GET 
200
{
  "users": [
    {
      "contact_info": {
        "email": "active'9@socialcast.com"
      },
      "manager": null,
      "custom_fields": [],
      "followable": true,
      "contact_id": null,
      "following_count": 0,
      "followers_count": 0,
      "status_message": null,
      "id": 13,
      "first_name": "J'øhn12",
      "last_name": "D'øe12",
      "name": "J'øhn12 D'øe12",
      "html_name": "J&#39;øhn12 D&#39;øe12",
      "url": "https://socialcast.socialcast.test/users/13-j%C3%B8hn12d%C3%B8e12",
      "avatars": {
        "is_system_default": true,
        "id": null,
        "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square16-3b951350d61d203ece2fa5dd274fa7bd35275e132c17310d9006514f8839c857.png",
        "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square30-6db66ac25c338d1e548a68465e2723ff63367c2aafbcc01db24c83964056b892.png",
        "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square45-16865426333e244c59076d4f2475b711ed1ff9d12c97f4cf354f373a0170a1fd.png",
        "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square70-1708999e8f1fea583408d7fc64b2177f853e4123bea2ffcf35f4839c8697e0ba.png",
        "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square140-7da7e1d98b33ef152280b1f653cfd80e2db24b01b625a72abc320673eea5af53.png"
      },
      "username": "Jøhn12Døe12",
      "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
    },
    {
      "contact_info": {
        "email": "active'15@socialcast.com"
      },
      "manager": null,
      "custom_fields": [],
      "followable": true,
      "contact_id": null,
      "following_count": 0,
      "followers_count": 0,
      "status_message": null,
      "id": 19,
      "first_name": "J'øhn18",
      "last_name": "D'øe18",
      "name": "J'øhn18 D'øe18",
      "html_name": "J&#39;øhn18 D&#39;øe18",
      "url": "https://socialcast.socialcast.test/users/19-j%C3%B8hn18d%C3%B8e18",
      "avatars": {
        "is_system_default": true,
        "id": null,
        "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square16-3b951350d61d203ece2fa5dd274fa7bd35275e132c17310d9006514f8839c857.png",
        "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square30-6db66ac25c338d1e548a68465e2723ff63367c2aafbcc01db24c83964056b892.png",
        "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square45-16865426333e244c59076d4f2475b711ed1ff9d12c97f4cf354f373a0170a1fd.png",
        "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square70-1708999e8f1fea583408d7fc64b2177f853e4123bea2ffcf35f4839c8697e0ba.png",
        "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square140-7da7e1d98b33ef152280b1f653cfd80e2db24b01b625a72abc320673eea5af53.png"
      },
      "username": "Jøhn18Døe18",
      "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
    }
  ]
}

GET /api/groups
get a list of groups viewable by the authenticated user

GET /api/users/:user_id/groups
groups which are viewable by the authenticated user and user_id is a member of

Success Response Code: 200

Params

Param name Description
can_join_only
optional

only include public groups the authenticated user can join (default=false)


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

only include private groups where the authenticated user can request membership (default=false)


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

include in list any private groups allowing access requests that the user has not yet joined (default=false)


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

page number of groups to be returned (default=1)


Value: Must be a Integer
per_page
optional

number of groups to be returned per page (default=20, max=500)


Value: Must be a Integer
q
optional

search term to filter results (uses a word prefix search against the group name)


Value: Must be a String
user_id
optional

limit the groups to just the ones the target user belongs to


Value: Must be a Integer

Response Fields

groups group array of group entries Array<Group>

Example Curl Commands

curl -X GET -v --basic -u "emily@socialcast.com:demo" https://demo.socialcast.com/api/groups.json
curl -X GET -v --basic -u "emily@socialcast.com:demo" https://demo.socialcast.com/api/users/27/groups.json

Examples

GET 
200
{
  "groups": [
    {
      "id": 3,
      "name": "privatetest&grøup1",
      "html_name": "privatetest&amp;grøup1",
      "url": "https://socialcast.socialcast.test/groups/3-privatetestgr%C3%B8up1",
      "type": "Group",
      "avatars": {
        "is_system_default": true,
        "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square16-de52f6166f708e54b1b832ef06f92e409ae6b09976b4afc3dddbec820123214e.png",
        "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square30-c3483c74bd99384e67bb1c52a48b68e5e5ff04286e3abdbff3a228ee6f40d08b.png",
        "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square45-a31ef7e33bb699a3663623cd7c8244144c7779f6fb34757b1247bb720addbc32.png",
        "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square70-1886d205945147e3e2a37feb87db68bf29603fc508a049c5defa65a0c79e86cd.png",
        "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square140-3f77aeb71272a1df5c7c0e3a0141e91358b3654f9ff918f4974b77e230cab10e.png"
      },
      "username": "privatetestgrøup1",
      "groupname": "privatetestgrøup1",
      "private": true,
      "external_contributor": false,
      "chat_enabled": false,
      "post_enabled": true,
      "activity_url": "https://socialcast.socialcast.test/groups/3-privatetestgr%C3%B8up1/messages_activity",
      "admin_ids": [
        18
      ],
      "description": null,
      "state": "active",
      "permission": "private",
      "group_type": "standard",
      "member_count": 2,
      "role_key": null,
      "can_request_membership": false,
      "can_cancel_membership_request": false,
      "can_join": false,
      "can_leave": false,
      "can_administer": true,
      "chat_stream_id": null,
      "post_stream_id": null
    },
    {
      "id": 4,
      "name": "privatetest&grøup2",
      "html_name": "privatetest&amp;grøup2",
      "url": "https://socialcast.socialcast.test/groups/4-privatetestgr%C3%B8up2",
      "type": "Group",
      "avatars": {
        "is_system_default": true,
        "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square16-de52f6166f708e54b1b832ef06f92e409ae6b09976b4afc3dddbec820123214e.png",
        "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square30-c3483c74bd99384e67bb1c52a48b68e5e5ff04286e3abdbff3a228ee6f40d08b.png",
        "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square45-a31ef7e33bb699a3663623cd7c8244144c7779f6fb34757b1247bb720addbc32.png",
        "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square70-1886d205945147e3e2a37feb87db68bf29603fc508a049c5defa65a0c79e86cd.png",
        "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square140-3f77aeb71272a1df5c7c0e3a0141e91358b3654f9ff918f4974b77e230cab10e.png"
      },
      "username": "privatetestgrøup2",
      "groupname": "privatetestgrøup2",
      "private": true,
      "external_contributor": false,
      "chat_enabled": false,
      "post_enabled": true,
      "activity_url": "https://socialcast.socialcast.test/groups/4-privatetestgr%C3%B8up2/messages_activity",
      "admin_ids": [
        19
      ],
      "description": null,
      "state": "active",
      "permission": "private",
      "group_type": "standard",
      "member_count": 2,
      "role_key": null,
      "can_request_membership": false,
      "can_cancel_membership_request": false,
      "can_join": false,
      "can_leave": false,
      "can_administer": true,
      "chat_stream_id": null,
      "post_stream_id": null
    },
    {
      "id": 5,
      "name": "privatetest&grøup3",
      "html_name": "privatetest&amp;grøup3",
      "url": "https://socialcast.socialcast.test/groups/5-privatetestgr%C3%B8up3",
      "type": "Group",
      "avatars": {
        "is_system_default": true,
        "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square16-de52f6166f708e54b1b832ef06f92e409ae6b09976b4afc3dddbec820123214e.png",
        "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square30-c3483c74bd99384e67bb1c52a48b68e5e5ff04286e3abdbff3a228ee6f40d08b.png",
        "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square45-a31ef7e33bb699a3663623cd7c8244144c7779f6fb34757b1247bb720addbc32.png",
        "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square70-1886d205945147e3e2a37feb87db68bf29603fc508a049c5defa65a0c79e86cd.png",
        "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square140-3f77aeb71272a1df5c7c0e3a0141e91358b3654f9ff918f4974b77e230cab10e.png"
      },
      "username": "privatetestgrøup3",
      "groupname": "privatetestgrøup3",
      "private": true,
      "external_contributor": false,
      "chat_enabled": false,
      "post_enabled": true,
      "activity_url": "https://socialcast.socialcast.test/groups/5-privatetestgr%C3%B8up3/messages_activity",
      "admin_ids": [
        20
      ],
      "description": null,
      "state": "active",
      "permission": "private",
      "group_type": "standard",
      "member_count": 2,
      "role_key": null,
      "can_request_membership": true,
      "can_cancel_membership_request": false,
      "can_join": false,
      "can_leave": false,
      "can_administer": true,
      "chat_stream_id": null,
      "post_stream_id": null
    },
    {
      "id": 7,
      "name": "privatetest&grøup4",
      "html_name": "privatetest&amp;grøup4",
      "url": "https://socialcast.socialcast.test/groups/7-privatetestgr%C3%B8up4",
      "type": "Group",
      "avatars": {
        "is_system_default": true,
        "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square16-de52f6166f708e54b1b832ef06f92e409ae6b09976b4afc3dddbec820123214e.png",
        "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square30-c3483c74bd99384e67bb1c52a48b68e5e5ff04286e3abdbff3a228ee6f40d08b.png",
        "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square45-a31ef7e33bb699a3663623cd7c8244144c7779f6fb34757b1247bb720addbc32.png",
        "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square70-1886d205945147e3e2a37feb87db68bf29603fc508a049c5defa65a0c79e86cd.png",
        "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square140-3f77aeb71272a1df5c7c0e3a0141e91358b3654f9ff918f4974b77e230cab10e.png"
      },
      "username": "privatetestgrøup4",
      "groupname": "privatetestgrøup4",
      "private": true,
      "external_contributor": false,
      "chat_enabled": false,
      "post_enabled": true,
      "activity_url": "https://socialcast.socialcast.test/groups/7-privatetestgr%C3%B8up4/messages_activity",
      "admin_ids": [
        22
      ],
      "description": null,
      "state": "active",
      "permission": "private",
      "group_type": "standard",
      "member_count": 2,
      "role_key": null,
      "can_request_membership": false,
      "can_cancel_membership_request": false,
      "can_join": false,
      "can_leave": false,
      "can_administer": true,
      "chat_stream_id": null,
      "post_stream_id": null
    },
    {
      "id": 8,
      "name": "privatetest&grøup5",
      "html_name": "privatetest&amp;grøup5",
      "url": "https://socialcast.socialcast.test/groups/8-privatetestgr%C3%B8up5",
      "type": "Group",
      "avatars": {
        "is_system_default": true,
        "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square16-de52f6166f708e54b1b832ef06f92e409ae6b09976b4afc3dddbec820123214e.png",
        "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square30-c3483c74bd99384e67bb1c52a48b68e5e5ff04286e3abdbff3a228ee6f40d08b.png",
        "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square45-a31ef7e33bb699a3663623cd7c8244144c7779f6fb34757b1247bb720addbc32.png",
        "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square70-1886d205945147e3e2a37feb87db68bf29603fc508a049c5defa65a0c79e86cd.png",
        "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square140-3f77aeb71272a1df5c7c0e3a0141e91358b3654f9ff918f4974b77e230cab10e.png"
      },
      "username": "privatetestgrøup5",
      "groupname": "privatetestgrøup5",
      "private": true,
      "external_contributor": false,
      "chat_enabled": false,
      "post_enabled": true,
      "activity_url": "https://socialcast.socialcast.test/groups/8-privatetestgr%C3%B8up5/messages_activity",
      "admin_ids": [
        23
      ],
      "description": null,
      "state": "active",
      "permission": "private",
      "group_type": "standard",
      "member_count": 2,
      "role_key": null,
      "can_request_membership": true,
      "can_cancel_membership_request": false,
      "can_join": false,
      "can_leave": false,
      "can_administer": true,
      "chat_stream_id": null,
      "post_stream_id": null
    },
    {
      "id": 9,
      "name": "privatetest&grøup6",
      "html_name": "privatetest&amp;grøup6",
      "url": "https://socialcast.socialcast.test/groups/9-privatetestgr%C3%B8up6",
      "type": "Group",
      "avatars": {
        "is_system_default": true,
        "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square16-de52f6166f708e54b1b832ef06f92e409ae6b09976b4afc3dddbec820123214e.png",
        "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square30-c3483c74bd99384e67bb1c52a48b68e5e5ff04286e3abdbff3a228ee6f40d08b.png",
        "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square45-a31ef7e33bb699a3663623cd7c8244144c7779f6fb34757b1247bb720addbc32.png",
        "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square70-1886d205945147e3e2a37feb87db68bf29603fc508a049c5defa65a0c79e86cd.png",
        "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square140-3f77aeb71272a1df5c7c0e3a0141e91358b3654f9ff918f4974b77e230cab10e.png"
      },
      "username": "privatetestgrøup6",
      "groupname": "privatetestgrøup6",
      "private": true,
      "external_contributor": false,
      "chat_enabled": false,
      "post_enabled": true,
      "activity_url": "https://socialcast.socialcast.test/groups/9-privatetestgr%C3%B8up6/messages_activity",
      "admin_ids": [
        24
      ],
      "description": null,
      "state": "active",
      "permission": "private",
      "group_type": "standard",
      "member_count": 2,
      "role_key": null,
      "can_request_membership": true,
      "can_cancel_membership_request": false,
      "can_join": false,
      "can_leave": false,
      "can_administer": true,
      "chat_stream_id": null,
      "post_stream_id": null
    },
    {
      "id": 1,
      "name": "test&grøup1",
      "html_name": "test&amp;grøup1",
      "url": "https://socialcast.socialcast.test/groups/1-testgr%C3%B8up1",
      "type": "Group",
      "avatars": {
        "is_system_default": true,
        "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square16-de52f6166f708e54b1b832ef06f92e409ae6b09976b4afc3dddbec820123214e.png",
        "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square30-c3483c74bd99384e67bb1c52a48b68e5e5ff04286e3abdbff3a228ee6f40d08b.png",
        "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square45-a31ef7e33bb699a3663623cd7c8244144c7779f6fb34757b1247bb720addbc32.png",
        "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square70-1886d205945147e3e2a37feb87db68bf29603fc508a049c5defa65a0c79e86cd.png",
        "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square140-3f77aeb71272a1df5c7c0e3a0141e91358b3654f9ff918f4974b77e230cab10e.png"
      },
      "username": "testgrøup1",
      "groupname": "testgrøup1",
      "private": false,
      "external_contributor": false,
      "chat_enabled": false,
      "post_enabled": true,
      "activity_url": "https://socialcast.socialcast.test/groups/1-testgr%C3%B8up1/messages_activity",
      "admin_ids": [
        16
      ],
      "description": null,
      "state": "active",
      "permission": "public",
      "group_type": "standard",
      "member_count": 2,
      "role_key": null,
      "can_request_membership": false,
      "can_cancel_membership_request": false,
      "can_join": true,
      "can_leave": false,
      "can_administer": true,
      "chat_stream_id": null,
      "post_stream_id": null
    },
    {
      "id": 2,
      "name": "test&grøup2",
      "html_name": "test&amp;grøup2",
      "url": "https://socialcast.socialcast.test/groups/2-testgr%C3%B8up2",
      "type": "Group",
      "avatars": {
        "is_system_default": true,
        "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square16-de52f6166f708e54b1b832ef06f92e409ae6b09976b4afc3dddbec820123214e.png",
        "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square30-c3483c74bd99384e67bb1c52a48b68e5e5ff04286e3abdbff3a228ee6f40d08b.png",
        "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square45-a31ef7e33bb699a3663623cd7c8244144c7779f6fb34757b1247bb720addbc32.png",
        "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square70-1886d205945147e3e2a37feb87db68bf29603fc508a049c5defa65a0c79e86cd.png",
        "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square140-3f77aeb71272a1df5c7c0e3a0141e91358b3654f9ff918f4974b77e230cab10e.png"
      },
      "username": "testgrøup2",
      "groupname": "testgrøup2",
      "private": false,
      "external_contributor": false,
      "chat_enabled": false,
      "post_enabled": true,
      "activity_url": "https://socialcast.socialcast.test/groups/2-testgr%C3%B8up2/messages_activity",
      "admin_ids": [
        17
      ],
      "description": null,
      "state": "active",
      "permission": "public",
      "group_type": "standard",
      "member_count": 2,
      "role_key": null,
      "can_request_membership": false,
      "can_cancel_membership_request": false,
      "can_join": true,
      "can_leave": false,
      "can_administer": true,
      "chat_stream_id": null,
      "post_stream_id": null
    },
    {
      "id": 6,
      "name": "test&grøup3",
      "html_name": "test&amp;grøup3",
      "url": "https://socialcast.socialcast.test/groups/6-testgr%C3%B8up3",
      "type": "Group",
      "avatars": {
        "is_system_default": true,
        "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square16-de52f6166f708e54b1b832ef06f92e409ae6b09976b4afc3dddbec820123214e.png",
        "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square30-c3483c74bd99384e67bb1c52a48b68e5e5ff04286e3abdbff3a228ee6f40d08b.png",
        "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square45-a31ef7e33bb699a3663623cd7c8244144c7779f6fb34757b1247bb720addbc32.png",
        "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square70-1886d205945147e3e2a37feb87db68bf29603fc508a049c5defa65a0c79e86cd.png",
        "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square140-3f77aeb71272a1df5c7c0e3a0141e91358b3654f9ff918f4974b77e230cab10e.png"
      },
      "username": "testgrøup3",
      "groupname": "testgrøup3",
      "private": false,
      "external_contributor": false,
      "chat_enabled": false,
      "post_enabled": true,
      "activity_url": "https://socialcast.socialcast.test/groups/6-testgr%C3%B8up3/messages_activity",
      "admin_ids": [
        21
      ],
      "description": null,
      "state": "active",
      "permission": "public",
      "group_type": "standard",
      "member_count": 2,
      "role_key": null,
      "can_request_membership": false,
      "can_cancel_membership_request": false,
      "can_join": true,
      "can_leave": false,
      "can_administer": true,
      "chat_stream_id": null,
      "post_stream_id": null
    },
    {
      "id": 10,
      "name": "test&grøup4",
      "html_name": "test&amp;grøup4",
      "url": "https://socialcast.socialcast.test/groups/10-testgr%C3%B8up4",
      "type": "Group",
      "avatars": {
        "is_system_default": true,
        "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square16-de52f6166f708e54b1b832ef06f92e409ae6b09976b4afc3dddbec820123214e.png",
        "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square30-c3483c74bd99384e67bb1c52a48b68e5e5ff04286e3abdbff3a228ee6f40d08b.png",
        "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square45-a31ef7e33bb699a3663623cd7c8244144c7779f6fb34757b1247bb720addbc32.png",
        "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square70-1886d205945147e3e2a37feb87db68bf29603fc508a049c5defa65a0c79e86cd.png",
        "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square140-3f77aeb71272a1df5c7c0e3a0141e91358b3654f9ff918f4974b77e230cab10e.png"
      },
      "username": "testgrøup4",
      "groupname": "testgrøup4",
      "private": false,
      "external_contributor": false,
      "chat_enabled": false,
      "post_enabled": true,
      "activity_url": "https://socialcast.socialcast.test/groups/10-testgr%C3%B8up4/messages_activity",
      "admin_ids": [
        25
      ],
      "description": null,
      "state": "active",
      "permission": "public",
      "group_type": "standard",
      "member_count": 1,
      "role_key": null,
      "can_request_membership": false,
      "can_cancel_membership_request": false,
      "can_join": true,
      "can_leave": false,
      "can_administer": true,
      "chat_stream_id": null,
      "post_stream_id": null
    }
  ]
}

GET /api/groups/:group_id/messages
get a list of messages in a group

Also see Messages#show.

Success Response Code: 200

Params

Param name Description
group_id
required

Value: Must be a Integer
page
optional

page number of messages to be returned (default=1)


Value: Must be a Integer
per_page
optional

number of messages per page (default=20, max=500)


Value: Must be a Integer

Response Fields

messages see Messages#show for message details Array<Message>
messages_next_page next page number for :messages. Null if next page would not have any results. Integer

Example Curl Commands

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

Examples

GET 
200
{
  "messages": [
    {
      "id": 2,
      "user": {
        "id": 16,
        "first_name": "J'øhn15",
        "last_name": "D'øe15",
        "name": "J'øhn15 D'øe15",
        "html_name": "J&#39;øhn15 D&#39;øe15",
        "url": "https://socialcast.socialcast.test/users/16-j%C3%B8hn15d%C3%B8e15",
        "avatars": {
          "is_system_default": true,
          "id": null,
          "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square16-3b951350d61d203ece2fa5dd274fa7bd35275e132c17310d9006514f8839c857.png",
          "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square30-6db66ac25c338d1e548a68465e2723ff63367c2aafbcc01db24c83964056b892.png",
          "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square45-16865426333e244c59076d4f2475b711ed1ff9d12c97f4cf354f373a0170a1fd.png",
          "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square70-1708999e8f1fea583408d7fc64b2177f853e4123bea2ffcf35f4839c8697e0ba.png",
          "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square140-7da7e1d98b33ef152280b1f653cfd80e2db24b01b625a72abc320673eea5af53.png"
        },
        "username": "Jøhn15Døe15",
        "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
      },
      "title": "group post",
      "body": "",
      "html_body": "<div class=\"markdown-body\"></div>",
      "action": "",
      "verb": null,
      "message_type": "status_message",
      "icon": null,
      "url": "https://socialcast.socialcast.test/api/messages/2",
      "permalink_url": "https://socialcast.socialcast.test/messages/2",
      "external_url": null,
      "created_at": "2017-05-30T07:32:56+00:00",
      "updated_at": "2017-05-30T07:32:56+00:00",
      "attachments": [],
      "media_files": [],
      "contains_url_only": null,
      "external_resources": [],
      "tags": [],
      "last_interacted_at": 1496129576,
      "group": {
        "id": 1,
        "name": "test&grøup1",
        "html_name": "test&amp;grøup1",
        "url": "https://socialcast.socialcast.test/groups/1-testgr%C3%B8up1",
        "type": "Group",
        "avatars": {
          "is_system_default": true,
          "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square16-de52f6166f708e54b1b832ef06f92e409ae6b09976b4afc3dddbec820123214e.png",
          "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square30-c3483c74bd99384e67bb1c52a48b68e5e5ff04286e3abdbff3a228ee6f40d08b.png",
          "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square45-a31ef7e33bb699a3663623cd7c8244144c7779f6fb34757b1247bb720addbc32.png",
          "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square70-1886d205945147e3e2a37feb87db68bf29603fc508a049c5defa65a0c79e86cd.png",
          "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square140-3f77aeb71272a1df5c7c0e3a0141e91358b3654f9ff918f4974b77e230cab10e.png"
        },
        "username": "testgrøup1",
        "groupname": "testgrøup1",
        "private": false,
        "external_contributor": false,
        "chat_enabled": false,
        "post_enabled": true,
        "activity_url": "https://socialcast.socialcast.test/groups/1-testgr%C3%B8up1/messages_activity"
      },
      "category_id": null,
      "recipients": [
        {
          "id": 1,
          "name": "test&grøup1",
          "html_name": "test&amp;grøup1",
          "url": "https://socialcast.socialcast.test/groups/1-testgr%C3%B8up1",
          "type": "Group",
          "avatars": {
            "is_system_default": true,
            "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square16-de52f6166f708e54b1b832ef06f92e409ae6b09976b4afc3dddbec820123214e.png",
            "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square30-c3483c74bd99384e67bb1c52a48b68e5e5ff04286e3abdbff3a228ee6f40d08b.png",
            "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square45-a31ef7e33bb699a3663623cd7c8244144c7779f6fb34757b1247bb720addbc32.png",
            "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square70-1886d205945147e3e2a37feb87db68bf29603fc508a049c5defa65a0c79e86cd.png",
            "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square140-3f77aeb71272a1df5c7c0e3a0141e91358b3654f9ff918f4974b77e230cab10e.png"
          },
          "username": "testgrøup1",
          "private": false,
          "external_contributor": false,
          "chat_enabled": false,
          "post_enabled": true,
          "activity_url": "https://socialcast.socialcast.test/groups/1-testgr%C3%B8up1/messages_activity",
          "mention_name": "testgrøup1"
        }
      ],
      "thumbnail_url": null,
      "player_url": null,
      "player_params": null,
      "likable": true,
      "ratable": false,
      "rating": null,
      "ratings_average": null,
      "ratings_count": null,
      "editable": false,
      "deletable": false,
      "watchable": false,
      "watch": null,
      "flag": null,
      "source": null,
      "poll": null,
      "embed": null,
      "hidden": null,
      "subscribed": null,
      "groups": [
        {
          "id": 1,
          "name": "test&grøup1",
          "html_name": "test&amp;grøup1",
          "url": "https://socialcast.socialcast.test/groups/1-testgr%C3%B8up1",
          "type": "Group",
          "avatars": {
            "is_system_default": true,
            "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square16-de52f6166f708e54b1b832ef06f92e409ae6b09976b4afc3dddbec820123214e.png",
            "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square30-c3483c74bd99384e67bb1c52a48b68e5e5ff04286e3abdbff3a228ee6f40d08b.png",
            "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square45-a31ef7e33bb699a3663623cd7c8244144c7779f6fb34757b1247bb720addbc32.png",
            "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square70-1886d205945147e3e2a37feb87db68bf29603fc508a049c5defa65a0c79e86cd.png",
            "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square140-3f77aeb71272a1df5c7c0e3a0141e91358b3654f9ff918f4974b77e230cab10e.png"
          },
          "username": "testgrøup1",
          "groupname": "testgrøup1",
          "private": false,
          "external_contributor": false,
          "chat_enabled": false,
          "post_enabled": true,
          "activity_url": "https://socialcast.socialcast.test/groups/1-testgr%C3%B8up1/messages_activity"
        }
      ],
      "extensions": [],
      "new_group_id": null,
      "new_group_archived_at": null,
      "days_of_stickiness": 0,
      "sticky_for_current_user": false,
      "shareable": false,
      "share_count": 0,
      "client_provided_guid": null,
      "comments_count": 0,
      "comments": [],
      "likes": [],
      "likes_count": 0,
      "shared_message": null,
      "commentable": true
    }
  ],
  "messages_next_page": null
}
GET 
200
{
  "messages": [
    {
      "id": 3,
      "user": {
        "id": 16,
        "first_name": "J'øhn15",
        "last_name": "D'øe15",
        "name": "J'øhn15 D'øe15",
        "html_name": "J&#39;øhn15 D&#39;øe15",
        "url": "https://socialcast.socialcast.test/users/16-j%C3%B8hn15d%C3%B8e15",
        "avatars": {
          "is_system_default": true,
          "id": null,
          "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square16-3b951350d61d203ece2fa5dd274fa7bd35275e132c17310d9006514f8839c857.png",
          "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square30-6db66ac25c338d1e548a68465e2723ff63367c2aafbcc01db24c83964056b892.png",
          "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square45-16865426333e244c59076d4f2475b711ed1ff9d12c97f4cf354f373a0170a1fd.png",
          "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square70-1708999e8f1fea583408d7fc64b2177f853e4123bea2ffcf35f4839c8697e0ba.png",
          "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square140-7da7e1d98b33ef152280b1f653cfd80e2db24b01b625a72abc320673eea5af53.png"
        },
        "username": "Jøhn15Døe15",
        "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
      },
      "title": "group post",
      "body": "",
      "html_body": "<div class=\"markdown-body\"></div>",
      "action": "",
      "verb": null,
      "message_type": "status_message",
      "icon": null,
      "url": "https://socialcast.socialcast.test/api/messages/3",
      "permalink_url": "https://socialcast.socialcast.test/messages/3",
      "external_url": null,
      "created_at": "2017-05-30T07:32:57+00:00",
      "updated_at": "2017-05-30T07:32:57+00:00",
      "attachments": [],
      "media_files": [],
      "contains_url_only": null,
      "external_resources": [],
      "tags": [],
      "last_interacted_at": 1496129577,
      "group": {
        "id": 1,
        "name": "test&grøup1",
        "html_name": "test&amp;grøup1",
        "url": "https://socialcast.socialcast.test/groups/1-testgr%C3%B8up1",
        "type": "Group",
        "avatars": {
          "is_system_default": true,
          "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square16-de52f6166f708e54b1b832ef06f92e409ae6b09976b4afc3dddbec820123214e.png",
          "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square30-c3483c74bd99384e67bb1c52a48b68e5e5ff04286e3abdbff3a228ee6f40d08b.png",
          "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square45-a31ef7e33bb699a3663623cd7c8244144c7779f6fb34757b1247bb720addbc32.png",
          "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square70-1886d205945147e3e2a37feb87db68bf29603fc508a049c5defa65a0c79e86cd.png",
          "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square140-3f77aeb71272a1df5c7c0e3a0141e91358b3654f9ff918f4974b77e230cab10e.png"
        },
        "username": "testgrøup1",
        "groupname": "testgrøup1",
        "private": false,
        "external_contributor": false,
        "chat_enabled": false,
        "post_enabled": true,
        "activity_url": "https://socialcast.socialcast.test/groups/1-testgr%C3%B8up1/messages_activity"
      },
      "category_id": null,
      "recipients": [
        {
          "id": 1,
          "name": "test&grøup1",
          "html_name": "test&amp;grøup1",
          "url": "https://socialcast.socialcast.test/groups/1-testgr%C3%B8up1",
          "type": "Group",
          "avatars": {
            "is_system_default": true,
            "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square16-de52f6166f708e54b1b832ef06f92e409ae6b09976b4afc3dddbec820123214e.png",
            "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square30-c3483c74bd99384e67bb1c52a48b68e5e5ff04286e3abdbff3a228ee6f40d08b.png",
            "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square45-a31ef7e33bb699a3663623cd7c8244144c7779f6fb34757b1247bb720addbc32.png",
            "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square70-1886d205945147e3e2a37feb87db68bf29603fc508a049c5defa65a0c79e86cd.png",
            "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square140-3f77aeb71272a1df5c7c0e3a0141e91358b3654f9ff918f4974b77e230cab10e.png"
          },
          "username": "testgrøup1",
          "private": false,
          "external_contributor": false,
          "chat_enabled": false,
          "post_enabled": true,
          "activity_url": "https://socialcast.socialcast.test/groups/1-testgr%C3%B8up1/messages_activity",
          "mention_name": "testgrøup1"
        }
      ],
      "thumbnail_url": null,
      "player_url": null,
      "player_params": null,
      "likable": true,
      "ratable": false,
      "rating": null,
      "ratings_average": null,
      "ratings_count": null,
      "editable": false,
      "deletable": false,
      "watchable": false,
      "watch": null,
      "flag": null,
      "source": null,
      "poll": null,
      "embed": null,
      "hidden": null,
      "subscribed": null,
      "groups": [
        {
          "id": 1,
          "name": "test&grøup1",
          "html_name": "test&amp;grøup1",
          "url": "https://socialcast.socialcast.test/groups/1-testgr%C3%B8up1",
          "type": "Group",
          "avatars": {
            "is_system_default": true,
            "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square16-de52f6166f708e54b1b832ef06f92e409ae6b09976b4afc3dddbec820123214e.png",
            "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square30-c3483c74bd99384e67bb1c52a48b68e5e5ff04286e3abdbff3a228ee6f40d08b.png",
            "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square45-a31ef7e33bb699a3663623cd7c8244144c7779f6fb34757b1247bb720addbc32.png",
            "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square70-1886d205945147e3e2a37feb87db68bf29603fc508a049c5defa65a0c79e86cd.png",
            "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square140-3f77aeb71272a1df5c7c0e3a0141e91358b3654f9ff918f4974b77e230cab10e.png"
          },
          "username": "testgrøup1",
          "groupname": "testgrøup1",
          "private": false,
          "external_contributor": false,
          "chat_enabled": false,
          "post_enabled": true,
          "activity_url": "https://socialcast.socialcast.test/groups/1-testgr%C3%B8up1/messages_activity"
        }
      ],
      "extensions": [],
      "new_group_id": null,
      "new_group_archived_at": null,
      "days_of_stickiness": 0,
      "sticky_for_current_user": false,
      "shareable": false,
      "share_count": 0,
      "client_provided_guid": null,
      "comments_count": 0,
      "comments": [],
      "likes": [],
      "likes_count": 0,
      "shared_message": null,
      "commentable": true
    }
  ],
  "messages_next_page": null
}

GET /api/groups/mutual
get a list of groups shared between two users

Success Response Code: 200

Params

Param name Description
user_id
required

the first user


Value: Must be a Integer
other_user_id
required

the second user


Value: Must be a Integer
page
optional

page number of groups to be returned (default=1)


Value: Must be a Integer
per_page
optional

number of groups to be returned per page (default=20, max=500)


Value: Must be a Integer

Response Fields

groups array of Group entries Array<Group>

Example Curl Commands

curl -X GET -v --basic -u "emily@socialcast.com/api/groups/mutual.json?user_id=25&other_user_id=26"

Examples

GET 
200
{
  "groups": [
    {
      "id": 1,
      "name": "test&grøup1",
      "html_name": "test&amp;grøup1",
      "url": "https://socialcast.socialcast.test/groups/1-testgr%C3%B8up1",
      "type": "Group",
      "avatars": {
        "is_system_default": true,
        "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square16-de52f6166f708e54b1b832ef06f92e409ae6b09976b4afc3dddbec820123214e.png",
        "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square30-c3483c74bd99384e67bb1c52a48b68e5e5ff04286e3abdbff3a228ee6f40d08b.png",
        "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square45-a31ef7e33bb699a3663623cd7c8244144c7779f6fb34757b1247bb720addbc32.png",
        "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square70-1886d205945147e3e2a37feb87db68bf29603fc508a049c5defa65a0c79e86cd.png",
        "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square140-3f77aeb71272a1df5c7c0e3a0141e91358b3654f9ff918f4974b77e230cab10e.png"
      },
      "username": "testgrøup1",
      "groupname": "testgrøup1",
      "private": false,
      "external_contributor": false,
      "chat_enabled": false,
      "post_enabled": true,
      "activity_url": "https://socialcast.socialcast.test/groups/1-testgr%C3%B8up1/messages_activity",
      "admin_ids": [
        16
      ],
      "description": null,
      "state": "active",
      "permission": "public",
      "group_type": "standard",
      "member_count": 3,
      "role_key": "member",
      "can_request_membership": false,
      "can_cancel_membership_request": false,
      "can_join": false,
      "can_leave": true,
      "can_administer": false,
      "chat_stream_id": null,
      "post_stream_id": 81
    }
  ]
}

GET /api/groups/:group_id
get a single group

Success Response Code: 200

Params

Param name Description
group_id
required

id for group


Value: Must be a Integer
include_project_ids
optional

whether to return the associated project ids (default=false)


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

whether to return the associated challenge ids (default=false)


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

Response Fields

id unique ID of the group Integer
name name of the group String
url url to view the group permalink page String
avatars urls for various sizes of group avatar pictures Hash<String, Url>
private whether the group is private Boolean
external_contributor whether the group allows external contributors Boolean
state state of the group (e.g. archived, active) String
permission permission mode of the group (e.g. external_contributor, private, public) String
member_count number of members in the group (returns null if private group that member has not joined) Integer
description group's description String
role_key the current user's role in the group, or null if user is not in group ["admin", "member"]
can_request_membership whether the current user can make a membership request for the group Boolean
can_cancel_membership_request whether the current user can cancel a pending membership request for the group Boolean
can_join whether the current user can join the group Boolean
can_leave whether the current user can leave the group Boolean
chat_enabled whether the group supports chat messages Boolean
post_enabled whether the group supports post messages Boolean
project_ids list of associated projects ids Array
challenge_ids list of associated challenge ids Array

Example Curl Commands

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

Examples

GET 
200
{
  "group": {
    "id": 4,
    "name": "privatetest&grøup2",
    "html_name": "privatetest&amp;grøup2",
    "url": "https://socialcast.socialcast.test/groups/4-privatetestgr%C3%B8up2",
    "type": "Group",
    "avatars": {
      "is_system_default": true,
      "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square16-de52f6166f708e54b1b832ef06f92e409ae6b09976b4afc3dddbec820123214e.png",
      "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square30-c3483c74bd99384e67bb1c52a48b68e5e5ff04286e3abdbff3a228ee6f40d08b.png",
      "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square45-a31ef7e33bb699a3663623cd7c8244144c7779f6fb34757b1247bb720addbc32.png",
      "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square70-1886d205945147e3e2a37feb87db68bf29603fc508a049c5defa65a0c79e86cd.png",
      "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square140-3f77aeb71272a1df5c7c0e3a0141e91358b3654f9ff918f4974b77e230cab10e.png"
    },
    "username": "privatetestgrøup2",
    "groupname": "privatetestgrøup2",
    "private": true,
    "external_contributor": false,
    "chat_enabled": false,
    "post_enabled": true,
    "activity_url": "https://socialcast.socialcast.test/groups/4-privatetestgr%C3%B8up2/messages_activity",
    "admin_ids": [
      19
    ],
    "description": null,
    "state": "active",
    "permission": "private",
    "group_type": "standard",
    "member_count": 2,
    "role_key": null,
    "can_request_membership": false,
    "can_cancel_membership_request": false,
    "can_join": false,
    "can_leave": false,
    "can_administer": true,
    "chat_stream_id": null,
    "post_stream_id": null
  }
}

POST /api/groups
create a group for the authenticated user

Success Response Code: 201

Params

Param name Description
group
optional

Value: Must be a Hash
group[name]
required

name of the group


Value: Must be a String
group[description]
optional

description of the group


Value: Must be a String
group[permission_mode]
optional

permission mode of the group (default=public). 'external_contributor' not allowed if external contributor functionality is disabled for the community


Value: Must be one of: <code>external_contributor</code>, <code>private</code>, <code>public</code>.
group[avatars]
optional

urls for various sizes of group avatar pictures


Value: Must be a String
group[allow_access_request]
optional

whether non-members can request membership (not applicable to public groups) (default=false)


Value: Must be a String
group[chat]
optional

whether the group will support chat messages


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

whether the group will support post messages


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

Response Fields

id unique ID of the group Integer
name name of the group String
url url to view the group permalink page String
avatars urls for various sizes of group avatar pictures Hash<String, Url>
private whether the group is private Boolean
external_contributor whether the group allows external contributors Boolean
state state of the group (e.g. archived, active) String
permission permission mode of the group (e.g. external_contributor, private, public) String
member_count number of members in the group (returns null if private group that member has not joined) Integer
description group's description String
role_key the current user's role in the group, or null if user is not in group ["admin", "member"]
can_request_membership whether the current user can make a membership request for the group Boolean
can_cancel_membership_request whether the current user can cancel a pending membership request for the group Boolean
can_join whether the current user can join the group Boolean
can_leave whether the current user can leave the group Boolean
chat_enabled whether the group supports chat messages Boolean
post_enabled whether the group supports post messages Boolean

Example Curl Commands

curl -X POST -d "group[name]=Socialcast%20Developers&group[description]=For%20developers%20of%20socialcast" -v --basic -u "emily@socialcast.com:demo" https://demo.socialcast.com/api/groups.json

Examples

POST 
{
  "group": {
    "allow_access_request": "false",
    "chat": "false",
    "description": "Test description in group",
    "email_on_chat_default": "true",
    "email_on_post_default": "true",
    "external_contributor_group": "false",
    "name": "Test group name",
    "not_in_company_stream": "true",
    "one_to_one_chat_group": "false",
    "permission_mode": "private",
    "post": "true",
    "private": "true",
    "profile_photo_id": "4"
  }
}
201
{
  "group": {
    "id": 11,
    "name": "Test group name",
    "html_name": "Test group name",
    "url": "https://socialcast.socialcast.test/groups/11-testgroupname",
    "type": "Group",
    "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%2F20170529%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170529T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=33ef3158f1ee0d7e529ae652d4cf9468bca65c40f095bb0f62f5087b317eb75f",
      "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%2F20170529%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170529T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=66fe1808496d756b0d8d7162f733bdf1de82ad71d72ffa507814b07611c5d691",
      "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%2F20170529%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170529T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=ccf2949f6ab9dbde39a0de02e21bc229cb881e97e28a1df0eb21d05dab7e1e6c",
      "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%2F20170529%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170529T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=78c1a567216443264b5a7f693146a8e10c26e85f3236d63d31be1ae7d77f198e",
      "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%2F20170529%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170529T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=23f51121b2787e543f05d5c9d3d52f31752010fea3abd20a8ec645a2b2919596",
      "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%2F20170529%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170529T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=e4b5ba87eea3b87255edea5eaea8d63b9d8b695e5260fbd81d7b2d0e2cf6df80"
    },
    "username": "Testgroupname",
    "groupname": "Testgroupname",
    "private": true,
    "external_contributor": false,
    "chat_enabled": false,
    "post_enabled": true,
    "activity_url": "https://socialcast.socialcast.test/groups/11-testgroupname/messages_activity",
    "admin_ids": [
      13
    ],
    "description": "Test description in group",
    "state": "active",
    "permission": "private",
    "group_type": "standard",
    "member_count": 0,
    "role_key": "admin",
    "can_request_membership": false,
    "can_cancel_membership_request": false,
    "can_join": false,
    "can_leave": false,
    "can_administer": true,
    "chat_stream_id": null,
    "post_stream_id": 146
  }
}

PUT /api/groups/:group_id
update a group for the authenticated user

Warning:

When converting a public or private group to an external group, all linked projects and challenges will be removed from the group.

Success Response Code: 200

Params

Param name Description
group_id
required

id of the group


Value: Must be a Integer
group
optional

Value: Must be a Hash
group[name]
required

name of the group


Value: Must be a String
group[description]
optional

description of the group


Value: Must be a String
group[permission_mode]
optional

permission mode of the group (default=public). 'external_contributor' not allowed if external contributor functionality is disabled for the community


Value: Must be one of: <code>external_contributor</code>, <code>private</code>, <code>public</code>.
group[avatars]
optional

urls for various sizes of group avatar pictures


Value: Must be a String

Response Fields

id unique ID of the group Integer
name name of the group String
url url to view the group permalink page String
avatars urls for various sizes of group avatar pictures Hash<String, Url>
private whether the group is private Boolean
external_contributor whether the group allows external contributors Boolean
state state of the group (e.g. archived, active) String
permission permission mode of the group (e.g. external_contributor, private, public) String
member_count number of members in the group (returns null if private group that member has not joined) Integer
description group's description String
role_key the current user's role in the group, or null if user is not in group ["admin", "member"]
can_request_membership whether the current user can make a membership request for the group Boolean
can_cancel_membership_request whether the current user can cancel a pending membership request for the group Boolean
can_join whether the current user can join the group Boolean
can_leave whether the current user can leave the group Boolean
chat_enabled whether the group supports chat messages Boolean
post_enabled whether the group supports post messages Boolean

Example Curl Commands

curl -X PUT -d "group[description]=For%20developers%20of%20Socialcast" -v --basic -u "emily@socialcast.com:demo" https://demo.socialcast.com/api/groups/12.json

Examples

PUT 
{
  "group": {
    "allow_access_request": "false",
    "description": "Test changed description --",
    "email_on_chat_default": "true",
    "email_on_post_default": "true",
    "name": "test&grøup1changed",
    "not_in_company_stream": "true",
    "permission_mode": "public",
    "private": "false",
    "profile_photo_id": "3"
  }
}
200
{
  "group": {
    "id": 1,
    "name": "test&grøup1changed",
    "html_name": "test&amp;grøup1changed",
    "url": "https://socialcast.socialcast.test/groups/1-testgr%C3%B8up1changed",
    "type": "Group",
    "avatars": {
      "is_system_default": false,
      "id": 3,
      "square16": "https://s3.amazonaws.com/socialcast_test/tenants/1/profile_photos/3/rails_square16.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20170529%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170529T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=bdd0704572a8b2a7a3ead30d4e6266b3c4e4cbdf635fe336cad8baf383ddb340",
      "square30": "https://s3.amazonaws.com/socialcast_test/tenants/1/profile_photos/3/rails_square30.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20170529%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170529T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=7fba46c9094d5e275fdedf1a10d5ba686963396591b03447d1a87ff2b94cc042",
      "square45": "https://s3.amazonaws.com/socialcast_test/tenants/1/profile_photos/3/rails_square45.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20170529%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170529T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=f1d0f26e72a8e78cbeca8bc4fb4f9bc7fd8c19cf7030ee4297b068d88e641a6d",
      "square70": "https://s3.amazonaws.com/socialcast_test/tenants/1/profile_photos/3/rails_square70.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20170529%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170529T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=3243978dd71283e29632f915f445de9b0202f23f4b8a9fa8e94c8504a310c0be",
      "square140": "https://s3.amazonaws.com/socialcast_test/tenants/1/profile_photos/3/rails_square140.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20170529%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170529T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=8ca2206a50709046e2f04ac9a2c2624150538ab88578ddf62423ef1433a74fa1",
      "original": "https://s3.amazonaws.com/socialcast_test/tenants/1/profile_photos/3/rails.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20170529%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170529T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=d078ffdabd1d01ec722847cb190e1cf7620e6da25f4155852b52ffeb8956501a"
    },
    "username": "testgrøup1changed",
    "groupname": "testgrøup1changed",
    "private": false,
    "external_contributor": false,
    "chat_enabled": false,
    "post_enabled": true,
    "activity_url": "https://socialcast.socialcast.test/groups/1-testgr%C3%B8up1changed/messages_activity",
    "admin_ids": [
      16
    ],
    "description": "Test changed description --",
    "state": "active",
    "permission": "public",
    "group_type": "standard",
    "member_count": 2,
    "role_key": null,
    "can_request_membership": false,
    "can_cancel_membership_request": false,
    "can_join": true,
    "can_leave": false,
    "can_administer": true,
    "chat_stream_id": null,
    "post_stream_id": null
  }
}

DELETE /api/groups/:group_id
destroy a group

a group must be archived before it is destroyed

Success Response Code: 204

Params

Param name Description
group_id
required

id of the group


Value: Must be a Integer

Example Curl Commands

curl -X DELETE -v --basic -u "emily@socialcast.com:demo" https://demo.socialcast.com/api/groups/12.json

Examples

DELETE 
{}
204

DELETE /api/groups/:group_id/archive
archive a group

when a group is archived, no new members can join and no new content can be added. A group must be archived before it is destroyed

Success Response Code: 200

Params

Param name Description
group_id
required

id of the group


Value: Must be a Integer

Response Fields

id unique ID of the group Integer
name name of the group String
url url to view the group permalink page String
avatars urls for various sizes of group avatar pictures Hash<String, Url>
private whether the group is private Boolean
external_contributor whether the group allows external contributors Boolean
state state of the group (e.g. archived, active) String
permission permission mode of the group (e.g. external_contributor, private, public) String
member_count number of members in the group (returns null if private group that member has not joined) Integer
description group's description String
role_key the current user's role in the group, or null if user is not in group ["admin", "member"]
can_request_membership whether the current user can make a membership request for the group Boolean
can_cancel_membership_request whether the current user can cancel a pending membership request for the group Boolean
can_join whether the current user can join the group Boolean
can_leave whether the current user can leave the group Boolean
chat_enabled whether the group supports chat messages Boolean
post_enabled whether the group supports post messages Boolean

Example Curl Commands

curl -X DELETE -v --basic -u "emily@socialcast.com:demo" https://demo.socialcast.com/api/groups/12/archive.json

Examples

DELETE 
{}
200
{
  "group": {
    "id": 1,
    "name": "test&grøup1",
    "html_name": "test&amp;grøup1",
    "url": "https://socialcast.socialcast.test/groups/1-testgr%C3%B8up1",
    "type": "Group",
    "avatars": {
      "is_system_default": true,
      "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square16-de52f6166f708e54b1b832ef06f92e409ae6b09976b4afc3dddbec820123214e.png",
      "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square30-c3483c74bd99384e67bb1c52a48b68e5e5ff04286e3abdbff3a228ee6f40d08b.png",
      "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square45-a31ef7e33bb699a3663623cd7c8244144c7779f6fb34757b1247bb720addbc32.png",
      "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square70-1886d205945147e3e2a37feb87db68bf29603fc508a049c5defa65a0c79e86cd.png",
      "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square140-3f77aeb71272a1df5c7c0e3a0141e91358b3654f9ff918f4974b77e230cab10e.png"
    },
    "username": "testgrøup1",
    "groupname": "testgrøup1",
    "private": false,
    "external_contributor": false,
    "chat_enabled": false,
    "post_enabled": true,
    "activity_url": "https://socialcast.socialcast.test/groups/1-testgr%C3%B8up1/messages_activity",
    "admin_ids": [
      16
    ],
    "description": null,
    "state": "archived",
    "permission": "public",
    "group_type": "standard",
    "member_count": 2,
    "role_key": null,
    "can_request_membership": false,
    "can_cancel_membership_request": false,
    "can_join": false,
    "can_leave": false,
    "can_administer": true,
    "chat_stream_id": null,
    "post_stream_id": null
  }
}

POST /api/groups/:group_id/join
join a group

Success Response Code: 201

Params

Param name Description
group_id
required

id of the group


Value: Must be a Integer

Response Fields

group see group#show for details Group

Example Curl Commands

curl -X POST -v --basic -u "emily@socialcast.com:demo" https://demo.socialcast.com/api/groups/10/join.json

Examples

POST 
{}
201
{
  "group": {
    "id": 6,
    "name": "test&grøup3",
    "html_name": "test&amp;grøup3",
    "url": "https://socialcast.socialcast.test/groups/6-testgr%C3%B8up3",
    "type": "Group",
    "avatars": {
      "is_system_default": true,
      "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square16-de52f6166f708e54b1b832ef06f92e409ae6b09976b4afc3dddbec820123214e.png",
      "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square30-c3483c74bd99384e67bb1c52a48b68e5e5ff04286e3abdbff3a228ee6f40d08b.png",
      "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square45-a31ef7e33bb699a3663623cd7c8244144c7779f6fb34757b1247bb720addbc32.png",
      "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square70-1886d205945147e3e2a37feb87db68bf29603fc508a049c5defa65a0c79e86cd.png",
      "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square140-3f77aeb71272a1df5c7c0e3a0141e91358b3654f9ff918f4974b77e230cab10e.png"
    },
    "username": "testgrøup3",
    "groupname": "testgrøup3",
    "private": false,
    "external_contributor": false,
    "chat_enabled": false,
    "post_enabled": true,
    "activity_url": "https://socialcast.socialcast.test/groups/6-testgr%C3%B8up3/messages_activity",
    "admin_ids": [
      21
    ],
    "description": null,
    "state": "active",
    "permission": "public",
    "group_type": "standard",
    "member_count": 3,
    "role_key": "member",
    "can_request_membership": false,
    "can_cancel_membership_request": false,
    "can_join": false,
    "can_leave": true,
    "can_administer": false,
    "chat_stream_id": null,
    "post_stream_id": 147,
    "stream_id": 147
  }
}

POST /api/groups/:group_id/leave
leave a group

Success Response Code: 204

Params

Param name Description
group_id
required

id of the group


Value: Must be a Integer

Example Curl Commands

curl -X DELETE -v --basic -u "emily@socialcast.com:demo" https://demo.socialcast.com/api/groups/10/leave.json

Examples

DELETE 
{}
204

PATCH /api/groups/:group_id/chat_messages
update last_viewed_at for a group chat stream

Success Response Code: 204

Params

Param name Description
group_id
required

id of the group


Value: Must be a Integer
last_viewed_at
required

time in unix timestamp format at which chat messages were viewed. It is recommended to use the last_interacted_at from the most recent chat message. Times before the current last_viewed_at or in the future will be ignored.


Value: Must be a Integer

Example Curl Commands

curl -X PATCH -d "last_viewed_at=1455129765" -v --basic -u "emily@socialcast.com:demo" https://demo.socialcast.com/api/groups/12/chat_messages.json

GET /api/groups/search
get a list of groups matching the search term q

Success Response Code: 200

Params

Param name Description
q
optional

search term


Value: Must be a String
page
optional

page number of groups to be returned (default=1)


Value: Must be a Integer
per_page
optional

number of groups to be returned per page (default=20, max=500)


Value: Must be a Integer

Response Fields

groups array of group entries Array<Group>

Example Curl Commands

curl -X GET -v --basic -u "emily@socialcast.com:demo" "https://demo.socialcast.com/api/groups/search.json?q=Acme"

POST /api/groups/:id/hide_message
hides a message from the group stream (only usable by a group admin)

Success Response Code: 204

Params

Param name Description
id
optional

the group id that contains the specific message


Value: Must be a Integer
message_id
optional

message id to hide


Value: Must be a Integer

Example Curl Commands

curl -X POST -v --basic -u "emily@socialcast.com:demo" "https://demo.socialcast.com/api/groups/7/hide_message" -d"message_id=406"

GET /api/groups/pinned
get a list of groups that have been pinned/favorited by the user

Success Response Code: 200

Params

Param name Description
page
optional

page number of groups to be returned


Value: Must be a Integer
per_page
optional

number of groups to be returned per page (default=20, max=500)


Value: Must be a Integer

Response Fields

groups array of Group entries Array<Group>

Example Curl Commands

curl -X GET -v --basic -u "emily@socialcast.com:demo" "https://demo.socialcast.com/api/groups/pinned"