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": true,
      "can_cancel_membership_request": false,
      "can_join": false,
      "can_leave": false,
      "can_administer": true,
      "chat_stream_id": null,
      "post_stream_id": null
    },
    {
      "id": 6,
      "name": "privatetest&grøup3",
      "html_name": "privatetest&amp;grøup3",
      "url": "https://socialcast.socialcast.test/groups/6-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/6-privatetestgr%C3%B8up3/messages_activity",
      "admin_ids": [
        21
      ],
      "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": 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": true,
      "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": 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": 5,
      "name": "test&grøup3",
      "html_name": "test&amp;grøup3",
      "url": "https://socialcast.socialcast.test/groups/5-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/5-testgr%C3%B8up3/messages_activity",
      "admin_ids": [
        20
      ],
      "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": 9,
      "name": "test&grøup4",
      "html_name": "test&amp;grøup4",
      "url": "https://socialcast.socialcast.test/groups/9-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/9-testgr%C3%B8up4/messages_activity",
      "admin_ids": [
        24
      ],
      "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
    }
  ]
}