GET /api/badges/:id/messages

gets the most recent messages for the specified badge

Success Response Code: 200

Additional Routes

  • (GET) messages for specified badge - /api/users/:user_id/badges/:id/messages

Params

Param name Description
id
optional

badge to retrieve


Value: Must be a Integer
user_id
optional

limit the messages to only include thanks received by the specified user


Value: Must be a Integer

Response Fields

messages list of message results 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/badges/1/messages.json

Examples

GET 
200
{
  "messages": [
    {
      "id": 61,
      "user": {
        "id": 118,
        "first_name": "J'øhn106",
        "last_name": "D'øe104",
        "name": "J'øhn106 D'øe104",
        "html_name": "J&#39;øhn106 D&#39;øe104",
        "url": "https://socialcast.socialcast.test/users/118-j%C3%B8hn106d%C3%B8e104",
        "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øhn106Døe104",
        "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": "9. Animated Thanks to @Jøhn105Døe103",
      "body": "Excellent wørk & the like! 1",
      "html_body": "<div class=\"markdown-body\"><p>Excellent wørk &amp; the like! 1</p></div>",
      "action": "gave thanks",
      "verb": null,
      "message_type": "thanks",
      "icon": null,
      "url": "https://socialcast.socialcast.test/api/messages/61",
      "permalink_url": "https://socialcast.socialcast.test/messages/61",
      "external_url": null,
      "created_at": "2017-04-23T03:16:14+00:00",
      "updated_at": "2017-04-23T03:16:14+00:00",
      "attachments": [],
      "media_files": [],
      "contains_url_only": null,
      "external_resources": [],
      "tags": [],
      "last_interacted_at": 1492917374,
      "group": {},
      "category_id": null,
      "recipients": [
        {
          "id": 117,
          "first_name": "J'øhn105",
          "last_name": "D'øe103",
          "name": "J'øhn105 D'øe103",
          "html_name": "J&#39;øhn105 D&#39;øe103",
          "url": "https://socialcast.socialcast.test/users/117-j%C3%B8hn105d%C3%B8e103",
          "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øhn105Døe103",
          "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øhn105Døe103"
        }
      ],
      "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": {
        "name": "web",
        "formal_name": "Web App",
        "id": "web"
      },
      "poll": null,
      "embed": null,
      "hidden": null,
      "subscribed": null,
      "groups": [],
      "extensions": [
        {
          "extension_type": "thanks_announcement",
          "recipient": {
            "id": 117,
            "first_name": "J'øhn105",
            "last_name": "D'øe103",
            "name": "J'øhn105 D'øe103",
            "html_name": "J&#39;øhn105 D&#39;øe103",
            "url": "https://socialcast.socialcast.test/users/117-j%C3%B8hn105d%C3%B8e103",
            "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øhn105Døe103",
            "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
          },
          "recipients": [
            {
              "id": 117,
              "first_name": "J'øhn105",
              "last_name": "D'øe103",
              "name": "J'øhn105 D'øe103",
              "html_name": "J&#39;øhn105 D&#39;øe103",
              "url": "https://socialcast.socialcast.test/users/117-j%C3%B8hn105d%C3%B8e103",
              "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øhn105Døe103",
              "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
            }
          ],
          "badge": {
            "id": 62,
            "name": "9. Animated",
            "description": "first badge description",
            "url": "https://socialcast.socialcast.test/badges/62",
            "images": {
              "square30": "https://socialcast.socialcast.test/images/thanks/default_badges/visionary_square30.png",
              "square45": "https://socialcast.socialcast.test/images/thanks/default_badges/visionary_square45.png",
              "square70": "https://socialcast.socialcast.test/images/thanks/default_badges/visionary_square70.png",
              "square140": "https://socialcast.socialcast.test/images/thanks/default_badges/visionary_square140.png"
            }
          },
          "in_reference_to": null
        }
      ],
      "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
}