Newer Version Available

This content describes an older version of this product. View Latest

Record Feed Resource

The feed of the specified record, which could be a group, person, object, file and so on. You can post feed items to the record feed.

Available resources are:

Resource Description
/chatter/feeds/record/recordId Returns a URL to the feed-items for all the records the current user is following, or a URL to all the feed-items of the specified recordId. Use this resource to get a group feed.
/chatter/feeds/record/recordId/feed-items Returns the feed-items for all the records the logged-in user is following, or all the feed-items of the specified recordId. Use this resource to post a new feed item and to search a feed. To use this resource to get the feed items for a specific group, specify the group ID as the recordId.

Record Feed URL

Returns a URL to the feed-items for all the records the current user is following, or a URL to all the feed-items of the specified recordId. Use this resource to get a group feed.

Resource
1/chatter/feeds/record/me
or
1/chatter/feeds/record/recordId

If recordId is a user ID, it must be the same as the current user or the alias me.

Note

Available since version
23.0
HTTP methods
GET or HEAD
Request parameters
Parameter Name Type Description
sort String Specifies the order returned by the sort, such as by date created or last modified:
  • CreatedDateDesc—Sorts the feed items by most recent post date.
  • LastModifiedDateDesc—Sorts the feed items by most recent activity, which includes new feed items and comments.
The default value is CreatedDescDate.
Response body
Feed

Record Feed Items

Returns the feed-items for all the records the logged-in user is following, or all the feed-items of the specified recordId. Use this resource to post a new feed item and to search a feed. To use this resource to get the feed items for a specific group, specify the group ID as the recordId.

For information about posting a feed item, see Using POST, PATCH, or PUT for Input.

For information about uploading a binary file and attaching it to a feed item, see Uploading Binary Files.

You cannot post a feed item to a Record Feed if the record is of type ContentDocument.

Note

As of API version 29.0, feed items can contain 5000 characters. This change is backwards compatible; all earlier API versions support the 5000 character limit.

Resource
1/chatter/feeds/record/me/feed-items
or
1/chatter/feeds/record/recordId/feed-items

If recordId is a user ID, it must be the same as the current user or the alias me.

Note

Available since version
23.0
HTTP methods
GET, POST or HEAD
Request parameters for GET or HEAD
Parameter Name Type Description Required or Optional Available Version
density String The density of the feed. One of these values:
  • AllUpdates—Displays all posts and comments from people and records the user follows and groups the user is a member of.
  • FewerUpdates—Displays all posts and comments from people and records the user follows and groups the user is a member of, but hides system-generated posts from records that nobody commented on.

The default value is AllUpdates.

Optional 29.0
page String A generated token that indicates the view of feed items in the feed. Page tokens are returned as part of the response body, in one of the URL parameters, such as nextPageURL, for example:
1"nextPageUrl": 
2"/services/data/v30.0/
3chatter/feeds/news/
4005D0000001GLowIAN
5/feed-items
6?page=2011-03-30T17:34:50Z,
70D5D0000000DSv4KAG"
Optional 23.0
pageSize Integer Specifies the number of items per page. Valid values are between 1 and 100. If you don't specify a size, the default is 25. Optional 23.0
q String One or more keywords to search for in the body and comments of feed items in this feed.

The search string can contain wildcards and must contain at least two characters that aren’t wildcards. See Wildcards.

Optional 28.0
recentComment​​Count Integer Maximum number of comments to include per feed item. The default value is 3. The maximum value is 25. Optional 29.0
showInternal​​Only Boolean Specifies whether to show only feed items from internal (non-community) users (true), or not (false). The default value is false. Optional 30.0
sort String Specifies the order returned by the sort, such as by date created or last modified:
  • CreatedDateDesc—Sorts the feed items by most recent post date.
  • LastModifiedDateDesc—Sorts the feed items by most recent activity, which includes new feed items and comments.
The default value is CreatedDescDate.
Optional 23.0
updatedSince String An opaque token defining the modification time stamp of the feed and the sort order.

Do not construct this token. Retrieve this token from the updatesToken property of the Feed Item Page response body.

Optional 30.0
Request body for POST
Root XML tag
<feedItem>
JSON
The following example attaches a poll to a feed item:
1{ "attachment": 
2  {
3     "attachmentType":"Poll",
4     "pollChoices": [
5        "Monday", 
6        "Tuesday"
7     ]
8  },
9  "body" : {
10     "messageSegments" : [
11     {
12        "type" : "Text",
13        "text" : "When should we meet for release planning?"
14     }
15     ]
16  }
17}
Properties
Name Type Description Available Version
attachment Depends on type. Optional. You can specify only one of these values in the attachment parameter. Values are:
body Message Body Input Description of message body. The body can contain up to 25 mentions.

If you specify originalFeedItemId to share a feed item, use the body property to add a comment to the feed item.

If this feed item is shared, this value is the body of the first comment.

23.0
isBookmarked​ByCurrentUser Boolean Optional. Specifies if the new feed item should be bookmarked for the user (true) or not (false). Default value is false. 24.0
originalFeedItemId String Optional. If this feed item is shared, this is the original feed item 18-character ID

This parameter takes precedence over all other parameters. For example, if you share a post and also try to upload a file, the generated feed-item only contains the shared post. You should only share a post or upload a file, not both in the same post.

Note

24.0
visibility String Optional. Who can see the post. Valid values are:
  • InternalUsers—If Communities is enabled, only members of the default, internal community can see the feed item.
  • AllUsers—If Communities is enabled, all members of the community can see the feed item.
Default values:
  • For external users, the default value is AllUsers. External users must use this value to see their posts.
  • For internal users, the default value is InternalUsers. Internal users can accept this value or use the value AllUsers to allow external users to see their posts.
If the parent of the feed item is a User or a Group, the visibility of the feed item must be AllUsers.
26.0
Request parameters for POST
Use one of the following sets of parameters. For example, you can’t post a link and attach a file in the same request.

Parameters for attaching an existing file

Parameter Name Type Description Required or Optional Available Version
attachmentType String The attachment type. Must contain the value ExistingContent. Required 27.0
contentDocumentId String 18-character ID of an existing file. Required 23.0
isBookmarked​​ByCurrentUser Boolean Specifies if the new feed item should be bookmarked for the user (true) or not (false). Default value is false. Optional 26.0
text String Text of the feed item. Optional 23.0
visibility String Who can see the post. Valid values are:
  • InternalUsers—If Communities is enabled, only members of the default, internal community can see the feed item.
  • AllUsers—If Communities is enabled, all members of the community can see the feed item.
Default values:
  • For external users, the default value is AllUsers. External users must use this value to see their posts.
  • For internal users, the default value is InternalUsers. Internal users can accept this value or use the value AllUsers to allow external users to see their posts.
If the parent of the feed item is a User or a Group, the visibility of the feed item must be AllUsers.
Optional 26.0

Parameters for attaching a new file

Parameter Name Type Description Required or Optional Available Version
attachmentType String The attachment type. Must contain the value NewFile. Required 27.0
desc String Description of file being posted.

This parameter should not be used as of version 27.0. Use description instead.

Attention

Optional 23.0–26.0
description String Description of file being posted. Optional 27.0
fileName String File name of the file being posted.

This parameter should not be used as of version 24.0. Use title instead.

Attention

Required 23.0–24.0
isBookmarked​​ByCurrentUser Boolean Specifies if the new feed item should be bookmarked for the user (true) or not (false). Default value is false. Optional 26.0
text String Text of the feed item. Optional 23.0
title String File name of a file to be uploaded and posted. Required 24.0
visibility String Who can see the post. Valid values are:
  • InternalUsers—If Communities is enabled, only members of the default, internal community can see the feed item.
  • AllUsers—If Communities is enabled, all members of the community can see the feed item.
Default values:
  • For external users, the default value is AllUsers. External users must use this value to see their posts.
  • For internal users, the default value is InternalUsers. Internal users can accept this value or use the value AllUsers to allow external users to see their posts.
If the parent of the feed item is a User or a Group, the visibility of the feed item must be AllUsers.
Optional 26.0
Parameters for posting a link
Parameter Name Type Description Required or Optional Available Version
attachmentType String The attachment type. Must contain the value Link. Required 27.0
isBookmarked​​ByCurrentUser Boolean Specifies if the new feed item should be bookmarked for the user (true) or not (false). Default value is false. Optional 26.0
text String Text of the feed item. Optional 23.0
url String URL of the link. Required 23.0
urlName String Name of the URL. Optional 23.0
visibility String Who can see the post. Valid values are:
  • InternalUsers—If Communities is enabled, only members of the default, internal community can see the feed item.
  • AllUsers—If Communities is enabled, all members of the community can see the feed item.
Default values:
  • For external users, the default value is AllUsers. External users must use this value to see their posts.
  • For internal users, the default value is InternalUsers. Internal users can accept this value or use the value AllUsers to allow external users to see their posts.
If the parent of the feed item is a User or a Group, the visibility of the feed item must be AllUsers.
Optional 26.0
Parameters for posting a poll
Parameter Name Type Description Required or Optional Available Version
attachmentType String The attachment type. Must contain the value Poll. Required 27.0
isBookmarked​​ByCurrentUser Boolean Specifies if the new feed item should be bookmarked for the user (true) or not (false). Default value is false. Optional 26.0
pollChoice1 through pollChoice10 String The choices used to create a new feed item with a poll. You must specify 2–10 poll choices for each poll. Required 26.0
text String Text of the feed item. Required 23.0
visibility String Who can see the post. Valid values are:
  • InternalUsers—If Communities is enabled, only members of the default, internal community can see the feed item.
  • AllUsers—If Communities is enabled, all members of the community can see the feed item.
Default values:
  • For external users, the default value is AllUsers. External users must use this value to see their posts.
  • For internal users, the default value is InternalUsers. Internal users can accept this value or use the value AllUsers to allow external users to see their posts.
If the parent of the feed item is a User or a Group, the visibility of the feed item must be AllUsers.
Optional 26.0
Parameters for sharing a post
Parameter Name Type Description Required or Optional Available Version
isBookmarked​ByCurrentUser Boolean Specifies if the new feed item should be bookmarked for the user (true) or not (false). Default value is false. Optional 26.0
originalFeedItemId String The ID of the feed item you want to share.18-character ID

Sharing a post takes precedence over uploading a file. Do not share a post and upload a file in the same post.

Note

Required 24.0
text String A comment on the shared feed item. Optional 28.0
visibility String Who can see the post. Valid values are:
  • InternalUsers—If Communities is enabled, only members of the default, internal community can see the feed item.
  • AllUsers—If Communities is enabled, all members of the community can see the feed item.
Default values:
  • For external users, the default value is AllUsers. External users must use this value to see their posts.
  • For internal users, the default value is InternalUsers. Internal users can accept this value or use the value AllUsers to allow external users to see their posts.
If the parent of the feed item is a User or a Group, the visibility of the feed item must be AllUsers.
Optional 26.0
Parameters for posting text only
Parameter Name Type Description Required or Optional Available Version
isBookmarked​​ByCurrentUser Boolean Specifies if the new feed item should be bookmarked for the user (true) or not (false). Default value is false. Optional 26.0
text String Text of the feed item. The maximum number of characters is 1000. Required 23.0
visibility String Who can see the post. Valid values are:
  • InternalUsers—If Communities is enabled, only members of the default, internal community can see the feed item.
  • AllUsers—If Communities is enabled, all members of the community can see the feed item.
Default values:
  • For external users, the default value is AllUsers. External users must use this value to see their posts.
  • For internal users, the default value is InternalUsers. Internal users can accept this value or use the value AllUsers to allow external users to see their posts.
If the parent of the feed item is a User or a Group, the visibility of the feed item must be AllUsers.
Optional 26.0
Parameters for posting a canvas app
Parameter Name Type Description Required or Optional Available Version
attachmentType String The attachment type. Must contain the value Canvas. Required 29.0
description String Description of the canvas app Optional 29.0
developerName String The developer name (API name) of the canvas app Required 29.0
height String The height of the canvas app in pixels. Default height is 200 pixels. Optional 29.0
isBookmarked​​ByCurrentUser Boolean Specifies if the new feed item should be bookmarked for the user (true) or not (false). Default value is false. Optional 29.0
namespacePrefix String The namespace prefix of the Developer Edition organization in which the canvas app was created. Optional 29.0
parameters String Parameters passed to the canvas app in JSON format. The JSON must be URL-encoded:
1parameters={'isUpdated'='true';}"
Optional 29.0
text String Text of the feed item Optional 29.0
thumbnailUrl String The URL to a thumbnail image for the canvas app. Maximum dimensions are 120x120 pixels. Optional 29.0
title String The title of the link to the canvas app Optional 29.0
visibility String Who can see the post. Valid values are:
  • InternalUsers—If Communities is enabled, only members of the default, internal community can see the feed item.
  • AllUsers—If Communities is enabled, all members of the community can see the feed item.
Default values:
  • For external users, the default value is AllUsers. External users must use this value to see their posts.
  • For internal users, the default value is InternalUsers. Internal users can accept this value or use the value AllUsers to allow external users to see their posts.
If the parent of the feed item is a User or a Group, the visibility of the feed item must be AllUsers.
Optional 29.0
Response body for GET or HEAD
Feed Item Page
Response body for POST
Feed Item
Example for GET
This request searches for feed items that contain the string track:
1/chatter/feeds/record/me/feed-items?q=track
In the Feed Item Page response body, the string track is found in the feed-items/items/body/text property:
1{
2   "currentPageUrl": "/services/data/v30.0/chatter/feeds/record/005D0000001LL8OIAW/feed-items",
3   "isModifiedToken": null,
4   "isModifiedUrl": null,
5   "items": [{
6      "actor": {
7         "companyName": "Universal Containers",
8         "firstName": "Deanna",
9         "id": "005D0000001LL8OIAW",
10         "isActive": true,
11         "isInThisCommunity": true,
12         "lastName": "Li",
13         "motif": {
14            "color": "1797C0",
15            "largeIconUrl": "/img/icon/profile64.png",
16            "mediumIconUrl": "/img/icon/profile32.png",
17            "smallIconUrl": "/img/icon/profile16.png"
18         },
19         "mySubscription": null,
20         "name": "Deanna Li",
21         "photo": {
22            "fullEmailPhotoUrl": "https://instance_name/ncsphoto/SqRfG_-PUTY6KtfOp_f0cEw-MQI3xmkJ21oNEOQ-5savQXz9sPZRCJJB7fC4UIka",
23            "largePhotoUrl": "https://instance_name/profilephoto/729D00000000LJF/F",
24            "photoVersionId": "729D00000000LJFIA2",
25            "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000LJF/T",
26            "standardEmailPhotoUrl": "https://instance_name/ncsphoto/SqRfG_-PUTY6KtfOp_f0cEw-MQI3xmkJ21oNEOQ-5saluKolvB94ZwqX5yHBSBOh",
27            "url": "/services/data/v30.0/chatter/users/005D0000001LL8OIAW/photo"
28         },
29         "title": null,
30         "type": "User",
31         "url": "/services/data/v30.0/chatter/users/005D0000001LL8OIAW",
32         "userType": "Internal"
33      },
34      "attachment": null,
35      "body": {
36         "messageSegments": [{
37            "text": "I&#39;m building an app to track &quot;floater&quot; holidays.
38 Does anyone have any feature requests?",
39            "type": "Text"
40         }],
41         "text": "I&#39;m building an app to track &quot;floater&quot; holidays.
42 Does anyone have any feature requests?"
43      },
44      "canShare": true,
45      "clientInfo": null,
46      "comments": {
47         "comments": [],
48         "currentPageUrl": "/services/data/v30.0/chatter/feed-items/0D5D0000000HwkyKAC/comments",
49         "nextPageUrl": null,
50         "total": 4
51      },
52      "createdDate": "2012-09-12T00:54:27.000Z",
53      "event": false,
54      "id": "0D5D0000000HwkyKAC",
55      "isBookmarkedByCurrentUser": false,
56      "isDeleteRestricted": false,
57      "isLikedByCurrentUser": false,
58      "likes": {
59         "currentPageUrl": "/services/data/v30.0/chatter/feed-items/0D5D0000000HwkyKAC/likes",
60         "likes": [],
61         "nextPageUrl": null,
62         "previousPageUrl": null,
63         "total": 0
64      },
65      "likesMessage": null,
66      "modifiedDate": "2012-09-12T01:01:42.000Z",
67      "moderationFlags": null,
68      "myLike": null,
69      "originalFeedItem": null,
70      "originalFeedItemActor": null,
71      "parent": {
72         "companyName": "Universal Containers",
73         "firstName": "Deanna",
74         "id": "005D0000001LL8OIAW",
75         "isActive": true,
76         "isInThisCommunity": true,
77         "lastName": "Li",
78         "motif": {
79            "color": "1797C0",
80            "largeIconUrl": "/img/icon/profile64.png",
81            "mediumIconUrl": "/img/icon/profile32.png",
82            "smallIconUrl": "/img/icon/profile16.png"
83         },
84         "mySubscription": null,
85         "name": "Deanna Li",
86         "photo": {
87            "fullEmailPhotoUrl": "https://instance_name/ncsphoto/SqRfG_-PUTY6KtfOp_f0cEw-MQI3xmkJ21oNEOQ-5savQXz9sPZRCJJB7fC4UIka",
88            "largePhotoUrl": "https://instance_name/profilephoto/729D00000000LJF/F",
89            "photoVersionId": "729D00000000LJFIA2",
90            "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000LJF/T",
91            "standardEmailPhotoUrl": "https://instance_name/ncsphoto/SqRfG_-PUTY6KtfOp_f0cEw-MQI3xmkJ21oNEOQ-5saluKolvB94ZwqX5yHBSBOh",
92            "url": "/services/data/v30.0/chatter/users/005D0000001LL8OIAW/photo"
93         },
94         "title": null,
95         "type": "User",
96         "url": "/services/data/v30.0/chatter/users/005D0000001LL8OIAW",
97         "userType": "Internal"
98      },
99      "photoUrl": "https://instance_name/profilephoto/729D00000000LJF/T",
100      "preamble": {
101         "messageSegments": [{
102            "motif": {
103               "color": "1797C0",
104               "largeIconUrl": "/img/icon/profile64.png",
105               "mediumIconUrl": "/img/icon/profile32.png",
106               "smallIconUrl": "/img/icon/profile16.png"
107            },
108            "reference": {
109               "id": "005D0000001LL8OIAW",
110               "url": "/services/data/v30.0/chatter/users/005D0000001LL8OIAW"
111            },
112            "text": "Deanna Li",
113            "type": "EntityLink"
114         }],
115         "text": "Deanna Li"
116      },
117      "topics": null,
118      "type": "TextPost",
119      "url": "/services/data/v30.0/chatter/feed-items/0D5D0000000HwkyKAC",
120      "visibility": "AllUsers"
121   }],
122   "nextPageUrl": null
123}

Record Feed Items Flat

This resource is deprecated as of version 26.0.

Returns a flat feed, that is, a feed where there is no hierarchy between feed items and comments: Feed items and comments are at the same level. All items are returned in chronological order.

Resource
1/chatter/feeds/record/me/feed-items/flat
or
1/chatter/feeds/record/userId/feed-items/flat

userId must be the ID of the logged-in user or the alias me.

Note

Available since version
25.0
HTTP methods
GET or HEAD
Request parameters
Parameter Name Type Description
numFeedItems Integer Specifies the number of feed items returned. Valid values are between 0 and 100. Default value is 25. Because feed items may include comments, specifying 25 flat feed items may actually return more. For example, if each feed item has one comment, and recentCommentCount is greater than 1, 50 flat feed items are returned.
page String A generated token that indicates the view of feed items in the feed. Page tokens are returned as part of the response body, in one of the URL parameters, such as nextPageURL.
recentComment​Count Integer Specifies the number of recent comments returned. Valid values are between 0 and 25. Default value is 3.
sort String. One of the following:
  • CreatedDateDesc
  • LastModifiedDateDesc
Sorts the returned feed either by created date in ascending order, or by last modified date, also in ascending order. The default is LastModifiedDateDesc
Response body
Flat Feed