Messages

GET /api/messages
get a list of messages

GET /api/streams/:stream_id/messages
get a list of messages from the specified stream

GET /api/external_systems/:external_system_id/messages
get a list of messages from the specified external system

GET /api/users/:user_id/messages
get a list of messages related to the specified user

Also see preferred endpoint for Topic messages.

Success Response Code: 200

Params

Param name Description
since
optional

retrieving messages since a given time (unix timestamp format) (default=nil)


Value: Must be a Integer
stream_id
optional

retrieve messages from a particular stream. (default=user's default stream id)


Value: Must be a Integer
external_system_id
optional

retrieve messages from a particular external system


Value: Must be a Integer
user_id
optional

retrieve messages related to a particular user


Value: Must be a Integer
tag
optional

deprecated; use Topic messages endpoint instead. Retrieve messages that have been tagged with the given string; overrides stream_id value. (default=nil)


Value: Must be a String
comments_limit
optional

limit the included comment api response details to the N most recent comments


Value: Must be a Integer
likes_limit
optional

limit the included message-like api response details to the N most relevant likes per message


Value: Must be a Integer
comment_likes_limit
optional

limit the included comment-like api response details to the N most relevant likes per comment


Value: Must be a Integer

Response Fields

messages messages selected 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/messages.json
curl -X GET -v --basic -u "emily@socialcast.com:demo" https://demo.socialcast.com/api/streams/132/messages.json
curl -X GET -v --basic -u "emily@socialcast.com:demo" https://demo.socialcast.com/api/external_systems/132/messages.json
curl -X GET -v --basic -u "emily@socialcast.com:demo" https://demo.socialcast.com/api/users/28/messages.json

Examples

GET /api/messages.json
200
{
  "messages": [
    {
      "id": 8,
      "user": {
        "id": 23,
        "first_name": "J'øhn21",
        "last_name": "D'øe21",
        "name": "J'øhn21 D'øe21",
        "html_name": "J&#39;øhn21 D&#39;øe21",
        "url": "https://socialcast.socialcast.test/users/23-j%C3%B8hn21d%C3%B8e21",
        "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øhn21Døe21",
        "active": true,
        "terminated": false,
        "inactive": false,
        "role": "tenant_admin",
        "type": "User",
        "title": null,
        "out_of_office": false,
        "out_of_office_on": null,
        "back_in_office_on": null,
        "company_login": null
      },
      "title": "",
      "body": "blørg & stuff 5",
      "html_body": "<div class=\"markdown-body\"><p>blørg &amp; stuff 5</p></div>",
      "action": "made an announcement",
      "verb": null,
      "message_type": "broadcast_message",
      "icon": null,
      "url": "https://socialcast.socialcast.test/api/messages/8",
      "permalink_url": "https://socialcast.socialcast.test/messages/8",
      "external_url": null,
      "created_at": "2017-11-17T18:47:30+00:00",
      "updated_at": "2017-11-17T18:47:30+00:00",
      "attachments": [],
      "media_files": [],
      "contains_url_only": null,
      "external_resources": [],
      "tags": [],
      "last_interacted_at": 1510944450,
      "group": {},
      "category_id": null,
      "recipients": [],
      "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": [],
      "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
    },
    {
      "id": 7,
      "user": {
        "id": 28,
        "first_name": "J'øhn26",
        "last_name": "D'øe26",
        "name": "J'øhn26 D'øe26",
        "html_name": "J&#39;øhn26 D&#39;øe26",
        "url": "https://socialcast.socialcast.test/users/28-j%C3%B8hn26d%C3%B8e26",
        "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øhn26Døe26",
        "active": true,
        "terminated": false,
        "inactive": false,
        "role": "tenant_admin",
        "type": "User",
        "title": null,
        "out_of_office": false,
        "out_of_office_on": null,
        "back_in_office_on": null,
        "company_login": null
      },
      "title": "",
      "body": "blørg & stuff 4",
      "html_body": "<div class=\"markdown-body\"><p>blørg &amp; stuff 4</p></div>",
      "action": "made an announcement",
      "verb": null,
      "message_type": "broadcast_message",
      "icon": null,
      "url": "https://socialcast.socialcast.test/api/messages/7",
      "permalink_url": "https://socialcast.socialcast.test/messages/7",
      "external_url": null,
      "created_at": "2017-11-17T18:47:30+00:00",
      "updated_at": "2017-11-17T18:47:30+00:00",
      "attachments": [],
      "media_files": [],
      "contains_url_only": null,
      "external_resources": [],
      "tags": [],
      "last_interacted_at": 1510944450,
      "group": {},
      "category_id": null,
      "recipients": [],
      "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": [],
      "extensions": [],
      "new_group_id": null,
      "new_group_archived_at": null,
      "days_of_stickiness": 30,
      "sticky_for_current_user": true,
      "shareable": false,
      "share_count": 0,
      "client_provided_guid": null,
      "comments_count": 0,
      "comments": [],
      "likes": [],
      "likes_count": 0,
      "shared_message": null,
      "commentable": true
    },
    {
      "id": 5,
      "user": {
        "id": 27,
        "first_name": "J'øhn25",
        "last_name": "D'øe25",
        "name": "J'øhn25 D'øe25",
        "html_name": "J&#39;øhn25 D&#39;øe25",
        "url": "https://socialcast.socialcast.test/users/27-j%C3%B8hn25d%C3%B8e25",
        "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øhn25Døe25",
        "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": "",
      "body": "blørg & stuff 2",
      "html_body": "<div class=\"markdown-body\"><p>blørg &amp; stuff 2</p></div>",
      "action": "",
      "verb": null,
      "message_type": "status_message",
      "icon": null,
      "url": "https://socialcast.socialcast.test/api/messages/5",
      "permalink_url": "https://socialcast.socialcast.test/messages/5",
      "external_url": null,
      "created_at": "2017-11-17T18:47:29+00:00",
      "updated_at": "2017-11-17T18:47:29+00:00",
      "attachments": [],
      "media_files": [],
      "contains_url_only": null,
      "external_resources": [],
      "tags": [],
      "last_interacted_at": 1510944449,
      "group": {
        "id": 14,
        "name": "privatetest&grøup7",
        "html_name": "privatetest&amp;grøup7",
        "url": "https://socialcast.socialcast.test/groups/14-privatetestgr%C3%B8up7",
        "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øup7",
        "groupname": "privatetestgrøup7",
        "private": true,
        "external_contributor": false,
        "chat_enabled": false,
        "post_enabled": true,
        "activity_url": "https://socialcast.socialcast.test/groups/14-privatetestgr%C3%B8up7/messages_activity"
      },
      "category_id": null,
      "recipients": [
        {
          "id": 14,
          "name": "privatetest&grøup7",
          "html_name": "privatetest&amp;grøup7",
          "url": "https://socialcast.socialcast.test/groups/14-privatetestgr%C3%B8up7",
          "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øup7",
          "private": true,
          "external_contributor": false,
          "chat_enabled": false,
          "post_enabled": true,
          "activity_url": "https://socialcast.socialcast.test/groups/14-privatetestgr%C3%B8up7/messages_activity",
          "mention_name": "privatetestgrøup7"
        }
      ],
      "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": 14,
          "name": "privatetest&grøup7",
          "html_name": "privatetest&amp;grøup7",
          "url": "https://socialcast.socialcast.test/groups/14-privatetestgr%C3%B8up7",
          "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øup7",
          "groupname": "privatetestgrøup7",
          "private": true,
          "external_contributor": false,
          "chat_enabled": false,
          "post_enabled": true,
          "activity_url": "https://socialcast.socialcast.test/groups/14-privatetestgr%C3%B8up7/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
    },
    {
      "id": 4,
      "user": {
        "id": 26,
        "first_name": "J'øhn24",
        "last_name": "D'øe24",
        "name": "J'øhn24 D'øe24",
        "html_name": "J&#39;øhn24 D&#39;øe24",
        "url": "https://socialcast.socialcast.test/users/26-j%C3%B8hn24d%C3%B8e24",
        "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øhn24Døe24",
        "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": "",
      "body": "blørg & stuff 1",
      "html_body": "<div class=\"markdown-body\"><p>blørg &amp; stuff 1</p></div>",
      "action": "",
      "verb": null,
      "message_type": "status_message",
      "icon": null,
      "url": "https://socialcast.socialcast.test/api/messages/4",
      "permalink_url": "https://socialcast.socialcast.test/messages/4",
      "external_url": null,
      "created_at": "2017-11-17T18:47:29+00:00",
      "updated_at": "2017-11-17T18:47:29+00:00",
      "attachments": [],
      "media_files": [],
      "contains_url_only": null,
      "external_resources": [],
      "tags": [],
      "last_interacted_at": 1510944449,
      "group": {
        "id": 13,
        "name": "test&grøup6",
        "html_name": "test&amp;grøup6",
        "url": "https://socialcast.socialcast.test/groups/13-testgr%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": "testgrøup6",
        "groupname": "testgrøup6",
        "private": false,
        "external_contributor": false,
        "chat_enabled": false,
        "post_enabled": true,
        "activity_url": "https://socialcast.socialcast.test/groups/13-testgr%C3%B8up6/messages_activity"
      },
      "category_id": null,
      "recipients": [
        {
          "id": 13,
          "name": "test&grøup6",
          "html_name": "test&amp;grøup6",
          "url": "https://socialcast.socialcast.test/groups/13-testgr%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": "testgrøup6",
          "private": false,
          "external_contributor": false,
          "chat_enabled": false,
          "post_enabled": true,
          "activity_url": "https://socialcast.socialcast.test/groups/13-testgr%C3%B8up6/messages_activity",
          "mention_name": "testgrøup6"
        }
      ],
      "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": 13,
          "name": "test&grøup6",
          "html_name": "test&amp;grøup6",
          "url": "https://socialcast.socialcast.test/groups/13-testgr%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": "testgrøup6",
          "groupname": "testgrøup6",
          "private": false,
          "external_contributor": false,
          "chat_enabled": false,
          "post_enabled": true,
          "activity_url": "https://socialcast.socialcast.test/groups/13-testgr%C3%B8up6/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
    },
    {
      "id": 3,
      "user": {
        "id": 21,
        "first_name": "J'øhn19",
        "last_name": "D'øe19",
        "name": "J'øhn19 D'øe19",
        "html_name": "J&#39;øhn19 D&#39;øe19",
        "url": "https://socialcast.socialcast.test/users/21-j%C3%B8hn19d%C3%B8e19",
        "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øhn19Døe19",
        "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": "",
      "body": "quux **bold**",
      "html_body": "<div class=\"markdown-body\"><p>quux <strong>bold</strong></p></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-11-17T18:47:29+00:00",
      "updated_at": "2017-11-17T18:47:29+00:00",
      "attachments": [],
      "media_files": [],
      "contains_url_only": null,
      "external_resources": [],
      "tags": [],
      "last_interacted_at": 1510944449,
      "group": {},
      "category_id": null,
      "recipients": [],
      "thumbnail_url": null,
      "player_url": null,
      "player_params": null,
      "likable": false,
      "ratable": false,
      "rating": null,
      "ratings_average": null,
      "ratings_count": null,
      "editable": true,
      "deletable": true,
      "watchable": false,
      "watch": null,
      "flag": null,
      "source": null,
      "poll": null,
      "embed": null,
      "hidden": null,
      "subscribed": null,
      "groups": [],
      "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/messages/search
search for messages matching a phrase

Also see ContentFilters#index.

Success Response Code: 200

Params

Param name Description
q
optional

search term


Value: Must be a String
since
optional

retrieve messages since a given time (seconds from epoch in UTC)


Value: Must be a Integer
before
optional

retrieve messages before a given time (seconds from epoch in UTC)


Value: Must be a Integer
content_filter
optional

messages that are a certain type of content (e.g. “Photo”, “Attachment”). Expects the “key” value from a content filter response.


Value: Must be a String
tags
optional

limit response to only messages containing a given tag


Value: Must be an array of String
comments_limit
optional

limit the included comment api response details to the N most recent comments


Value: Must be a Integer
likes_limit
optional

limit the included message-like api response details to the N most relevant likes per message


Value: Must be a Integer
comment_likes_limit
optional

limit the included comment-like api response details to the N most relevant likes per comment


Value: Must be a Integer

Response Fields

message messages in the default stream 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/messages/search.json?q=widget"
curl -X GET -v --basic -u "emily@socialcast.com:demo" "https://demo.socialcast.com/api/messages/search.json?q=widget&since=1306425150"
#obtain a list of content filter keys such as "photo"
curl -X GET -v --basic -u "emily@socialcast.com:demo" "https://demo.socialcast.com/api/content_filters.json"
#retrieve messages containing the word "link" which have been tagged with "sales"
curl -X GET -v --basic -u"emily@socialcast.com:demo" "https://demo.socialcast.com/api/messages/search.json?q=link&tags\[\]=sales"
curl -X GET -v --basic -u "emily@socialcast.com:demo" "https://demo.socialcast.com/api/messages/search?q=widget&content_filter=photo"

Examples

GET /api/messages/search.json
200
{
  "messages": [
    {
      "id": 3,
      "user": {
        "id": 21,
        "first_name": "J'øhn19",
        "last_name": "D'øe19",
        "name": "J'øhn19 D'øe19",
        "html_name": "J&#39;øhn19 D&#39;øe19",
        "url": "https://socialcast.socialcast.test/users/21-j%C3%B8hn19d%C3%B8e19",
        "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øhn19Døe19",
        "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": "",
      "body": "quux **bold**",
      "html_body": "<div class=\"markdown-body\"><p>quux <strong>bold</strong></p></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-11-17T18:47:29+00:00",
      "updated_at": "2017-11-17T18:47:29+00:00",
      "attachments": [],
      "media_files": [],
      "contains_url_only": null,
      "external_resources": [],
      "tags": [],
      "last_interacted_at": 1510944449,
      "group": {},
      "category_id": null,
      "recipients": [],
      "thumbnail_url": null,
      "player_url": null,
      "player_params": null,
      "likable": false,
      "ratable": false,
      "rating": null,
      "ratings_average": null,
      "ratings_count": null,
      "editable": true,
      "deletable": true,
      "watchable": false,
      "watch": null,
      "flag": null,
      "source": null,
      "poll": null,
      "embed": null,
      "hidden": null,
      "subscribed": null,
      "groups": [],
      "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/messages/:message_id
fetch a specific message

Success Response Code: 200

Params

Param name Description
message_id
optional

id of the message to fetch


Value: Must be a Integer
comments_limit
optional

limit the included comment api response details to the N most recent comments


Value: Must be a Integer
likes_limit
optional

limit the included message-like api response details to the N most relevant likes per message


Value: Must be a Integer
comment_likes_limit
optional

limit the included comment-like api response details to the N most relevant likes per comment


Value: Must be a Integer

Response Fields

id id of the message Integer
user the user who created the message User
title message's title String
body message's body String
action text to construct a sentence from the title (e.g. "asked a question") String
verb text to construct a sentence with the user's name (e.g. "User thanked") String
message_type a description of the type of message posted (e.g. "status_message", "chat") String
icon url for the icon image for this message_type String
url url to interact with this message String
permalink_url message's permalink page String
external_url external URL for shared links, bookmarks, etc. String
created_at time the message was created DateTime
updated_at time the message was last updated DateTime
likes likes attached to this message Array<Like>
likes_count number of likes for this message Integer
commentable can the current user create comments on this message Boolean
comments comments attached to this message Array<Comment>
comments_count number of comments for this message Integer
external_resources url links associated with this message, which can include oembed data. Array<ExternalResource>
extensions extensions associated with this message, which can include group, thanks, challenges, project or town_hall data Array<Extension>
recipients users and groups that are @ mentioned, or groups that are referenced by group_id Array<User or Group>
shareable can this message be shared. There are some restrictions on which messages can be shared based on message type and visibility. See shared_message_id parameter for create Message and Remark Boolean
share_count number of times the message has been shared publicly Integer
shared_message shared message referenced by this message. Contains all Message response fields except likes, comments, shared_message Hash
client_provided_guid the client-provided unique identifier for the message, if any. Used for duplicate detection/post aggregation etc. String

Example Curl Commands

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

Examples

GET /api/messages/3.json
200
{
  "message": {
    "id": 3,
    "user": {
      "id": 21,
      "first_name": "J'øhn19",
      "last_name": "D'øe19",
      "name": "J'øhn19 D'øe19",
      "html_name": "J&#39;øhn19 D&#39;øe19",
      "url": "https://socialcast.socialcast.test/users/21-j%C3%B8hn19d%C3%B8e19",
      "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øhn19Døe19",
      "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": "Socialcast Product Overview: Communication + Collaboration",
    "body": "http://www.youtube.com/watch?v=MjIyETGKvG0 @Jøhn20Døe20 @testgrøup6",
    "html_body": "<div class=\"markdown-body\"><p><a href=\"http://www.youtube.com/watch?v=MjIyETGKvG0\" title=\"http://www.youtube.com/watch?v=MjIyETGKvG0\">www.youtube.com/watch?v=MjIyETGKvG0</a> <a class=\"internal js-use-turbolink js-mention-user-22\" data-mention-type=\"User\" data-mini-profile=\"true\" data-tooltip-position=\"bottom_left\" data-tooltip-class=\"user_mini_profile\" data-user-id=\"22\" data-tooltip-url=\"/api/users/22-j%C3%B8hn20d%C3%B8e20.json\" href=\"https://socialcast.socialcast.test/users/22-j%C3%B8hn20d%C3%B8e20\" title=\"https://socialcast.socialcast.test/users/22-j%C3%B8hn20d%C3%B8e20\">@Jøhn20Døe20</a> <a class=\"internal js-use-turbolink\" href=\"https://socialcast.socialcast.test/groups/13-testgr%C3%B8up6\" title=\"https://socialcast.socialcast.test/groups/13-testgr%C3%B8up6\">@testgrøup6</a></p></div>",
    "action": "posted a link",
    "verb": null,
    "message_type": "link",
    "icon": null,
    "url": "https://socialcast.socialcast.test/api/messages/3",
    "permalink_url": "https://socialcast.socialcast.test/messages/3",
    "external_url": null,
    "created_at": "2017-11-17T18:47:29+00:00",
    "updated_at": "2017-11-17T18:47:34+00:00",
    "attachments": [],
    "media_files": [],
    "contains_url_only": null,
    "external_resources": [
      {
        "id": 1,
        "url": "http://www.youtube.com/watch?v=MjIyETGKvG0",
        "title": "Socialcast Product Overview: Communication + Collaboration",
        "description": null,
        "canonical_hashtag": null,
        "type": null,
        "source": {
          "name": "YouTube",
          "url": "http://www.youtube.com/"
        },
        "tags": [],
        "oembed": {
          "version": "1.0",
          "provider_name": "YouTube",
          "provider_url": "http://www.youtube.com/",
          "url": "http://www.youtube.com/watch?v=MjIyETGKvG0",
          "title": "Socialcast Product Overview: Communication + Collaboration",
          "type": "video",
          "thumbnail_url": "https://s3.amazonaws.com/socialcast_test/tenants/1/media_files/1/hqdefault_stream_square.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20171116%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20171116T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=14b4b59f53e623b2355e49b8a7791ee1593603f759e5a2c8202972e19c5665a9",
          "html": "<iframe width=\"480\" height=\"270\" src=\"http://www.youtube.com/embed/MjIyETGKvG0?feature=oembed\" frameborder=\"0\" allowfullscreen></iframe>",
          "width": 480,
          "height": 270,
          "thumbnail_width": 75,
          "thumbnail_height": 75,
          "author_url": "http://www.youtube.com/user/SocialcastByVMware",
          "author_name": "Socialcast Enterprise Social Networking",
          "description": null
        },
        "media_files": [
          {
            "id": 1,
            "canonical": true,
            "title": "Socialcast Product Overview: Communication + Collaboration",
            "description": null,
            "file_name": "hqdefault.jpg",
            "thumbnails": {
              "stream": "https://s3.amazonaws.com/socialcast_test/tenants/1/media_files/1/hqdefault_stream.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20171116%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20171116T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=da5b9a96967a6baa9bca05b3a4e5257c050079339f633cd0103346abb0293d18",
              "stream_square": "https://s3.amazonaws.com/socialcast_test/tenants/1/media_files/1/hqdefault_stream_square.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20171116%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20171116T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=14b4b59f53e623b2355e49b8a7791ee1593603f759e5a2c8202972e19c5665a9",
              "square45": "https://s3.amazonaws.com/socialcast_test/tenants/1/media_files/1/hqdefault_square45.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20171116%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20171116T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=fa1b602c026b0034a0523df5cdca22ef8e3effcda3b34748c5078b49349ca530",
              "scaled480": "https://s3.amazonaws.com/socialcast_test/tenants/1/media_files/1/hqdefault_scaled480.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20171116%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20171116T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=29a1e1b67f2ffd4c245dbebc2234bdc15f0827a3da0612124305c657629927c0"
            },
            "thumbnail_metadata": {
              "stream": {
                "width": 50.0,
                "height": 64.0
              },
              "stream_square": {
                "width": 75.0,
                "height": 75.0
              },
              "square45": {
                "width": 45.0,
                "height": 45.0
              },
              "scaled480": {
                "width": 50.0,
                "height": 64.0
              }
            },
            "width": 50,
            "height": 64,
            "page_url": "http://www.youtube.com/watch?v=MjIyETGKvG0",
            "url": "https://s3.amazonaws.com/socialcast_test/tenants/1/media_files/1/hqdefault.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20171116%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20171116T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=8af13cfecbdab4aa7b911ffcea42dfa67f9bb4bfa043b1c2dd1788077c5bd1af",
            "content_type": "image/png",
            "attachment_id": null
          }
        ]
      }
    ],
    "tags": [],
    "last_interacted_at": 1510944449,
    "group": {
      "id": 13,
      "name": "test&grøup6",
      "html_name": "test&amp;grøup6",
      "url": "https://socialcast.socialcast.test/groups/13-testgr%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": "testgrøup6",
      "groupname": "testgrøup6",
      "private": false,
      "external_contributor": false,
      "chat_enabled": false,
      "post_enabled": true,
      "activity_url": "https://socialcast.socialcast.test/groups/13-testgr%C3%B8up6/messages_activity"
    },
    "category_id": null,
    "recipients": [
      {
        "id": 22,
        "first_name": "J'øhn20",
        "last_name": "D'øe20",
        "name": "J'øhn20 D'øe20",
        "html_name": "J&#39;øhn20 D&#39;øe20",
        "url": "https://socialcast.socialcast.test/users/22-j%C3%B8hn20d%C3%B8e20",
        "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øhn20Døe20",
        "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,
        "mention_name": "Jøhn20Døe20"
      },
      {
        "id": 13,
        "name": "test&grøup6",
        "html_name": "test&amp;grøup6",
        "url": "https://socialcast.socialcast.test/groups/13-testgr%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": "testgrøup6",
        "private": false,
        "external_contributor": false,
        "chat_enabled": false,
        "post_enabled": true,
        "activity_url": "https://socialcast.socialcast.test/groups/13-testgr%C3%B8up6/messages_activity",
        "mention_name": "testgrøup6"
      }
    ],
    "thumbnail_url": null,
    "player_url": null,
    "player_params": null,
    "likable": false,
    "ratable": false,
    "rating": null,
    "ratings_average": null,
    "ratings_count": null,
    "editable": true,
    "deletable": true,
    "watchable": false,
    "watch": null,
    "flag": null,
    "source": null,
    "poll": null,
    "embed": null,
    "hidden": null,
    "subscribed": null,
    "groups": [
      {
        "id": 13,
        "name": "test&grøup6",
        "html_name": "test&amp;grøup6",
        "url": "https://socialcast.socialcast.test/groups/13-testgr%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": "testgrøup6",
        "groupname": "testgrøup6",
        "private": false,
        "external_contributor": false,
        "chat_enabled": false,
        "post_enabled": true,
        "activity_url": "https://socialcast.socialcast.test/groups/13-testgr%C3%B8up6/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
  }
}

PUT /api/messages/:message_id
update a message

Success Response Code: 200

Params

Param name Description
message_id
optional

message to update


Value: Must be a Integer
message
optional

Value: Must be a Hash
message[body]
required

message's body


Value: Must be a String
message[url]
optional

external URL for this message


Value: Must be a String
message[attachment]
optional

file to attach to the message


Value: Must be a File
message[attachment_ids]
optional

array of existing attachment ids to attach to the message


Value: Must be an array of Integer
message[group_id]
optional

submit this message to a group


Value: Must be a Integer
message[player_url]
optional

embed a flash player hosted at this URL. If player_url is specified, thumbnail_url must also be specified


Value: Must be a String
message[thumbnail_url]
optional

display the image located at this URL before embedding the flash player


Value: Must be a String
message[player_params]
optional

pass these FlashVars to the embedded flash player


Value: Must be a String
message[shared_message_id]
optional

id of the message to be shared. Note that the message to be shared should have shareable=true in its API response


Value: Must be a Integer

Response Fields

id id of the message Integer
user the user who created the message User
title message's title String
body message's body String
action text to construct a sentence from the title (e.g. "asked a question") String
verb text to construct a sentence with the user's name (e.g. "User thanked") String
message_type a description of the type of message posted (e.g. "status_message", "chat") String
icon url for the icon image for this message_type String
url url to interact with this message String
permalink_url message's permalink page String
external_url external URL for shared links, bookmarks, etc. String
created_at time the message was created DateTime
updated_at time the message was last updated DateTime
likes likes attached to this message Array<Like>
likes_count number of likes for this message Integer
commentable can the current user create comments on this message Boolean
comments comments attached to this message Array<Comment>
comments_count number of comments for this message Integer
external_resources url links associated with this message, which can include oembed data. Array<ExternalResource>
extensions extensions associated with this message, which can include group, thanks, challenges, project or town_hall data Array<Extension>
recipients users and groups that are @ mentioned, or groups that are referenced by group_id Array<User or Group>
shareable can this message be shared. There are some restrictions on which messages can be shared based on message type and visibility. See shared_message_id parameter for create Message and Remark Boolean
share_count number of times the message has been shared publicly Integer
shared_message shared message referenced by this message. Contains all Message response fields except likes, comments, shared_message Hash
client_provided_guid the client-provided unique identifier for the message, if any. Used for duplicate detection/post aggregation etc. String

Example Curl Commands

curl -X PUT -v --basic -u "emily@socialcast.com:demo" "https://demo.socialcast.com/api/messages/443.json" -H "Content-Type: application/json" -d '{"message":{"body":"Updated message!"}}'

Examples

PUT /api/messages/3.json
{
  "message": {
    "title": "updated"
  }
}
200
{
  "message": {
    "id": 3,
    "user": {
      "id": 21,
      "first_name": "J'øhn19",
      "last_name": "D'øe19",
      "name": "J'øhn19 D'øe19",
      "html_name": "J&#39;øhn19 D&#39;øe19",
      "url": "https://socialcast.socialcast.test/users/21-j%C3%B8hn19d%C3%B8e19",
      "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øhn19Døe19",
      "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": "updated",
    "body": "quux **bold**",
    "html_body": "<div class=\"markdown-body\"><p>quux <strong>bold</strong></p></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-11-17T18:47:29+00:00",
    "updated_at": "2017-11-17T18:47:34+00:00",
    "attachments": [],
    "media_files": [],
    "contains_url_only": null,
    "external_resources": [],
    "tags": [],
    "last_interacted_at": 1510944449,
    "group": {},
    "category_id": null,
    "recipients": [],
    "thumbnail_url": null,
    "player_url": null,
    "player_params": null,
    "likable": false,
    "ratable": false,
    "rating": null,
    "ratings_average": null,
    "ratings_count": null,
    "editable": true,
    "deletable": true,
    "watchable": false,
    "watch": null,
    "flag": null,
    "source": null,
    "poll": null,
    "embed": null,
    "hidden": null,
    "subscribed": null,
    "groups": [],
    "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
  }
}

DELETE /api/messages/:message_id
destroy a message

Success Response Code: 204

Params

Param name Description
message_id
optional

message to destroy


Value: Must be a Integer

Example Curl Commands

curl -X DELETE -v --basic -u "emily@socialcast.com:demo" "https://demo.socialcast.com/api/messages/443"

Examples

DELETE /api/messages/3
{}
204

POST /api/messages
create a new message

POST /api/streams/:stream_id/messages
create a new message for the specified stream

POST /api/external_systems/:external_system_id/messages
create a new external system message from an authorized admin user

Also see polls#create to create a poll for poll_id.

Success Response Code: 201

Params

Param name Description
external_system_id
optional

ID of the external system to create the message for


Value: Must be a Integer
message
optional

Value: Must be a Hash
message[body]
required

message's body


Value: Must be a String
message[url]
optional

external URL for this message


Value: Must be a String
message[attachment]
optional

file to attach to the message


Value: Must be a File
message[attachment_ids]
optional

array of existing attachment ids to attach to the message


Value: Must be an array of Integer
message[group_id]
optional

submit this message to a group


Value: Must be a Integer
message[player_url]
optional

embed a flash player hosted at this URL. If player_url is specified, thumbnail_url must also be specified


Value: Must be a String
message[thumbnail_url]
optional

display the image located at this URL before embedding the flash player


Value: Must be a String
message[player_params]
optional

pass these FlashVars to the embedded flash player


Value: Must be a String
message[shared_message_id]
optional

id of the message to be shared. Note that the message to be shared should have shareable=true in its API response


Value: Must be a Integer
message[poll_id]
optional

pass the ID of a poll to associate the poll with this message


Value: Must be a Integer

Response Fields

id id of the message Integer
user the user who created the message User
title message's title String
body message's body String
action text to construct a sentence from the title (e.g. "asked a question") String
verb text to construct a sentence with the user's name (e.g. "User thanked") String
message_type a description of the type of message posted (e.g. "status_message", "chat") String
icon url for the icon image for this message_type String
url url to interact with this message String
permalink_url message's permalink page String
external_url external URL for shared links, bookmarks, etc. String
created_at time the message was created DateTime
updated_at time the message was last updated DateTime
likes likes attached to this message Array<Like>
likes_count number of likes for this message Integer
commentable can the current user create comments on this message Boolean
comments comments attached to this message Array<Comment>
comments_count number of comments for this message Integer
external_resources url links associated with this message, which can include oembed data. Array<ExternalResource>
extensions extensions associated with this message, which can include group, thanks, challenges, project or town_hall data Array<Extension>
recipients users and groups that are @ mentioned, or groups that are referenced by group_id Array<User or Group>
shareable can this message be shared. There are some restrictions on which messages can be shared based on message type and visibility. See shared_message_id parameter for create Message and Remark Boolean
share_count number of times the message has been shared publicly Integer
shared_message shared message referenced by this message. Contains all Message response fields except likes, comments, shared_message Hash
client_provided_guid the client-provided unique identifier for the message, if any. Used for duplicate detection/post aggregation etc. String

Example Curl Commands

curl -X POST -v --basic -u "emily@socialcast.com:demo" "https://demo.socialcast.com/api/messages.json" -H "Content-Type: application/json" -d '{"message":{"body":"New message!"}}'
curl -X POST -v --basic -u "emily@socialcast.com:demo" "https://demo.socialcast.com/api/streams/239/messages.json" -H "Content-Type: application/json" -d '{"message":{"body":"New message!"}}'
curl -X POST -v --basic -u "admin@socialcast.com:adminpassword" "https://demo.socialcast.com/api/external_systems/1/messages.json" -H "Content-Type: application/json" -d '{"message":{"body":"New message!"}}'
#creating a poll for a message
curl -X POST -v --basic -u "emily@socialcast.com:demo" https://demo.socialcast.com/api/polls.json -H"Content-Type: application/json" -d'{"poll":{"question":"Hands up, who likes me?","poll_answers_attributes":{"1":{"answer":"YES!"},"2":{"answer":"You are OK"},"3":{"answer":"Absolutely not"}}}}'
#binding the created poll to a message
curl -X POST -v --basic -u "emily@socialcast.com:demo" https://demo.socialcast.com/api/messages.json -H "Content-Type: application/json" -d '{"message":{"poll_id":"5", "body":"creating a message with poll"}}'
curl -X POST -v --basic -u "emily@socialcast.com:demo" "https://demo.socialcast.com/api/messages.json" -F message[attachment]=@path/to/file
curl -X POST -v --basic -u "emily@socialcast.com:demo" "https://demo.socialcast.com/api/messages.json" -H "Content-Type: application/json" -d '{"message":{"attachment":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAASCAYAAAC5DOVpAAAAAXNSR0IArs4c6QAAAthJREFUOBGNVMtrE2EQ/+3m0byqSfqypg21pqaoxdSqFUFQqWgpKkXQgwgexJsV/wMvorcelILiwYMgeKm0IPRgxUuhtYpIC7aNStNXNDbppnltms3nfFt32aSKDizfb2Z+Mzs7M98KKJO+wXAHM7EBMBwpc/1TFYyMm0Oz18CER2SzGu3/i00ase9luJfwc3p0G/dVmEWcafGird6J5WQecqHIzX8UNfDW8Bc/A3tDDAtneR0WnKYEqXwBJ3e70dXiQZPHBr+7AnOrOXQHvchuKFjLKSVJRa4xVrxHh13zXD1Yi66AG3trnfDYzZqZsAVNbhtONLtxo3MnxJImAeLt4RkfY7isRxjAAfq0kbkEYukCValgcCqG1jqHyigUmYG5Cc0KM/VQbSV9ejIRRai+EvNSFvFMAa8+r8JpNWF+TUZEkjEfl/EpmkJ5PjNjLFT+igv7qnHI58LTySiuhOrg27Y53LNBj2q72FaFw34XHo+vIEMVa8J7VqMp/AzVu3C0sRISNdduMeuJuM9F1e3f4cRMLINmGsgpGo5RRNqrlNHQ5LWpamQti0b31nVr2F6Br/Gcymn+zdXiRYgsoin8XEluIJFVqOFFpGQFSbmgu/mO8YozeUarUaQKs7qPA6qMTRgt4wsSXocTCFQ5kKPgZx9+6O633yRMRdNo9zkwubSOkdm47uNANMv2UTpjRut7ItY4N/dr9mdGr258IYl1qnRPtQMcl4vYf6kxS9t/1+hI04Q+LqfxbnFdHf/kYgpfEznEUhsIr2Yx/T2NSEI2hnA8pO7wnRfT1lWbdYz+FB0ag+8VT8qlga6Rr9JG1UiqbrOIyFHPDCIxQWnXLwS/CYWiOEYEv4GkQ6tJQF7ZuvVEyDNB6H54PjCq3k0e0X8uuKSYzZ0QUDIQLdtfEkVRLB7niThPT8aVgZ5d0WgucIwJuE5qycpwv0EkQcB9WRZbH/QG9Zf/Ag14Go6USGO+AAAAAElFTkSuQmCC"}}'

Examples

POST /api/messages.json
{
  "message": {
    "title": "from mike"
  }
}
201
{
  "message": {
    "id": 16,
    "user": {
      "id": 21,
      "first_name": "J'øhn19",
      "last_name": "D'øe19",
      "name": "J'øhn19 D'øe19",
      "html_name": "J&#39;øhn19 D&#39;øe19",
      "url": "https://socialcast.socialcast.test/users/21-j%C3%B8hn19d%C3%B8e19",
      "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øhn19Døe19",
      "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": "from mike",
    "body": "",
    "html_body": "<div class=\"markdown-body\"></div>",
    "action": "",
    "verb": null,
    "message_type": "status_message",
    "icon": null,
    "url": "https://socialcast.socialcast.test/api/messages/16",
    "permalink_url": "https://socialcast.socialcast.test/messages/16",
    "external_url": null,
    "created_at": "2017-11-17T18:47:32+00:00",
    "updated_at": "2017-11-17T18:47:32+00:00",
    "attachments": [],
    "media_files": [],
    "contains_url_only": null,
    "external_resources": [],
    "tags": [],
    "last_interacted_at": 1510944452,
    "group": {},
    "category_id": null,
    "recipients": [],
    "thumbnail_url": null,
    "player_url": null,
    "player_params": null,
    "likable": false,
    "ratable": false,
    "rating": null,
    "ratings_average": null,
    "ratings_count": null,
    "editable": true,
    "deletable": true,
    "watchable": false,
    "watch": null,
    "flag": null,
    "source": {
      "name": "API",
      "url": "https://socialcast.socialcast.test/api",
      "formal_name": "Socialcast API",
      "id": "api"
    },
    "poll": null,
    "embed": null,
    "hidden": null,
    "subscribed": null,
    "groups": [],
    "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,
    "in_origin_stream": true
  }
}