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 /api/groups/2/messages.json
200
{
  "messages": [
    {
      "id": 1,
      "user": {
        "id": 11,
        "first_name": "J'øhn9",
        "last_name": "D'øe9",
        "name": "J'øhn9 D'øe9",
        "html_name": "J&#39;øhn9 D&#39;øe9",
        "url": "https://socialcast.socialcast.test/users/11-j%C3%B8hn9d%C3%B8e9",
        "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øhn9Døe9",
        "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/1",
      "permalink_url": "https://socialcast.socialcast.test/messages/1",
      "external_url": null,
      "created_at": "2017-09-21T20:29:18+00:00",
      "updated_at": "2017-09-21T20:29:18+00:00",
      "attachments": [],
      "media_files": [],
      "contains_url_only": null,
      "external_resources": [],
      "tags": [],
      "last_interacted_at": 1506025758,
      "group": {
        "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"
      },
      "category_id": null,
      "recipients": [
        {
          "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",
          "private": false,
          "external_contributor": false,
          "chat_enabled": false,
          "post_enabled": true,
          "activity_url": "https://socialcast.socialcast.test/groups/2-testgr%C3%B8up2/messages_activity",
          "mention_name": "testgrøup2"
        }
      ],
      "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": 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"
        }
      ],
      "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/2/messages.json
200
{
  "messages": [
    {
      "id": 2,
      "user": {
        "id": 11,
        "first_name": "J'øhn9",
        "last_name": "D'øe9",
        "name": "J'øhn9 D'øe9",
        "html_name": "J&#39;øhn9 D&#39;øe9",
        "url": "https://socialcast.socialcast.test/users/11-j%C3%B8hn9d%C3%B8e9",
        "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øhn9Døe9",
        "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-09-21T20:29:21+00:00",
      "updated_at": "2017-09-21T20:29:21+00:00",
      "attachments": [],
      "media_files": [],
      "contains_url_only": null,
      "external_resources": [],
      "tags": [],
      "last_interacted_at": 1506025761,
      "group": {
        "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"
      },
      "category_id": null,
      "recipients": [
        {
          "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",
          "private": false,
          "external_contributor": false,
          "chat_enabled": false,
          "post_enabled": true,
          "activity_url": "https://socialcast.socialcast.test/groups/2-testgr%C3%B8up2/messages_activity",
          "mention_name": "testgrøup2"
        }
      ],
      "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": 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"
        }
      ],
      "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
}