Chatter REST API Developer's Guide - Salesforce.com

11 downloads 506 Views 6MB Size Report
Feb 24, 2014 ... Copyright 2000–2014 salesforce.com, inc. All rights reserved. Salesforce.com is a registered trademark of salesforce.com, inc., as are other.
Chatter REST API Developer Guide Version 41.0, Winter ’18

@salesforcedocs Last updated: November 30, 2017

© Copyright 2000–2017 salesforce.com, inc. All rights reserved. Salesforce is a registered trademark of salesforce.com, inc.,

as are other names and marks. Other marks appearing herein may be trademarks of their respective owners.

CONTENTS Chatter REST API Developer Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 When to Use Chatter REST API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Chatter REST API Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Chatter REST API Rate Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Build the Resource URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Send HTTP Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 HTTP Request Flow and a Response Body . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Inputs and Binary File Upload Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Wildcards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Specify Response Sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Response Body Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Status Codes and Error Responses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 OAuth and Chatter REST API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Use CORS to Access Supported Salesforce APIs, Apex REST, and Lightning Out . . . . . . . . 41 Quick Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Step One: Obtain a Salesforce Developer Edition Organization . . . . . . . . . . . . . . . . . . . 42 Step Two: Set Up Authorization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Step Three: Connect to Chatter REST API Using OAuth . . . . . . . . . . . . . . . . . . . . . . . . . 42 Connect to Salesforce Communities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Work with Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Action Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Communities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Feeds and Feed Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Salesforce Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 Filter a Response Body . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 Make a Request in a Community . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 Get My News Feed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 Get Another User’s Feed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 Get a Group Feed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 Post a Feed Item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 Post a Feed Element and Include Files from Salesforce . . . . . . . . . . . . . . . . . . . . . . . . . 81 Post a Rich-Text Feed Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 Post a Feed Element with a Code Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 Post a Feed Element with an Inline Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 Post a Comment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 Post a Comment and Include a File from Salesforce . . . . . . . . . . . . . . . . . . . . . . . . . . 85

Contents

Post a Rich-Text Comment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 Post a Comment with a Code Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 Post a Comment with an Inline Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 Post a Binary File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Post an @Mention . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Post Multiple @Mentions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 Get a List of @Mention Proposals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Define Action Links and Post with a Feed Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Define Action Links in a Template and Post with a Feed Element . . . . . . . . . . . . . . . . . . 95 Update the Status of an Action Link or Invoke an Action Link . . . . . . . . . . . . . . . . . . . . . 99 Edit a Feed Post . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 Edit a Comment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 Edit a Question Title and Post . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 Like a Feed Item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 Like a Feed Item and Return the Total Number of Likes . . . . . . . . . . . . . . . . . . . . . . . . 102 Share a Feed Item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 Get Feed Elements Updated Since Last Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 Get a Feed with Internal Feed Items Only . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 Search a Feed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 Get a List of Records a User Follows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 Get Chatter Activity Statistics for a User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 Get Recommendations of Users to Follow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 Create and Schedule Custom Recommendations with Audiences . . . . . . . . . . . . . . . . 106 Create a Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Update and Crop a Group Photo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 Join a Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 Request to Join a Private Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 Approve or Reject a Request to Join a Private Group . . . . . . . . . . . . . . . . . . . . . . . . . 110 Post to a Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 Follow a Record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 Stop Following a Record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 Get a Record Feed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 Update a User Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 Update and Crop a User Photo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 Send a Private Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 Get User Information for Multiple Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 Create a Topic Hierarchy in Communities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 Action Links Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 Activity Reminders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 Announcements Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 Async Query Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 Clean Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 Batch Resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

Contents

Chatter Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 Comments Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 Communities Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 Communities Knowledge Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 Communities Moderation Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 Connect Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 Content Workspace Permissions Resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 Dashboard Component Snapshot Resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 Datacloud Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 Environment Hub Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 Email Merge Field Services Resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 External Email Services Resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 Feed Elements Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 Feed Items Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241 Feeds Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 Files Connect Repository Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391 Files Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402 Folders Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415 Forecasts Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418 Groups Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421 Influence Resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449 Likes Resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450 Managed Topics Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450 Mentions Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457 Motifs Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460 Push Notifications Resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462 Question and Answers Suggestions Resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463 Recommendation Audience Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464 Recommendation Definition Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470 Records Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476 Scheduled Recommendations Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479 Share Captured Activity Resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489 Subscriptions Resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490 Subscriptions Notifications Member Resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490 Topics Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492 User Profiles Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508 Users Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513 Zones Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556 Request Bodies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559 Action Link Definition Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559 Action Link Group Definition Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564 Action Link Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567 Action Link Template Binding Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568 Activity Reminder Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569

Contents

Alternative Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569 Announcement Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570 Article Topic Assignment Job Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572 Associated Actions Capability Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572 Async Query Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573 Attachment Input: Canvas App . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575 Attachment Input: Existing Content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576 Attachment Input: Feed Poll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576 Attachment Input: Link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577 Attachment Input: New File Upload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578 Banner Photo Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579 Batch Collection Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579 Batch Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580 Bookmarks Capability Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 582 Canvas Capability Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 582 Chatter Stream Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583 Clean Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584 Comment Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 585 Comment Capabilities Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587 Content Capability Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587 Custom List Audience Criteria Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588 Datacloud Contact Import Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589 Datacloud Order Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 590 Dashboard Component Snapshot Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 590 Digest Job Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591 Direct Message Capability Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 592 Environment Hub SSO User Mapping Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 592 Extension Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593 Extensions Capability Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594 Feed Element Capabilities Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595 Feed Entity Share Capability Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597 Feed Favorite Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598 Feed Item Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598 Feed Item Topic Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603 Feed Poll Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603 File Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604 File ID Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 606 Files Capability Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 607 File Shares Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608 Files Connect Field Value Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608 Files Connect Item Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609 Files Connect Permission Collection Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 610 Files Connect Permission Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 610 Folder Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611

Contents

Folder Item Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612 Following Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612 Generic Batch Collection Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613 Generic Batch Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614 Group Chatter Settings Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616 Group Information Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617 Group Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617 Group Member Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619 Group Membership Request Update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619 Group Record Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620 Invite Collection Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620 Link Capability Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621 Managed Topic Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621 Managed Topic Position Collection Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623 Managed Topic Position Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625 Message Body Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 626 Message Segment Input: Hash Tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 626 Message Segment Input: Inline Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 627 Message Segment Input: Link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 627 Message Segment Input: Markup Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 628 Message Segment Input: Markup End . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 628 Message Segment Input: Mention . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629 Message Segment Input: Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 630 Moderation Flag Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 630 Mute Capability Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631 New User Audience Criteria Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631 Notification Member Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 632 Photo Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633 Pin Capability Input (Beta) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633 Poll Capability Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 634 Push Notification Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635 Question and Answers Capability Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635 Read By Capability Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 636 Recommendation Audience Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637 Recommendation Definition Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 639 Request Header Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 640 Scheduled Recommendation Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 641 Share Captured Activity Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644 Share Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644 Status Capability Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645 Stream Subscription Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645 Topic Assignment Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 646 Topic Endorsement Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 646 Topic Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 647

Contents

Topic Names Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 647 Topics Capability Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 648 Up Down Vote Capability Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 649 User Chatter Settings Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 649 User ID Collection Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 650 User Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 650 User Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 651 User Message Recipient Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 652 User Message Recipient List Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 652 User Status Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 652 User Stream (Conversation) Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653 Verified Capability Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653 Response Bodies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653 Action Link Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653 Action Link Diagnostic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656 Action Link Group Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657 Activity Reminder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 658 Activity Reminders Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659 Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659 Alternative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659 Announcement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659 Announcement Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 660 Approval Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661 Approval Post Template Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661 Article Item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 662 Article Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 662 Asset File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 663 Associated Actions Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 664 Async Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 664 Async Query Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667 Banner Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667 Banner Photo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 668 Batch Result Item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 668 Batch Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670 Bookmarks Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670 Candidate Answers Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670 Case Comment Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670 Canvas Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672 Chatter Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672 Chatter Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673 Chatter Influence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673 Chatter Likes Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674 Chatter Stream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674 Chatter Stream Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674

Contents

Clean Record Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675 Clean Record Result Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675 Clean Rule Data Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675 Clean Rule Data Service Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676 Clean Rule Data Service Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676 Clean Rule Data Service Metrics Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677 Clean Rule Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677 Clean Rule Status Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678 ClientInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678 Comment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679 Comment Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 680 Comment Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 681 Comments Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682 Community . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682 Community Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683 Community Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683 Connect Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684 Content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684 Content Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686 Conversation Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688 Conversation Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689 Conversation Summary Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689 Conversation Unread Count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690 Custom List Audience Criteria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690 Dashboard Component Snapshot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690 Dashboard Component Snapshot Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 691 Datacloud Company . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 691 Datacloud Company Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 693 Datacloud Contact . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 694 Datacloud Contact Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 695 Datacloud Import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 695 Datacloud Import Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 696 Datacloud Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 696 Datacloud Purchase Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697 Digest Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697 Direct Message Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698 Direct Message Member Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698 Direct Message Membership Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 699 Direct Message Membership Activity Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 699 Edit Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 700 Email Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701 Email Attachment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701 Email Merge Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701 Email Merge Field Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 702

Contents

Email Message Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 702 Emoji . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703 Emoji Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703 Enhanced Link Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703 Entity Label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704 Environment Hub My Domain Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704 Environment Hub OAuth URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705 Environment Hub Sign-up Member Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705 Environment Hub SSO User Mapping Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706 Error Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706 Error with Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706 Explanation Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707 Explanation Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 709 Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711 Extension Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 712 Extension Definition Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 712 Extensions Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 713 External File Permission Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 713 Favorite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 714 Favorites Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715 Feed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 717 Feed Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 718 Feed Directory Item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719 Feed Element Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721 Feed Element Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 724 Feed Enabled Entity Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 726 Feed Entity Is Editable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 726 Feed Entity Not Available Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727 Feed Entity Share Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 728 Feed Item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 728 Feed Item Attachment: Approval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735 Feed Item Attachment: Basic Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 736 Feed Item Attachment: Canvas Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 736 Feed Item Attachment: Case Comment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 737 Feed Item Attachment: Content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 738 Feed Item Attachment: Dashboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 740 Feed Item Attachment: Email Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 740 Feed Item Attachment: Link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 741 Feed Item Attachment: Poll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 741 Feed Item Attachment: Record Snapshot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 742 Feed Item Attachment: Tracked Change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 742 Feed Item Body . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 742 Feed Item Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 743

Contents

Feed Item Preamble Message Body . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 744 Feed Item Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 744 Feed Item Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 746 Feed Modified Info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 747 Feed Poll Choice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 747 Feed Tracked Change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 748 File Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 748 File Preview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 749 File Preview Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 749 File Preview URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 750 File Share Link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 750 File Shares Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 751 File Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 751 File Summary Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 755 Files Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 755 Files Connect Allowed Item Type Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 755 Files Connect Field Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 755 Files Connect Item Type Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 756 Files Connect Item Type Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 756 Files Connect Permission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757 Files Connect Permission Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757 Files Connect Permission Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 758 Files Connect Provider Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 758 Files Connect Repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 758 Files Connect Repository Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 759 Files Connect Repository Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 760 Files Connect Repository Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 761 Flat Feed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 761 Flat Feed Item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 761 Folder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 762 Folder Item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 763 Folder Item Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 763 Folder Path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 763 Follower Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 764 Following Counts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 764 Following Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 765 Forecasting Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 765 Forecasting Manager Ancestors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 766 Forecasting User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 766 Forecasting User Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 766 Forecasting User Access Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 767 Forecasting User Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 767 Generic Bundle Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 767 Generic Feed Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 767

Contents

Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 769 Group Chatter Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 771 Group Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 772 Group Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 773 Group Member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 774 Group Member Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 774 Group Membership Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 775 Group Membership Request Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 776 Group Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 776 Group Record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 776 Group Record Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 776 Icon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 777 Image File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 777 Image File Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 777 Influence Thresholds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 778 Interactions Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 778 Invite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 779 Invite Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 779 Knowledgeable People . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 779 Knowledgeable People Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 780 Knowledge Article Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 781 Knowledge Article Version Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 781 Lightning Extension Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 781 Like . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 782 Like Message Body . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 782 Like Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783 Link Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783 List View Column . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 784 List View Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 784 List View Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 784 List View Record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 785 List View Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 786 Maintenance Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 786 Managed Topic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 787 Managed Topic Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 788 Media Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 788 Media Reference Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 788 Mention Completion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789 Mention Completion Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 790 Mention Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 791 Mention Validations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 791 Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 792 Message Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 793 Message Segment: Entity Link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 793

Contents

Message Segment: Field Change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 793 Message Segment: Field Change Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 794 Message Segment: Field Change Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 795 Message Segment: Hashtag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 795 Message Segment: Inline Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 796 Message Segment: Link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 797 Message Segment: Markup Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 797 Message Segment: Markup End . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 798 Message Segment: Mention . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 798 Message Segment: More Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799 Message Segment: Resource Link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800 Message Segment: Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800 Moderation Audit Record Count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800 Moderation Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 801 Moderation Flag Item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 801 Moderation Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 802 Moderation Flags Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 803 Motif . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 803 Mute Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 805 New User Audience Criteria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 805 Non-Entity Recommendation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 806 Notification Member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 806 OAuth User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 807 OAuth Provider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 807 Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 807 Origin Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 808 Out of Office . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 808 Phone Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 808 Photo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 809 Pin Capability (Beta) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 810 Pinned Feed Element Collection (Beta) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 810 Platform Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 811 Platform Action Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 814 Poll Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 815 Question and Answers Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 815 Question and Answers Suggestion Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 816 Read By . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 816 Read By Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 817 Read By Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 817 Recommendation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 818 Recommendation Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 819 Recommendation Audience Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 820 Recommendation Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 821 Recommendation Definition Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 821

Contents

Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 822 Recommendations Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 822 Recommended Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 822 Record Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 823 Record Field: Blank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 823 Record Field: Compound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 823 Record Field: Currency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 824 Record Field: Date . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 825 Record Field: Percent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 825 Record Field: Picklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 825 Record Field: Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 826 Record Field: Reference with Date . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 826 Record Snapshot Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 827 Record Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 827 Record Summary List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 828 Record View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 828 Record View Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 829 Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 830 Related Feed Post . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 830 Related Feed Post Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 831 Related Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 831 Repository Directory Entry Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 832 Repository File Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 832 Repository File Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 832 Repository Folder Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 833 Repository Folder Item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 834 Repository Folder Items Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 835 Repository Folder Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 835 Repository Group Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 836 Repository Permission Type Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 836 Repository User Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 837 Reputation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 837 Reputation Level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 838 Request Header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 838 Scheduled Recommendation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 838 Scheduled Recommendation Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 840 Share Captured Activity Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 840 Shares . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 841 Social Account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 841 Social Post Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 842 Social Post Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 844 Stamp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 844 Status Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 844 Subscription . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 845

Contents

Subscription Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 846 Supported Emojis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 846 Time Zone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 846 Topic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 847 Topic Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 848 Topic Endorsement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 848 Topic Endorsement Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 848 Topic Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 849 Topic Opt Out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 849 Topic Opt Out Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 850 Topic Suggestion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 850 Topic Suggestion Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 850 Topics Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 850 Topics People Are Knowledgeable About . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 851 Topics People Are Knowledgeable About Collection . . . . . . . . . . . . . . . . . . . . . . . . . 851 Tracked Change Bundle Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 852 Tracked Changes Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 852 Unauthenticated User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 853 Up Down Vote Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 853 User Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 854 User Chatter Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 854 User Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 855 User Group Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 857 User Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 858 User Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 858 User Profile Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 858 User Reference Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 859 User Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 859 User Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 861 User Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 861 Verified Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 864 Workspace Permission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 865 Zone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 866 Zone Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 866 Zone Search Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 867 Zone Search Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 867 Appendices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 868 Action Links Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 868

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 874

CHATTER REST API DEVELOPER GUIDE Integrate mobile apps, intranet sites, and third-party web applications with Salesforce using Chatter REST API. Responses are localized, structured for presentation, and can be filtered to contain only what the app needs. Use Chatter REST API to display Salesforce data, especially in mobile applications. In addition to Chatter feeds, users, groups, and followers, Chatter REST API provides programmatic access to files, recommendations, topics, notifications, Data.com purchasing, and more. Chatter REST API is similar to APIs offered by other companies with feeds, such as Facebook and Twitter, but it also exposes Salesforce features beyond Chatter. Note: Many Chatter REST API resource actions are exposed as static methods on Apex classes in the ConnectApi namespace. These classes are called Chatter in Apex. Use Chatter in Apex to create custom experiences in Salesforce. Chatter in Apex is available in all organizations and editions that have Apex enabled.

EDITIONS Available in: Salesforce Classic Available in: All editions except Personal Edition. In addition, some features require Chatter to be enabled for the organization.

IN THIS SECTION: Chatter REST API Introduction Consider the Chatter REST API architecture, rate limits, and how the resources, requests, and responses work. Chatter REST API Quick Start Connect to Salesforce and authenticate, then make a request to Chatter REST API and look at the response. Chatter REST API Features Find the resources to work with Chatter REST API features. Chatter REST API Examples Use Chatter REST API examples to perform tasks. Chatter REST API Resources Chatter REST API resources are sometimes called endpoints. Chatter REST API Request Bodies To perform a POST, PATCH, or PUT request, pass query parameters or create a request body formatted in either XML or JSON. This chapter lists the request bodies. The query parameters are listed with each resource. Chatter REST API Response Bodies The successful execution of a request to a Chatter REST API resource can return a response body in either JSON or XML format. Chatter REST API Appendices Use this appendix when working with action link button labels.

Chatter REST API Introduction Consider the Chatter REST API architecture, rate limits, and how the resources, requests, and responses work.

1

Chatter REST API Developer Guide

When to Use Chatter REST API

IN THIS SECTION: When to Use Chatter REST API Is Chatter REST API the right API for you? Chatter REST API Architecture To use Chatter REST API, understand a few characteristics of its architecture, like how to authenticate, and which data formats it supports. Chatter REST API Rate Limits Chatter REST API requests are subject to rate limiting. Chatter REST API has a different rate limit than other Salesforce APIs. Chatter REST API has a per user, per application, per hour rate limit. When you exceed the rate limit, all Chatter REST API resources return a 503 Service Unavailable error code. Build the Resource URL Access all Chatter REST API resources by using the URI for your company's instance, combined with version and community information, and the URI for the resource. Send HTTP Requests Chatter REST API uses HTTP methods to send and receive JSON and XML content, so it’s easy to build client applications using the tool or the language of your choice. HTTP Request Flow and a Response Body Review the process flow for Chatter REST API, including resource and response examples. Inputs and Binary File Upload Examples Make HTTP POST, PATCH, and PUT requests using inputs and learn more about uploading binary files Wildcards Use wildcard characters to match text patterns in Chatter REST API and Chatter in Apex searches. Specify Response Sizes Use filter parameters to return only the data the application needs. To specify the response size by group (big, medium, or small), use filterGroup as a request parameter or in a request body. In addition, to exclude or include specific properties, use either exclude or include as a request parameter or in a request body. Response Body Encoding Chatter REST API responses are minimally HTML entity-encoded by default. Status Codes and Error Responses The response header contains an HTTP status code. If the response isn’t successful, the response body contains an error message, and if appropriate, information about the field or object where the error occurred. OAuth and Chatter REST API Chatter REST API uses OAuth to securely identify your application before connecting to Salesforce. Use CORS to Access Supported Salesforce APIs, Apex REST, and Lightning Out Apex REST, Bulk API, Chatter REST API, User Interface API, Lightning Out, REST API, and Analytics REST API support CORS (cross-origin resource sharing). To access these APIs from JavaScript in a web browser, add the origin serving the script to the CORS whitelist.

When to Use Chatter REST API Is Chatter REST API the right API for you? Use Chatter REST API to: • Build a mobile app.

2

Chatter REST API Developer Guide

Chatter REST API Architecture

• Integrate a third-party web application with Salesforce so it can notify groups of users about events. • Display a feed on an external system, such as an intranet site, after users are authenticated. • Make feeds actionable and integrated with third-party sites. For example, an app that posts a Chatter item to Twitter whenever the post includes #tweet hashtag. • Create simple games that interact with the feed for notifications. • Creating a custom, branded skin for Chatter for your organization.

How Is Chatter REST API Different from Other Salesforce APIs? The following are some of the differences between Chatter REST API and REST API: • Data is structured for rendering on websites and mobile devices. • Returned information is localized to the user's time zone and language. • Changed values that are tracked in a feed are returned as value-pair representations. • Rate limiting for Chatter REST API is per user, per application, per hour. The rate limiting for SOAP API and REST API is by organization. If needed, extract an ID from the REST API and use it in requests to Chatter REST API.

Chatter in Apex Many Chatter REST API resource actions are exposed as static methods on Apex classes in the ConnectApi namespace. This namespace is also referred to as Chatter in Apex. Use Chatter in Apex to develop Chatter applications on the Force.com platform without using HTTP callouts from Apex. The documentation for Chatter in Apex is available in the Apex Developer Guide. SEE ALSO: Chatter REST API Rate Limits

Chatter REST API Architecture To use Chatter REST API, understand a few characteristics of its architecture, like how to authenticate, and which data formats it supports. Authentication Chatter REST API uses OAuth 2.0. Note: Salesforce is accessed securely, that is, using HTTPS. CORS (Cross-Origin Resource Scripting) Apex REST, Bulk API, Chatter REST API, User Interface API, Lightning Out, REST API, and Analytics REST API support CORS (cross-origin resource sharing). To access these APIs from JavaScript in a web browser, add the origin serving the script to the CORS whitelist. See Use CORS to Access Supported Salesforce APIs, Apex REST, and Lightning Out. Default HTML entity encoding Chatter REST API responses are minimally HTML entity-encoded by default. For non-HTML contexts, such as native mobile applications, Chatter REST API clients can request raw (unencoded) output. Set the X-Chatter-Entity-Encoding HTTP header in a request to false. For more information, see Response Body Encoding on page 27.

3

Chatter REST API Developer Guide

Chatter REST API Rate Limits

JSON and XML support The JavaScript Object Notation (JSON) format is supported with UTF-8. Date-time information is in ISO8601 format. XML serialization is similar to SOAP API. XML requests are supported in UTF-8 and UTF-16, and XML responses are provided in UTF-8. Responses are in JSON format by default. To specify XML, use the HTTP header Accept: application/xml. (To specify JSON, use Accept: application/json.) You can append either .json or .xml to the URI of any resource to specify how the return is formatted. For example, /chatter/feeds/filter/me/001/feed-elements.xml. Note: Not all features support XML. Localized names and times Chatter REST API localizes both the names and datetimes to the locale setting of the user. Users set their locale in their personal information. If the user hasn’t set their locale, Chatter REST API uses the default locale for the organization. Clients can use any locale available in the organization to override the default locale. To override the locale for any API request, use the Accept-Language HTTP header. Note: ISO-8601 dates are always in GMT. Salesforce ID length Salesforce IDs in response bodies are always 18 character IDs. In request bodies, you can use either 15 character IDs or 18 character IDs. UI Themes Clients can use the X-Connect-Theme HTTP header to specify a UI theme for any API request. There are 2 themes, each with their own set of motif icons: Classic and Salesforce1. Theme names are case-sensitive. Method overriding To override an HTTP method if you use an HTTP library that doesn’t allow overriding or setting an arbitrary HTTP method name, use the request parameter _HttpMethod. POST https://instance_name/services/data/v41.0/chatter/ /chatter/users/me/conversations/03MD0000000008KMAQ ?_HttpMethod=PATCH&read=true

Note: The _HttpMethod parameter is case-sensitive. Use the correct case for all values.

Chatter REST API Rate Limits Chatter REST API requests are subject to rate limiting. Chatter REST API has a different rate limit than other Salesforce APIs. Chatter REST API has a per user, per application, per hour rate limit. When you exceed the rate limit, all Chatter REST API resources return a 503 Service Unavailable error code. Note: Load, performance, and other system issues can prevent some limits from being reached. Limits can change without notice. Applications should make efficient use of available requests and gracefully handle the 503 error code. For applications using a session ID from Force.com, the rate limit is per user, per hour—there isn't a separate bucket for applications. All applications the user accesses with a session ID use this general quota. To take advantage of the per user, per application, per hour limit, use OAuth tokens. To build apps that don’t hit the rate limit, use these guidelines: • If you hit limits when running tests, use multiple users to simulate a real-world scenario.

4

Chatter REST API Developer Guide

Build the Resource URL

• When polling for feed updates, do not exceed one poll per minute (60 polls per hour). To return more results in 1 request, increase the page size. • When polling for private messages, do not exceed 60 polls per hour. • To avoid making multiple requests, cache metered static assets such as file and dashboard renditions (group and user profile pictures are not metered). • Each developer on a team should set up 2 connected apps: one for automated testing and one for manual testing and development. Don’t share connected apps with other developers. • Use a unique connected app for the production environment. • Don’t share connected apps between applications. Important: To extract data, use REST API or SOAP API to operate on sObjects. Do not use Chatter REST API to extract data. REST API’s rate limiting and query language work better for these use cases: • Migrate or synchronize user profiles between systems. • Create analytic applications. • Write queries that return records and fields. SEE ALSO: When to Use Chatter REST API

Build the Resource URL Access all Chatter REST API resources by using the URI for your company's instance, combined with version and community information, and the URI for the resource. For example, building a URL without communities, your instance is: https://instance_name

And the version information is: /services/data/v41.0

And the resource is: /chatter/feeds/news/me/feed-elements

Put together, the full URL is: https://instance_name/services/data/v41.0/chatter/ feeds/news/me/feed-elements

To access resources that are part of a community, use this path after the version information and before the resource: /connect/communities/communityId

For example, the following full URL accesses a news feed resource in a community: https://instance_name/services/data/v41.0/connect /communities/communityId/chatter/feeds/news/me/feed-elements

5

Chatter REST API Developer Guide

Send HTTP Requests

To access resources in the default community, use the internal shortcut as the community ID: /connect/communities/internal

You can use the internal shortcut even if communities are not enabled. For example, if you’re developing an application for multiple organizations, not all of which use communities, you can use this shortcut. The response bodies include URLs with /connect/communities/internal. This format enables you to perform string interpolation when referencing communities. To access resources in the default community, you can also use the /chatter resources directly (without /connect/communities/internal). The response bodies don’t include URLs with /connect/communities/internal. In addition, you can also use your organization’s custom URL for a community to access resources in it. For example: https://communitydomain.force.com/communitypath/services/data/v41.0/connect /communities/communityId/chatter/feeds/news/me/feed-elements

Send HTTP Requests Chatter REST API uses HTTP methods to send and receive JSON and XML content, so it’s easy to build client applications using the tool or the language of your choice. HTTP requests to a Chatter REST API resource contain the following information: • An HTTP method (such as GET, POST, PATCH, or DELETE). • An OAuth 2.0 access token used to authenticate the request. For information on how to retrieve the token, see Chatter REST API Quick Start. • The Chatter REST API resource URL. • Request parameters or a request body containing information needed for requests, such as information to update a record. The request body can contain JSON or XML. If you pass resource-specific request parameters and a request body, the request parameters are ignored. Request parameters that aren’t specific to a resource, such as parameters in a bearer token URL and the _HttpMethod parameter, are processed along with the request body. Use bearer token parameters as they are. Don’t add or remove parameters. The HTTP methods are used to indicate the desired action, such as retrieving information, as well as creating, updating, and deleting records. • GET is used to retrieve information, such as basic resource summary information. • POST is used to create a new item, such as a feed item or a comment or like, or subscribe to a group. • PATCH is used for partial updates to an item, for example, renaming a file. • PUT is used for whole updates to an item, for example, marking a conversation as read. • DELETE is used to delete an item, such as a feed element, or to unsubscribe from a group. • HEAD is used to retrieve resource metadata. It's similar to using GET but doesn’t return a response body. You can use HEAD to test the availability of a resource.

HTTP Request Flow and a Response Body Review the process flow for Chatter REST API, including resource and response examples. The general process flow for using Chatter REST API is: 1. Send an HTTP request to Salesforce.

6

Chatter REST API Developer Guide

HTTP Request Flow and a Response Body

2. The system authenticates the user and client app. 3. Request Chatter REST API resources using an HTTP request. 4. The system returns an HTTP return code. Additional information (such as a Chatter REST API response body) is optionally included in the response. Each resource in Chatter REST API is a URI used with an HTTP method (such as GET, POST, DELETE, or HEAD). Each resource represents something in Chatter, such as a user's news feed, or the comments on a post. Many of the resources use either a specified user ID or the keyword me to indicate the current, context user. For example, to return the user-profile information for the current, context user, use this resource. /chatter/users/me

You could also specify a particular user by user ID. /chatter/users/005D0000001GLoh

When you successfully access a resource, a response body is returned in JSON or XML. By default, JSON is returned. Each response body can contain one or more response bodies. For example, the following is the response body of the user resource. It includes other response bodies as well, such as address, current status, and phone numbers. Property

Type

Description

Filter Group Available and Version Version

aboutMe

String

Text from user's profile.

Big, 29.0

23.0

additional Label

String

An extra label for the user, for example, “Customer,” “Partner,” or “Acme Corporation.” If the user doesn’t have an extra label, the value is null.

Small, 30.0

30.0

address

Address

User’s address.

Big, 29.0

23.0

bannerPhoto

Banner Photo

User’s banner photo.

Big, 36.0

36.0

chatterActivity Chatter Activity

Chatter activity statistics.

Big, 29.0

23.0

chatterInfluence Chatter Influence

User’s influence rank.

Big, 29.0

23.0

community Nickname

String

User’s nickname in the community.

Medium, 32.0

32.0

companyName

String

Company name.

Small, 29.0

23.0

currentStatus User Status

23.0–25.0

Note: This property is no longer available as of version 25.0. User's current status.

displayName

String

User’s name that is displayed in the community. If nicknames are enabled, the nickname is displayed. If nicknames aren’t enabled, the full name is displayed.

Small, 32.0

32.0

email

String

User's email address.

Medium, 29.0

23.0

firstName

String

User's first name. In version 39.0 and later, if nicknames Small, 29.0 are enabled, firstName is null.

7

23.0

Chatter REST API Developer Guide

Property

Type

HTTP Request Flow and a Response Body

Description

Filter Group Available and Version Version

followersCount Integer

Number of users following this user.

Big, 29.0

23.0

followingCounts Following Counts

Information about items the user is following.

Big, 29.0

23.0

Big, 29.0

23.0

groupCount

Integer

Number of groups user is following.

hasChatter

Boolean

true if user has access to Chatter; false otherwise. Small, 31.0

31.0

id

String

18-character ID of the user.

Small, 29.0

23.0

isActive

Boolean

true if user is active, false otherwise.

Small, 29.0

23.0

isChatterGuest Boolean

23.0–25.0

Note: This property is no longer available as of version 26.0. Use the userType property instead. true if user is a Chatter customer, false otherwise.

isInThis Community

Boolean

true if user is in the same community as the context Small, 29.0 user; false otherwise. Can be false for record

28.0

feed @mentions on posts with the scope “All Users.” lastName

String

User's last name. In version 39.0 and later, if nicknames Small, 29.0 are enabled, lastName is null.

23.0

managerId

String

18-character ID of the user’s manager.

Big, 29.0

23.0

managerName

String

Locale-based concatenation of manager's first and last Big, 29.0 names.

23.0

motif

Motif

Small, medium, and large icons indicating that the Small, 29.0 object is a user. The motif can also contain the object’s base color.

27.0

The motif icon is not the user’s profile picture. mySubscription Reference

If the context user is following this user, contains Medium, 29.0 information about the subscription, otherwise null.

23.0

name

String

Locale-based concatenation of first and last names. In Small, 29.0 version 39.0 and later, if nicknames are enabled, name is the nickname.

23.0

outOfOffice

Out of Office

Extra out-of-office message, if one exists, for the user.

Small, 40.0

40.0

phoneNumbers

Phone Number[]

Collection of user's phone numbers.

Big, 29.0

23.0

photo

Photo

Information about the user's photos.

Small, 29.0

23.0

reputation

Reputation

Reputation of the user in the community, which is determined by the number of points earned from events and actions performed in the community.

Big, 32.0

32.0

stamps

Stamp[]

Collection of the user’s stamps.

Small, 39.0

39.0

8

Chatter REST API Developer Guide

Property

Type

thanksReceived Integer

HTTP Request Flow and a Response Body

Description

Filter Group Available and Version Version

Number of thanks the user has received.

Big, 29.0

29.0

title

String

Title of the user.

Small, 29.0

23.0

type

String

Value is User.

Small, 29.0

23.0

url

String

URL to the user's Chatter profile.

Small, 29.0

23.0

username

String

User name of the user, such as [email protected].

Small, 29.0

24.0

userType

String

Specifies the type of user. Valid values are:

Medium, 29.0

26.0

• ChatterGuest—User is an external user in a private group. • ChatterOnly—User is a Chatter Free customer. • Guest—User is unauthenticated. • Internal—User is a standard organization member. • Portal—User is an external user in a customer portal, partner portal, or community. • System—User is Chatter Expert or a system user. • Undefined—User is a user type that is a custom object.

In JSON format, the output is: { "aboutMe": "I'm excited to be part of the team focused on building out our apps business and showing our customers their future.", "additionalLabel" : null, "address": { "city": "Seattle", "country": "US", "state": "WA", "street": "2001 8th Ave", "zip": "98121" "formattedAdress": "2001 8th Ave\nSeattle, WA 98121\nUS" }, "chatterActivity": { "commentCount": 0, "commentReceivedCount": 1, "likeReceivedCount": 0, "postCount": 2 }, "chatterInfluence" : { "percentile" : "0.6666666666666667", "rank" : 1

9

Chatter REST API Developer Guide

HTTP Request Flow and a Response Body

}, "communityNickname": "marRave", "companyName": "Seattle Apps", "displayName": "Marion Raven", "email": "[email protected]", "firstName": "Marion", "followersCount": 1, "followingCounts": { "people": 5, "records": 0, "total": 5 }, "groupCount": 3, "hasChatter": true, "id": "005D0000001Kl6xIAC", "isActive": true, "isInThisCommunity" : true, "lastName": "Raven", "managerId": null, "managerName": null, "motif": { "color" : "20aeb8", "largeIconUrl": "/img/icon/profile64.png", "mediumIconUrl": "/img/icon/profile32.png", "smallIconUrl": "/img/icon/profile16.png" }, "mySubscription": null, "name": "Marion Raven", "phoneNumbers": [{ "label": "Work", "phoneNumber": "(206) 999-2846", "phoneType": "Work" }], "photo": { "fullEmailPhotoUrl": "https://instance_name/ncsphoto/SqRfG_-PUTY6KtfOp_f0cGW2pGjfqoWUUgTENHjVyS1i9x6Z16L8wXEGigpcWjAd", "largePhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/F", "photoVersionId": "729D00000000BDV", "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/T", "standardEmailPhotoUrl": "https://instance_name/ncsphoto/SqRfG_-PUTY6KtfOp_f0cGW2pGjfqoWUUgTENHjVyS1q43x_rW2ciXBHst0Eh3Y6", "url": "/services/data/v41.0/chatter/users/005D0000001LL8OIAW/photo" }, "reputation" : null, "thanksReceived" : null, "title": null, "type": "User", "url": "/services/data/v41.0/chatter/users/005D0000001Kl6xIAC", "userType": "Internal"; "username": "[email protected]" }

10

Chatter REST API Developer Guide

Inputs and Binary File Upload Examples

Note: Salesforce runs on multiple server instances. The examples in this guide use instance_name to indicate the instance. Some of the items in a response body have a fully qualified URL, however, most of the returned URLs are relative. If the URL is relative, prepend it with the instance given to the client app when the item is authenticated.

Inputs and Binary File Upload Examples Make HTTP POST, PATCH, and PUT requests using inputs and learn more about uploading binary files

Using POST, PATCH, or PUT for Input When you make a request using the HTTP POST, PATCH, and PUT methods, you can use request parameters or a request body. The request body can contain JSON or XML. If you pass resource-specific request parameters and a request body, the request parameters are ignored. Request parameters that aren’t specific to a resource, such as parameters in a bearer token URL and the _HttpMethod parameter, are processed along with the request body. Use bearer token parameters as they are. Don’t add or remove parameters. To submit a request using request parameters, use a Content-Type header field with the value application/x-www-form-urlencoded. To submit a request using a request body, use one of the following values in a Content-Type header field and in an Accept header field: • application/json • application/xml

Uploading Binary Files To upload a binary file up to 2 GB (including headers) or up to 75 MB for an external repository, send it as a body part in a multipart/form-data request. You can send the text of a comment (but not a post) as a JSON or XML rich input body part in the same multipart/form-data request. Alternately, you can choose to send that information in request parameters. If you pass both a rich input request body and request parameters, the request parameters are ignored. Important: In version 36.0 and later, you can’t create a feed post and upload a binary file in the same request. Upload files to Salesforce first, and then use the file IDs to attach one or more files to a feed post. To create a multipart/form-data request, in the head of the request, set the Content-Type HTTP header to multipart/form-data. For information about HTTP headers, see W3C Form content types, and RFC 2388, which defines the multipart/form-data internet media type. This table describes the HTTP headers and parameters required in the rich input body part of a multipart/form-data request: HTTP Headers for Rich Input Body Part

Header Value and Parameters

Content-Disposition form-data; name="json" form-data; name="xml"

Description The request body for a post or comment. For JSON, the value of name use "json". For XML, the value of name use "xml".

11

Chatter REST API Developer Guide

Inputs and Binary File Upload Examples

HTTP Headers for Rich Input Body Part

Header Value and Parameters

Description

Content-Type

application/json; charset=UTF-8 The data format and character set of the request application/xml; charset=UTF-8 body.

For JSON, the value must be application/json. For XML, the value must be application/xml.

Tip: Web browsers are typically incapable of making multipart requests when the non-binary parts, such as rich input bodies, have their own Content-Type. To work around this issue, specify a certain Content-Disposition name and Salesforce can read the Content-Type of the rich input part. (You don’t have to specify a Content-Type for the rich input body.) This table describes the HTTP headers and parameters required in the rich input body part of a multipart/form-data request from a web browser: HTTP Headers for Rich Header Value and Parameters Input Body Part from Web Browser

Description

Content-Disposition

To post a feed element with a binary file (in version 35.0 and earlier), the value of name must be "feedElement".

form-data; name="feedElement" form-data; name="comment" form-data; name="photo" form-data; name="file"

To post a comment with a binary file, the value of name must be "comment". To upload a user or group photo, the value of name must be "photo". To upload a file to the Files home or an external repository, the value of name must be "file".

This table describes the HTTP headers and parameters required in the binary upload body part of a multipart/form-data request: HTTP Headers for Binary Upload Body Part

Header Value and Parameters

Description

Content-Disposition

form-data; name="feedElementFileUpload"; filename=string

To post a feed element with a binary file (in version 35.0 and earlier), the value of name must be "feedElementFileUpload".

To post a comment with a binary file, the value of form-data; name=name="feedElementFileUpload"; name must be "feedElementFileUpload". filename=string To upload a user or group photo, the value of name must be "fileUpload". form-data; name="fileUpload" filename=string To upload a file to the Files home or to upload a file form-data; name="fileData" filename=string

12

to an external repository, the value of name must be "fileData".

Chatter REST API Developer Guide

HTTP Headers for Binary Upload Body Part

Inputs and Binary File Upload Examples

Header Value and Parameters

Description Note: Specify a filename parameter and value. However, Salesforce uses the value of the title property of the File Input or the metadata of the Files Connect Item Input as the file name, not the value of the filename parameter.

Content-Type

application/octet-stream; charset=ISO-8859-1

The media type and character set of the binary file.

Note: Spacing and carriage returns and line feeds (CRLF) are important. For example, this line requires spaces: Content-Disposition: form-data; name="feedItemFileUpload"; title="2012_q1_review.ppt".

If you had used CRLF instead of spaces, you would have received an error. Post a feed element with a binary file (version 35.0 and earlier) Important: In version 36.0 and later, you can’t create a feed post and upload a binary file in the same request. Upload files to Salesforce first, and then use the file IDs to attach one or more files to a feed post. This example uses the /chatter/feed-elements resource to post a new feed item (which is a type of feed element), upload a binary file, and attach it to the new feed item. This example uses cURL. curl -H "X-PrettyPrint: 1" -F 'json={ "body":{ "messageSegments":[ { "type":"Text", "text":"Please accept this receipt." } ] }, "capabilities":{ "content":{ "description":"Receipt for expenses", "title":"receipt.pdf" } }, "feedElementType":"FeedItem", "subjectId":"005RR000000DmOb" }; type=application/json' -F "[email protected];type=application/octet-stream" -X POST https://instance_name/services/data/v35.0/chatter/feed-elements -H 'Authorization: OAuth 00DRR0000000N0g!...' --insecure

Here is the same example in a different format so you can see the request body parts. POST /services/data/v35.0/chatter/feed-elements HTTP/1.1 Authorization: OAuth 00DRR0000000N0g!... User-Agent: Jakarta Commons-HttpClient/3.0.1 Host: instance_name Content-Length: 845 Content-Type: multipart/form-data; boundary=a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq Accept: application/json --a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq Content-Disposition: form-data; name="json" Content-Type: application/json; charset=UTF-8 { "body":{ "messageSegments":[ { "type":"Text",

13

Chatter REST API Developer Guide

Inputs and Binary File Upload Examples

"text":"Please accept this receipt." } ] }, "capabilities":{ "content":{ "description":"Receipt for expenses", "title":"receipt.pdf" } }, "feedElementType":"FeedItem", "subjectId":"005RR000000DmOb" } --a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq Content-Disposition: form-data; name="feedElementFileUpload"; filename="receipt.pdf" Content-Type: application/octet-stream; charset=ISO-8859-1 ...contents of receipt.pdf... --a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq--

Post a batch of feed elements with binary files (version 35.0 and earlier) Important: In version 36.0 and later, you can’t create a feed post and upload a binary file in the same request. Upload files to Salesforce first, and then use the file IDs to attach one or more files to a feed post. This example uses the /chatter/feed-elements/batch resource to post a batch of feed elements, uploads two binary files, and attach them to the feed elements in the batch. Include the information about the binary parts in the request body. This example uses cURL. curl -H "X-PrettyPrint: 1" -F 'json={"inputs":[{"binaryPartNames":["bin1"], "richInput":{"subjectId":"me","body":{ "messageSegments":[{"type":"Text","text":"Please accept this receipt"}]},"capabilities": {"content" : {"description": "Receipt for expenses", "title":"receipt.pdf"}},"feedElementType":"FeedItem"}}, {"binaryPartNames":["bin2"],"richInput":{"subjectId":"me","body":{"messageSegments":[{"type":"Text","text":"Post Number 2"}]}, "capabilities": {"content" : {"description": "Receipt for expenses", "title":"receipt2.pdf"}},"feedElementType":"FeedItem"}}]};type=application/json' -F "bin1=@/Users/jsmith/Desktop/receipt.pdf;type=application/octet-stream" -F "bin2=@/Users/jsmith/Desktop/receipt2.pdf;type=application/octet-stream" -X POST https://instance_name/services/data/v35.0/chatter/feed-elements/batch -H 'Authorization: OAuth 00DD00000007HoR44QATPNzhzYEJBfU' --insecure

Here is the same example formatted to show the request body parts. POST /services/data/v35.0/chatter/feed-elements/batch HTTP/1.1 Authorization: OAuth 00DRR0000000N0g!... User-Agent: Jakarta Commons-HttpClient/3.0.1 Host: instance_name Content-Length: 845 Content-Type: multipart/form-data; boundary=a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq Accept: application/json --a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq

14

Chatter REST API Developer Guide

Inputs and Binary File Upload Examples

Content-Disposition: form-data; name="json" Content-Type: application/json; charset=UTF-8 { "inputs": [ { "binaryPartNames": [ "bin1" ], "richInput": { "subjectId": "me", "body": { "messageSegments": [ { "type": "Text", "text": "Please accept this receipt" } ] }, "capabilities": { "content": { "description": "Receipt for expenses", "title": "receipt.pdf" } }, "feedElementType": "FeedItem" } }, { "binaryPartNames": [ "bin2" ], "richInput": { "subjectId": "me", "body": { "messageSegments": [ { "type": "Text", "text": "Post Number 2" } ] }, "capabilities": { "content": { "description": "Receipt for expenses", "title": "receipt2.pdf" } }, "feedElementType": "FeedItem" } } ] }

15

Chatter REST API Developer Guide

Inputs and Binary File Upload Examples

--a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq Content-Disposition: form-data; name="bin1"; filename="receipt.pdf" Content-Type: application/octet-stream; charset=ISO-8859-1 ...contents of receipt.pdf...

--a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq Content-Disposition: form-data; name="bin2"; filename="receipt2.pdf" Content-Type: application/octet-stream; charset=ISO-8859-1 ...contents of receipt2.pdf... --a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq--

Note: The binary part names in the binaryPartNames properties must match the binary part names in the name properties of the binary request parts. Post a comment with a binary file This example posts a comment to a feed item and uploads a binary attachment using cURL. curl -H "X-PrettyPrint: 1" -F 'json={ "body":{ "messageSegments":[ { "type":"Text", "text":"Here's another receipt." } ] }, "capabilities":{ "content":{ "title":"receipt2" } } }; type=application/json' -F "[email protected];type=application/octet-stream" -X POST https://instance_name/services/data/v41.0/chatter/feed-elements/0D5RR0000004Grx/capabilities/comments/items -H 'Authorization: OAuth 00DRR0000000N0g!ARoAQB...' --insecure

Here is the sample example formatted to see the request body parts. POST /services/data/v41.0/chatter/feed-elements/0D5RR0000004Grx/capabilities/comments/items HTTP/1.1 Authorization: OAuth 00DD0000000Jhd2!AQIAQC.lh4qTQcBhOPm4TZom5IaOOZLVPVK4wI_rPYJvmE8r2VW8XA. OZ7S29JEM_7Ctq1lst2dzoV.owisJc0KacUbDxyae Accept: application/json User-Agent: Jakarta Commons-HttpClient/3.0.1 Host: instance_name Content-Length: 978 Content-Type: multipart/form-data; boundary=F9jBDELnfBLAVmLNbnLIYibT5Icp0h3VJ7mkI --F9jBDELnfBLAVmLNbnLIYibT5Icp0h3VJ7mkI Content-Disposition: form-data; name="json" Content-Type: application/json; charset=UTF-8 { "body":{ "messageSegments":[ { "type":"Text", "text":"Here's another receipt."

16

Chatter REST API Developer Guide

Inputs and Binary File Upload Examples

} ] }, "capabilities":{ "content":{ "title":"receipt2" } } } --F9jBDELnfBLAVmLNbnLIYibT5Icp0h3VJ7mkI Content-Disposition: form-data; name="feedElementFileUpload"; filename="receipt2.txt" Content-Type: application/octet-stream; charset=ISO-8859-1 ...contents of receipt2.txt... --F9jBDELnfBLAVmLNbnLIYibT5Icp0h3VJ7mkI--

Post multiple comments with binary files This example is a generic batch request to https://instance_name/services/data/v41.0/connect/batch that contains two subrequests. Each subrequest comments on a feed item and uploads a binary file to the comment. Include the request body of each subrequest in the richInput properties. Also include information about the binary parts in the binaryPartName and binaryPartNameAlias properties. Here is the cURL example. curl -H "X-PrettyPrint: 1" -F 'json={ "haltOnError":true, "batchRequests":[ { "url":"/v33.0/chatter/feed-elements/0D5D0000000YG0N/capabilities/comments/items", "method":"Post", "binaryPartName":"binaryPart1", "binaryPartNameAlias":"feedElementFileUpload", "richInput":{ "body":{ "messageSegments":[ { "type":"Text", "text":"Check out this file, it may help." } ] }, "capabilities":{ "content":{ "title":"Presentation1.txt" } } } }, { "url":"/v33.0/chatter/feed-elements/0D5D0000000YG0M/capabilities/comments/items", "method":"Post", "binaryPartName":"binaryPart2", "binaryPartNameAlias":"feedElementFileUpload", "richInput":{ "body":{ "messageSegments":[ { "type":"Text", "text":"Check out this file, it may help." } ] }, "capabilities":{ "content":{ "title":"Presentation2.txt" } } } } ] };type=application/json' -F "binaryPart1=@/Users/jbleyle/Desktop/Presentation1.txt;type=application/octet-stream" -F "binaryPart2=@/Users/jbleyle/Desktop/Presentation2.txt;type=application/octet-stream" -X POST https://instance_name/services/data/v41.0/connect/batch -H 'Authorization: OAuth 00DD00000007HoR!...' --insecure

Here is the multipart/form-data request body. https://instance_name/services/data/v41.0/connect/batch Authorization: OAuth 00DD0000000Jhd2!... Accept: application/json Host: instance_name Content-Type: multipart/form-data; boundary=123123

17

Chatter REST API Developer Guide

Inputs and Binary File Upload Examples

--123123 Content-Disposition: form-data; name="json" Content-Type: application/json { "haltOnError":true, "batchRequests":[ { "url":"/v41.0/chatter/feed-elements/0D5D0000000YG0D/capabilities/comments/items", "method":"Post", "binaryPartName":"binaryPart1", "binaryPartNameAlias":"feedElementFileUpload", "richInput":{ "body":{ "messageSegments":[ { "type":"Text", "text":"Check out this file, it may help." } ] }, "capabilities":{ "content":{ "title":"Presentation1.txt" } } } }, { "url":"/v41.0/chatter/feed-elements/0D5D0000000YG0H/capabilities/comments/items", "method":"Post", "binaryPartName":"binaryPart2", "binaryPartNameAlias":"feedElementFileUpload", "richInput":{ "body":{ "messageSegments":[ { "type":"Text", "text":"Check out this file, it may help." } ] }, "capabilities":{ "content":{ "title":"Presentation2.txt" } } } } ] }

18

Chatter REST API Developer Guide

Inputs and Binary File Upload Examples

--123123 Content-Disposition: form-data; name="binaryPart1"; filename="Presentation1.txt" Content-Type: application/octet-stream; charset=ISO-8859-1 Content-Transfer-Encoding: binary This is the content of file 1 --123123 Content-Disposition: form-data; name="binaryPart2"; filename="Presentation2.txt" Content-Type: application/octet-stream; charset=ISO-8859-1 Content-Transfer-Encoding: binary This is the content of file 2 --123123--

Upload and crop a user photo This example uploads a user profile photo and crops it using cURL. curl -H "X-PrettyPrint: 1" -F 'json={"cropX": "0", "cropY": "0", "cropSize": "200"};type=application/json' -F "[email protected];type=application/octet-stream" -X POST https://instance_name/services/data/v41.0/chatter/users/me/photo -H 'Authorization: OAuth 00DRR0000000N0g!ARoAQFRi_gBqZhajAX22MNuLrrE2Xk...' --insecure

Here is the same example formatted to see the request body parts. POST /services/data/v41.0/chatter/users/me/photo HTTP/1.1 Authorization: OAuth 00DD0000000Jhd2!AQIAQC.lh4qTQcBhOPm4TZom5IaOOZLVPVK4wI_rPYJvmE8r2VW8XA. OZ7S29JEM_7Ctq1lst2dzoV.owisJc0KacUbDxyae User-Agent: Jakarta Commons-HttpClient/3.0.1 Host: instance_name Content-Length: 543 Content-Type: multipart/form-data; boundary=a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq Accept: application/json --a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq Content-Type: application/json; charset=UTF-8 Content-Disposition: form-data; name="json" { "cropX" : "0", "cropY" : "0", "cropSize" : "200" } --a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq Content-Disposition: form-data; name="fileUpload"; filename="myPhoto.jpg" Content-Type: application/octet-stream; charset=ISO-8859-1 ...contents of myPhoto.jpg... --a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq--

19

Chatter REST API Developer Guide

Inputs and Binary File Upload Examples

Upload a file to the Files home This example uploads a file to the Files home using cURL. curl -H "X-PrettyPrint: 1" -F 'json={"title":"BoatPrices"};type=application/json' -F "[email protected];type=application/octet-stream" -X POST https://instance_name/services/data/v41.0/connect/files/users/me -H 'Authorization: OAuth 00DRR0000000N0g!...' --insecure

Here is the same example formatted to see the request body parts. POST /services/data/v41.0/connect/files/users/me Authorization: OAuth 00DD0000000Jhd2!AQIAQC.lh4qTQcBhOPm4TZom5IaOOZLVPVK4wI_rPYJvmE8r2VW8XA. OZ7S29JEM_7Ctq1lst2dzoV.owisJc0KacUbDxyae User-Agent: Jakarta Commons-HttpClient/3.0.1 Host: instance_name Content-Length: 489 Content-Type: multipart/form-data; boundary=a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq Accept: application/json --a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq Content-Type: application/json; charset=UTF-8 Content-Disposition: form-data; name="json" { "title":"BoatPrices" } --a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq Content-Disposition: form-data; name="fileData"; filename="BoatPrices.txt" Content-Type: application/octet-stream; charset=ISO-8859-1 ...contents of BoatPrices.txt... --a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq--

Upload a file to an external repository This example uploads a file to an external repository using cURL. curl -H "X-PrettyPrint: 1" -F 'json={"itemTypeId" : "file","fields" : [{"name" : "name","value" : "Content Hub Simple Create Specs"}, {"name" : "description","value" : "Document explaining the various connect api endpoints required for simple create"}]};type=application/json' -F "[email protected];type=application/text/plain" -X POST https://instance_name/services/data/v41.0/connect/content-hub/repositories/ 0XCxx000000002CGAQ/folders/folder:0Bz0nXuFg43SiflFNdFNIaUJrY2hQaHVIVHMxYVpHd2ZHeXphTW83TElzcE84RUJ2Q3Q4Rm8/ items -H 'Authorization: OAuth 00DRR0000000N0g!...' --insecure

Here is the same example formatted to see the request body parts. POST /services/data/v41.0/connect/content-hub/repositories/0XCxx000000002CGAQ/ folders/folder:0Bz0nXuFg43SiflFNdFNIaUJrY2hQaHVIVHMxYVpHd2ZHeXphTW83TElzcE84RUJ2Q3Q4Rm8/items

20

Chatter REST API Developer Guide

Wildcards

Authorization: OAuth 00DD0000000Jhd2!AQIAQC.lh4qTQcBhOPm4TZom5IaOOZLVPVK4wI_rPYJvmE8r2VW8XA. OZ7S29JEM_7Ctq1lst2dzoV.owisJc0KacUbDxyae User-Agent: Jakarta Commons-HttpClient/3.0.1 Host: instance_name Content-Length: 489 Content-Type: multipart/form-data; boundary=a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq Accept: application/json --a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq Content-Type: application/json Content-Disposition: form-data; name="json" { "itemTypeId" : "file", "fields" : [ { "name" : "name", "value" : "Items Sharepoint 012.png" }, { "name" : "description", "value" : "This is a test file" }] } --a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq Content-Disposition: form-data; name="fileData"; filename="items_Sharepoint_012.png" Content-Type: image/png ...PNG... --a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq--

Wildcards Use wildcard characters to match text patterns in Chatter REST API and Chatter in Apex searches. A common use for wildcards is searching a feed. Pass a search string and wildcards in the q parameter. This example is a Chatter REST API request: /chatter/feed-elements?q=chat*

This example is a Chatter in Apex method call: ConnectApi.ChatterFeeds.searchFeedElements(null, 'chat*');

You can specify the following wildcard characters to match text patterns in your search: Wildcard

Description

*

Asterisks match zero or more characters at the middle or end of your search term. For example, a search for john* finds items that start with john, such as, john, johnson, or johnny. A search for mi* meyers finds items with mike meyers or michael meyers.

21

Chatter REST API Developer Guide

Wildcard

Specify Response Sizes

Description If you are searching for a literal asterisk in a word or phrase, then escape the asterisk (precede it with the \ character).

?

Question marks match only one character in the middle or end of your search term. For example, a search for jo?n finds items with the term john or joan but not jon or johan. You can't use a ? in a lookup search.

When using wildcards, consider the following notes: • The more focused your wildcard search, the faster the search results are returned, and the more likely the results will reflect your intention. For example, to search for all occurrences of the word prospect (or prospects, the plural form), it is more efficient to specify prospect* in the search string than to specify a less restrictive wildcard search (such as prosp*) that could return extraneous matches (such as prosperity). • Tailor your searches to find all variations of a word. For example, to find property and properties, you would specify propert*. • Punctuation is indexed. To find * or ? inside a phrase, you must enclose your search string in quotation marks and you must escape the special character. For example, "where are you\?" finds the phrase where are you?. The escape character (\) is required in order for this search to work correctly.

Specify Response Sizes Use filter parameters to return only the data the application needs. To specify the response size by group (big, medium, or small), use filterGroup as a request parameter or in a request body. In addition, to exclude or include specific properties, use either exclude or include as a request parameter or in a request body. IN THIS SECTION: filterGroup Use the filterGroup parameter in a request URL or in a request body to specify whether to return a small, medium, or big group of properties. The filterGroup property is available in API version 29.0 and later. exclude To exclude specific properties from a response body, use the exclude request parameter. The exclude parameter is available in API version 27.0 and later. include To limit the response body to specific properties, use the include query string parameter.

filterGroup Use the filterGroup parameter in a request URL or in a request body to specify whether to return a small, medium, or big group of properties. The filterGroup property is available in API version 29.0 and later. Note: The filterGroup parameter is supported for JSON only. Every property in every response body is assigned a group size: • Big—The default size. Includes every property in a response body, including those marked Big, Medium, and Small. • Medium—Includes properties marked Medium and Small. • Small—The smallest response size. Includes only properties marked Small.

22

Chatter REST API Developer Guide

Specify Response Sizes

Note: The size assignments are visible only in the documentation. They aren’t visible in the response bodies. When a request includes a filterGroup, the response body only includes properties that are part of the specified group. Things to know about using filter groups: • The default filterGroup size is Big. • Each filter group size assigned to a property has an API version. In future API versions properties may move to different filter groups. • Filter groups affect all HTTP verbs except DELETE and HEAD. • You can use a filterGroup parameter on any request URL, including subrequests in a batch request body, unless otherwise stated. • You can use a filterGroup parameter in conjunction with either an include or an exclude filter parameter to change the set of properties returned. The resulting set is a union of the two sets.

Using a filterGroup parameter with an include or exclude parameter Requests can contain a filterGroup parameter and group size value, and either an include or an exclude filter parameter and value on the URL. This is also true for subrequests in a generic batch request. When a request (or a subrequest) contains both a filterGroup parameter and an include parameter, the response always includes the properties specified by the include parameter. When a request (or a subrequest) contains both a filterGroup parameter and an exclude parameter, the response always excludes the properties specified by the exclude parameter. In this table, read a row from left to right to see whether the property is included in the response. include Filter Property

Provided in Request

Provided in include

exclude Filter Property

Provided in Request

Filter in Request

Provided in exclude

filterGroup Property

Property Included In filterGroup Response in Request

Provided in Request

Provided in

Filter in Request

Yes

No

No

No

No

No

No

Yes

Yes

No

No

Yes or No

Yes or No

Yes

No

No

Yes

No

No

No

Yes

No

No

Yes

No

Yes

No

No

No

No

Yes

Yes

Yes or No

Yes or No

No

No

No

No

No

Yes

No

No

No

No

No

No

Yes

Yes

Yes

Yes

Yes or No

Yes

Yes or No

Yes or No

Yes or No

Error (400)

exclude To exclude specific properties from a response body, use the exclude request parameter. The exclude parameter is available in API version 27.0 and later.

23

Chatter REST API Developer Guide

Specify Response Sizes

The value for the exclude query is a list of properties separated by bars (|). You must URL encode the bars as %7C. You must include a forward slash before each property name. The following request excludes both the aboutMe and address properties from a response body: /chatter/users/me?exclude=/aboutMe%7C/address

The following table lists rules for using the exclude query parameter, as well as additional examples. Description Include a forward slash (/) before property names or the request returns an error. Filter properties by name.

Top-level properties cannot be filtered. Note that this query string doesn’t return an error.

Use a bar (|) delimiter to filter multiple properties. URL encode the delimiter as %7C.

Filtering a response body filters everything in the response body.

To filter a property nested in a response body, include the parent response body name as a filter segment.

Original Output { "bar" : "bar value", "baz" : "baz value" }

Exclude Value

Filtered Output

exclude=bar

400 error with error code INVALID_FILTER_VALUE

exclude=/bar

{ "bar" : "bar value", "baz" : "baz value" }

exclude=/foo

bar value baz value

exclude=/foo%7C/bar

{ "foo" : "foo value", "bar" : "bar value", "baz" : "baz value" }

exclude=/someObject

bar value baz value sub 1

exclude=/someObject/sub

bar value baz value sub value

24

{ "baz" : "baz value" }

bar value baz value

{ "baz" : "baz value" }

bar value baz value

bar value baz value

Chatter REST API Developer Guide

Description Identify an item in a list by its property name. This example uses XML.

Identify an item in a list by its property name. This example uses JSON.

Specify Response Sizes

Original Output

Exclude Value exclude=/someList/item/id

bar valu baz value 1 2 3

exclude=/someList/item/id

{ "bar" : "bar value", "baz" : "baz value", "someList" : [ { "id" : "1" }, { "id" : "2" } , { "id" : "3" } ] }

Filtered Output bar value baz value

{ "bar" : "bar value", "baz" : "baz value", "someList" : [ {}, {}, {} ] }

include To limit the response body to specific properties, use the include query string parameter. The value for the include query string parameter is a list of properties separated by bars (|). You must URL encode the bars as %7C. Include a forward slash before every property name. The following request includes only the aboutMe property and the address property in a response body: /chatter/users/me?include=/aboutMe%7C/address

The following table lists rules for using the include query parameter. Description Include a forward slash (/) before property

Original Output { "bar" : "bar value",

Include Value

Filtered Output

include=bar

400 error with error code INVALID_FILTER_VALUE

25

Chatter REST API Developer Guide

Description names or the request returns an error. Filter properties by name.

Top-level properties are ignored. Note there is no error when you try this.

Use a bar (|) delimiter to filter multiple properties. URL encode the delimiter as %7C.

Filtering a response body filters everything below it.

To filter a property nested in a response body, include the parent response body name as a filter segment.

Identify an item in a list by its property name. This example uses XML.

Specify Response Sizes

Original Output

Include Value

Filtered Output

"baz" : "baz value" }

include=/bar

{ "bar" : "bar value", "baz" : "baz value" }

include=/foo

bar value baz value

include=/foo%7C/bar

{ "foo" : "foo value", "bar" : "bar value", "baz" : "baz value" }

{ "bar" : "bar value", }

bar value baz value

{ "foo" : "foo value", "bar" : "bar value", }

include=/someObject

bar value baz value sub 1

include=/someObject/sub

bar value baz value sub value

include=/someList/item/id

bar valu baz value 1

26

sub 1

sub 1

1 2

Chatter REST API Developer Guide

Description

Response Body Encoding

Original Output

Include Value

2 3

Identify an item in a list by its property name. This example uses JSON.

Filtered Output 3

include=/someList/item/id

{ "bar" : "bar value", "baz" : "baz value", "someList" : [ { "id" : "1" }, { "id" : "2" } , { "id" : "3" } ] }

{ "someList" { "id" : }, { "id" : } , { "id" : } ] }

: [ "1"

"2"

"3"

Response Body Encoding Chatter REST API responses are minimally HTML entity-encoded by default. These characters are escaped in all strings: Character

Escaped as




"

"

'

'

\

\

&

&

Chatter REST API does special encoding of any URL values included in response payloads. The main part of the URL is URL-encoded as per RFC2396, and the query string is HTML-form encoded. This encoding cannot be turned off. Warning: Chatter REST API serves user-submitted content that may not be filtered at input and can come from many sources including third-party mobile and web applications. Process Chatter REST API output for the context in which your app uses the

27

Chatter REST API Developer Guide

Status Codes and Error Responses

output. Failing to process output can expose applications and users to Cross Site Scripting (XSS) exploits and other problems that can result in data loss, application failure, and exposure of company information. Chatter REST API output can be used in many contexts. Don’t assume that the default entity encoding is appropriate for all contexts. Using Chatter REST API output inside HTML attribute values, inside URLs, with JavaScript, inside tags, and inside CSS all require different encoding and whitelisting. See the Open Web Application Security Project for information on how to handle API output in different contexts. For non-HTML contexts, such as native mobile applications, Chatter REST API clients can request raw (unencoded) output. Set the X-Chatter-Entity-Encoding HTTP header in a request to false.

Status Codes and Error Responses The response header contains an HTTP status code. If the response isn’t successful, the response body contains an error message, and if appropriate, information about the field or object where the error occurred. HTTP Status Code

Description

200

Success with GET, PATCH, or HEAD request

201

Success with POST request

204

Success with DELETE

400

The request could not be understood, usually because the ID is not valid for the particular resource. For example, if you use a userId where a groupId is required, the request returns 400.

401

The session ID or OAuth token has expired or is invalid. Or, if the request is made by a guest user, the resource isn’t accessible to guest users. The response body contains the message and errorCode.

403

The request has been refused. Verify that the context user has the appropriate permissions to access the requested data, or that the context user is not an external user.

404

Either the specified resource was not found, or the resource has been deleted.

409

A conflict has occurred. For example, an attempt was made to update a request to join a group, but that request had already been approved or rejected.

412

A precondition has failed. For example, in a batch request, if haltOnError is true and a subrequest fails, subsequent subrequests return 412.

500

An error has occurred within Force.com, so the request could not be completed. Contact Salesforce Customer Support.

503

Too many requests in an hour or the server is down for maintenance.

Example This request requires a comment ID, but it uses a feed item ID instead: GET /chatter/comments/0D5D0000000XZoHKAW

28

Chatter REST API Developer Guide

OAuth and Chatter REST API

The response body is: HTTP/1.1 400 Bad Request Date: Fri, 22 May 2015 17:32:10 GMT Set-Cookie: BrowserId=D_3feNw7RYmP4DA;Path=/;Domain=.salesforce.com;Expires=Tue, 21-Jul-2015 17:32:10 GMT Expires: Thu, 01 Jan 1970 00:00:00 GMT Content-Type: application/json;charset=UTF-8 Transfer-Encoding: chunked

[ { "errorCode" : "INVALID_ID_FIELD", "message" : "Invalid identifier: 0D5D0000000XZoHKAW" } ]

OAuth and Chatter REST API Chatter REST API uses OAuth to securely identify your application before connecting to Salesforce. OAuth is an open protocol that allows secure authentication for access to a user's data, without handing out the user's username and password. It is often described as the valet key of software access: a valet key only allows access to certain features of your car: for example, you can’t open the trunk or glove compartment using a valet key. When you use OAuth, you can avoid storing login credentials in your application. Instead, your application can prompt the user to log in using a standard Salesforce page, which returns an access token to your application. Your application can use this access token to access Chatter REST API web services. This approach to authentication can be used in both mobile apps and from a web page. Chatter REST API uses OAuth 2.0.

Connected Apps To use Chatter REST API, you must create a REST entry point in your organization. Salesforce defines this entry point as a connected app definition. For an example in creating a connected app definition, see Step Two: Set Up Authorization on page 42. Considerations when creating and using a connected app: • The following maps the labels used in the connected app definition to OAuth terms: Connected App Label

OAuth Term

Description

Consumer Key

client_id

A unique identifier that identifies your application to Salesforce.

Consumer Secret

client_secret

A secret key associated with your application.

Callback URL

redirect_uri

A URL associated with your client application. In some contexts, the URL must be a real URL that the client’s web browser is redirected to. In others, the URL isn’t used; however, between your client application and the server (the connected

29

Chatter REST API Developer Guide

Connected App Label

OAuth and Chatter REST API

OAuth Term

Description app definition) the value must be the same. For example, you may want to use a value that identifies the application, such as http://mycomponent.myapp.

• If you are developing a mobile app, you can use the following value for the Callback URL (redirect_uri) to avoid setting up an application server of your own. https://login.instance_name/services/oauth2/success

Don’t use this value when developing a web application. • Your connected app doesn’t have to reside in the same org as your users. The connected app you create can be used to sign in to any org. • We recommend creating more than one connected app definition: one for testing and one for production. If you create only one, you must change the value of the Callback URL to reflect the location of your application code. In addition, you should create more than one connected app if you are developing for different platforms, such as iOS and Android.

OAuth Basics • OAuth grants access by client applications to resources owned by resource owners. In terms of OAuth, a resource is anything that must be kept secured. For Chatter REST API, the resource we are concerned about protecting is all the data accessible through the API. • It is up to a resource owner to grant access to resources. In our context, the resource owner is a combination of the administrator (who administers users and the connected app) and the users (who log in and grant access to third-party applications). • When an application wants to access a resource, it requests authorization from the resource owner. OAuth outlines various ways that an application can be granted access to a resource. These are referred to as grant types or flows. Different flows are suitable for different contexts. • Once a client application has been authorized to access to a resource, the client application is given an access token and a refresh token. The authorized client application must include the access token in any subsequent web service requests to identify itself. Access tokens have a limited lifetime. When an access token expires, the authorized client application can make a special request using the refresh token to obtain a new access token.

OAuth Flows A user must be authenticated before accessing Salesforce. OAuth has multiple authentication flows. There are several steps in each authentication flow, as dictated by the OAuth standard and the type of application trying to access Salesforce. On successful authorization, the client application is provided with access and refresh tokens. Salesforce supports these flows for use with the Chatter REST API. • Web server flow • User-agent flow In addition, you can use the refresh token to get a new access token after your application has been authorized for access. For detailed information about using OAuth with Salesforce Communities, see the Salesforce Help.

30

Chatter REST API Developer Guide

OAuth and Chatter REST API

Revoke Access After users have been granted access to a client application, they can revoke access by clicking Revoke in the Connected Apps section of their Personal Information page.

More Resources To find out the latest information about Chatter REST API, as well as more code examples, see https://developer.salesforce.com/page/Chatter_API. Chatter REST API shares some infrastructure with the Force.com REST API. The information on authentication in these Force.com tutorials is also applicable to Chatter REST API. • Getting Started with the Force.com REST API • Digging Deeper into OAuth on Force.com • Using OAuth to Authorize External Applications The authentication part of the Force.com REST API is shared with Chatter REST API. You may find the following library supporting the Force.com REST API useful: • Force.com JavaScript REST Toolkit OAuth is a popular authentication standard. Client libraries for OAuth help smooth the development process for client applications. Here are some client programming libraries you may find useful: • Ruby on Rails: OmniAuth • Java Apache Amber IN THIS SECTION: Web Server OAuth Authentication Flow User-Agent OAuth Authentication Flow Tokens Request Static Assets and Post Forms Directly from HTML

Web Server OAuth Authentication Flow Typically this flow is used by web applications that can confidentially store the client secret. A critical aspect of the web server flow is that the application must be able to protect the consumer secret. The following is the general flow. The individual step descriptions follow.

31

Chatter REST API Developer Guide

OAuth and Chatter REST API

The following is a general description of the OAuth web-server flow: 1. To request authorization for a resource, the client application redirects the end user’s browser to a web page hosted on the resource owner’s authorization server. In this case, it is the Salesforce login page. 2. End users log in to Salesforce to authenticate themselves. Because the resource owner (Salesforce) hosts this web page and the end user interacts directly with the web page, the client web application never finds out the user’s login credentials. The end user also grants authorization to the client application. 3. Salesforce sends the authorization code back to the client application using the specified callback URL. 4. After obtaining the authorization code, the client application passes back the authorization code to obtain an access token. 5. After validating the authorization code, Salesforce passes back a response token. If there was no error, the response token includes an access code, a refresh token, and additional information. 6. The protected resources are Chatter REST API endpoints.

Using the Web Server Flow with Chatter REST API and Salesforce The following provides specific details for the OAuth Web-server flow when used with Salesforce and Chatter REST API: 1. Direct the client’s web browser to the page https://login.instance_name/services/oauth2/authorize, with the following request parameters:

32

Chatter REST API Developer Guide

OAuth and Chatter REST API

Parameter

Description

response_type

Must be code for this authentication flow

client_id

The Consumer Key value from the connected app defined for this application

redirect_uri

The Callback URL value from the connected app defined for this application

You can also include the following optional request parameters: Parameter

Description

state

Specifies URL-encoded state data to be returned in the callback URL after approval.

immediate

Determines whether the user is prompted for login and approval. Values are either true or false. Default is false. • If set to true, and if the user is logged in and has previously approved the application, the approval step is skipped. • If set to true and the user is not logged in or has not previously approved the application, the session is immediately terminated with the immediate_unsuccessful error code. Indicates the type of web pages that is provided. Valid values are:

display

• page—Full-page authorization screen. This is the default value if none is specified. • popup—Compact dialog optimized for modern web browser popup windows. • touch—mobile-optimized dialog designed for modern smartphones such as Android and iPhone. • mobile—mobile optimized dialog designed for less capable smartphones such as BlackBerry OS 5.

2. After successfully being logged in, the user is asked to authorize the application.

33

Chatter REST API Developer Guide

OAuth and Chatter REST API

If the user has already authorized the application, this step is skipped. 3. After Salesforce confirms that the client application is authorized, the end user’s web browser is redirected to the callback URL. The redirect_uri parameter, appended with the following values in its query string, specifies the callback URL. Parameter

Description

code

The authorization code that is passed to get the access and refresh tokens

state

The state value that was passed in as part of the initial request, if applicable.

34

Chatter REST API Developer Guide

OAuth and Chatter REST API

It is expected that the client application server hosts the redirect_uri web page. 4. The client application server must extract the authorization code and pass it in a request to Salesforce for an access token, using POST against this URL: https://login.instance_name/services/oauth2/token with the following query parameters. Parameter

Description

grant_type

Value must be authorization_code for this flow.

client_id

Consumer key from the connected app definition.

client_secret

Consumer secret from the connected app definition. If a client_secret isn’t required, and the connected app sends it in the authorization request, Salesforce attempts to validate it, anyway.

redirect_uri

URI to redirect the user to after approval. This URI must match the value in the Callback URL field in the connected app definition exactly, and is the same value sent by the initial redirect.

code

Authorization code obtained from the callback after approval.

format

Expected return format. This parameter is optional. The default is json. Values are: • urlencoded • json • xml

5. If this request is successful, the server returns a response body holding the following. Parameters

Description

access_token

Session ID that you can use for making Chatter REST API requests. This session ID cannot be used in the user interface. Treat this session ID like a user's session and diligently protect it.

refresh_token

Token that can be used in the future to obtain new access tokens (sessions). Warning: This value is a secret. Treat it like the user's password and use appropriate measures to protect it.

instance_url

URL indicating the instance of the user's organization, for example, https://instance_name.

id

Identity URL that can be used to both identify the user and query for more information about the user. Can be used in an HTTP request to get more information about the end user.

signature

Base64-encoded HMAC-SHA256 signature signed with the consumer's private key containing the concatenated ID and

35

Chatter REST API Developer Guide

OAuth and Chatter REST API

Parameters

Description issued_at. This signature can be used to verify that the identity URL was not modified since the server sent it.

When the signature was created.

issued_at

User-Agent OAuth Authentication Flow Typically this flow is used by mobile apps or applications that directly access the Chatter REST API from JavaScript. In this flow, it is assumed that the client application can’t be trusted to store client credentials, nor the user login credentials. Warning: Because the access token is encoded into the redirection URI, it might be exposed to the end-user and other applications residing on the computer or device. If you are authenticating using JavaScript, we recommend calling window.location.replace(); to remove the callback from the browser’s history. The following is the general flow. The individual step descriptions follow.

The following is a general description of the OAuth user-agent flow:

36

Chatter REST API Developer Guide

OAuth and Chatter REST API

1. To request authorization for a resource, the client application redirects the end user’s browser to a web page hosted on the resource owner’s authorization server. In this case, it’s the Salesforce login page. 2. The end user logs in to Salesforce to authenticate themselves. Because the resource owner (Salesforce) hosts and the end user interacts directly with this web page, the client web application never finds out the user’s login credentials. If the client application is running in the browser already, the browser can be redirected. If the client application is a mobile app, a browser must be opened (such as an UIWebView in iOS). The end user uses this web page to authenticate themselves and then grant authorization to the client application. 3. After authorization is granted, the authorization server redirects the end user’s web browser to a redirection URL. The client application can use this URL to retrieve the access and refresh tokens. 4. The protected resources are Chatter REST API resources.

Using the User-Agent Flow with Chatter REST API and Salesforce The following provides specific details for the OAuth user-agent flow when used with Salesforce and Chatter REST API. 1. Direct the client’s web browser to the page https://login.instance_name/services/oauth2/authorize, with these request parameters. Parameter

Description

response_type

Must be token for this authentication flow

client_id

The Consumer Key value from the connected app defined for this application

redirect_uri

The Callback URL value from the connected app defined for this application

You can also include these optional request parameters. Parameter

Description

display

Indicates the type of web page that’s provided. Valid values are: • page—Full-page authorization screen. This is the default value if none is specified. • popup—Compact dialog optimized for modern web browser popup windows. • touch—mobile-optimized dialog designed for modern smartphones such as Android and iPhone. • mobile—mobile optimized dialog designed for older smartphones such as BlackBerry OS 5.

scope

Specifies what data your app can access. You do not have to specify any value to access Chatter REST API If you specify any values, you must include the chatter_api value.

state

Specifies URL-encoded state data to be returned in the callback URL after approval.

37

Chatter REST API Developer Guide

OAuth and Chatter REST API

2. After successfully logging in, the user is asked to authorize the application. If the user has already authorized the application, this step is skipped. 3. After Salesforce confirms that the client application is authorized, the end user’s web browser is redirected to the callback URL specified by the redirect_uri parameter, appended with the following values after the hash sign (#). This is not a query string. Parameters

Description

access_token

Session ID that you can use for making Chatter REST API requests. This session ID cannot be used in the user interface. Treat it like a user's session and diligently protect it.

expires_in

Amount of time the access token is valid, in seconds.

refresh_token

Token that can be used in the future to obtain new access tokens (sessions). Warning: This value is a secret. Treat it like the user's password and use appropriate measures to protect it. The refresh token is only returned if the redirect URI is https://login.instance_name/services/oauth2/success

or used with a custom protocol that is not HTTPS.

These additional parameters are returned; however, they aren't used with this flow and Chatter REST API. • instance_url • id • signature • issued_at 4. If the client application is a web app, the redirection web page that it uses may include JavaScript that the client application can manipulateto retrieve the access and refresh tokens. Alternatively, a client application (native or web) may use the page https://login.instance_name/services/oauth2/success as their callback URL. Instead of actually loading the page on redirect, they should intercept the redirection URI and extract the parameters values. The refresh_token parameter

values are only provided if the redirection URI is this URI or if the redirection URI uses a custom protocol. Once the client application has retrieved the access and refresh tokens, it can use them to make requests to Chatter REST API.

Tokens As part of both authentication flows, you will be working with access tokens and refresh tokens.

Using Access Tokens To make a successful Chatter REST API request, you must include a valid access token in the request. This can be done by using the HTTP Authorization header: Authorization: OAuth

If the request yields an error response due to an expired token, the refresh token can be used to get a new access token.

38

Chatter REST API Developer Guide

OAuth and Chatter REST API

If the request yields an error because an access token has been revoked, the client application must be re-authorized by the user in order to gain access.

Using Refresh Tokens If the client application has a refresh token, it can use it to send a request for a new access token. To ask for a new access token, the client application should send a POST request to https://login.instance_name/services/oauth2/token with the following query parameters: Parameters

Description

grant_type

Value must be refresh_token for this flow.

refresh_token

The refresh token the client application already received.

client_id

Consumer key from the connected app definition.

You can also include the following optional parameters: Parameters

Description

client_secret

Consumer secret from the connected app definition.

format

Expected return format. The default is json. Values are: • urlencoded • json • xml

If this request is successful, the server returns a payload holding the access_token. The following additional parameters are also returned, however, they aren't used with this flow and Chatter REST API: • instance_url • id • signature • issued_at

Request Static Assets and Post Forms Directly from HTML HTML pages that aren’t hosted on Salesforce have had difficulty displaying user and group images and posting file attachments in forms. The reason is that URLs for these assets require authentication, which is provided with a session cookie when pages are hosted on Salesforce. Pages not hosted on Salesforce don't have access to the session cookie. Also, it isn’t possible to pass an OAuth token from the HTML contexts , , and . To solve this problem, request self-authenticating bearer token URLs. A bearer token URL is a Chatter REST API resource with an appended bearer token that provides access to the resource. Use bearer token URLs as they are. Don’t add or remove parameters or you receive an error. Use bearer token URLs in , , and tags to do the following: • Request static Chatter REST API assets such as Chatter user profile images, files, and file and dashboard previews.

39

Chatter REST API Developer Guide

OAuth and Chatter REST API

• Post form requests to Chatter REST API when files are attached, for example, feed items or comments with a file attachment, or user profile photo updates. To request static assets or post form requests, request a resource that returns a bearer token URL. Then request the resource using the bearer token URL. 1. Request a resource with a response body property that contains a bearer token URL: • Banner Photo—bannerPhotoUrl, url* • Comment Page—currentPageUrl* • Content Capability—downloadUrl, externalDocumentUrl, renditionUrl, repositoryFileUrl • Feed—feedElementPostUrl*, feedElementsUrl*, feedItemsUrl* • Feed Item—photoUrl • Feed Item Attachment: Content—downloadUrl, externalDocumentUrl, renditionUrl, repositoryFileUrl • Feed Item Attachment: Dashboard—fullSizeImageUrl, thumbnailUrl • File Detail—downloadUrl, externalDocumentUrl, renditionUrl, renditionUrl240By180, renditionUrl720By480, repositoryFileUrl • File Preview URL—previewUrl • File Summary—downloadUrl, externalDocumentUrl, renditionUrl, renditionUrl240By180, renditionUrl720By480, repositoryFileUrl • File Summary Page—currentPageUrl* • Icon—url • Mention Completion—photoUrl • Message Segment: Inline Image—url* • Photo—largePhotoUrl, smallPhotoUrl, url* • Repository File Detail—downloadUrl • Repository File Summary—downloadUrl *Use to POST or PUT new items that include binary files: for example, a feed item or comment with a file attachment. 2. Pass the X-Connect-Bearer-Urls request header with a value of true: X-Connect-Bearer-Urls: true

3. Parse the bearer token URL from the response body. Use it in an HTML tag to request a static asset or to post a form request. Bearer token URLs have the following characteristics: • The bearer token is good for the given URL only. Adding or reordering query parameters invalidates the URL. • The bearer token has a time-to-live (TTL) of 20 minutes. If the token expires, request it again. • The request to the bearer token URL authenticates as the user who requested the resource that returned the bearer token URL.

40

Chatter REST API Developer Guide

Use CORS to Access Supported Salesforce APIs, Apex REST, and Lightning Out

Use CORS to Access Supported Salesforce APIs, Apex REST, and Lightning Out Apex REST, Bulk API, Chatter REST API, User Interface API, Lightning Out, REST API, and Analytics REST API support CORS (cross-origin resource sharing). To access these APIs from JavaScript in a web browser, add the origin serving the script to the CORS whitelist. CORS is a W3C recommendation that enables web browsers to request resources from origins other than their own (cross-origin request). For example, using CORS, a JavaScript script at https://www.example.com could request a resource from https://www.salesforce.com. If a browser that supports CORS makes a request to an origin in the Salesforce CORS whitelist, Salesforce returns the origin in the Access-Control-Allow-Origin HTTP header, along with any additional CORS HTTP headers. If the origin is not included in the whitelist, Salesforce returns HTTP status code 403. 1. From Setup, enter CORS in the Quick Find box, then select CORS. 2. Select New.

EDITIONS Available in: Salesforce Classic and Lightning Experience Available in: Developer, Enterprise, Performance, and Unlimited

USER PERMISSIONS To create, read, update, and delete: • Modify All Data

3. Enter an origin URL pattern. The origin URL pattern must include the HTTPS protocol (unless you’re using your localhost) and a domain name and can include a port. The wildcard character (*) is supported and must be in front of a second-level domain name. For example, https://*.example.com adds all subdomains of example.com to the whitelist. The origin URL pattern can be an IP address. However, an IP address and a domain that resolve to the same address are not the same origin, and you must add them to the CORS whitelist as separate entries. Important: CORS does not support requests for unauthenticated resources, including OAuth endpoints. You must pass an OAuth token with requests that require it.

Chatter REST API Quick Start Connect to Salesforce and authenticate, then make a request to Chatter REST API and look at the response. IN THIS SECTION: 1. Prerequisites Complete these prerequisites before you begin the quick start. 2. Step One: Obtain a Salesforce Developer Edition Organization Set up a Developer Edition organization for testing your code. 3. Step Two: Set Up Authorization Create a connected app in a Salesforce organization and enable OAuth. The client application uses the connected app to connect to Salesforce. 4. Step Three: Connect to Chatter REST API Using OAuth Use OAuth to connect to Salesforce and get an access token. Pass the access token in requests to Chatter REST API. 5. Connect to Salesforce Communities To use OAuth to connect to a Salesforce community, replace the server instance name with the full path to the community URL.

41

Chatter REST API Developer Guide

Prerequisites

Prerequisites Complete these prerequisites before you begin the quick start. Become familiar with: • cURL, which is a command-line tool the quick start uses as the client application that makes HTTP requests to Salesforce. cURL is pre-installed on many Linux and Mac systems. Windows users can download a version at curl.haxx.se/. When using HTTPS on Windows, ensure that your system meets the cURL requirements for SSL. Note: cURL is an open source tool and is not supported by Salesforce. • JavaScript Object Notation (JSON), which is the data format returned in this quick start. • OAuth 2.0, which is the framework Salesforce uses for authentication. The quick start provides the steps, but it would be helpful to familiarize yourself with OAuth terms and concepts.

Step One: Obtain a Salesforce Developer Edition Organization Set up a Developer Edition organization for testing your code. If you are not already a member of the Force.com developer community, go to developer.salesforce.com/signup and follow the instructions for signing up for a Developer Edition organization. Even if you already have Enterprise Edition, Unlimited Edition, or Performance Edition, use Developer Edition for developing, staging, and testing your solutions against sample data to protect your organization’s live data. This is especially true for applications that insert, update, or delete data (as opposed to simply reading data). If you already have a Developer Edition organization, verify that you have the API Enabled permission. This permission is enabled by default, but may have been changed by an administrator. For more information, see the help in the Salesforce user interface.

Step Two: Set Up Authorization Create a connected app in a Salesforce organization and enable OAuth. The client application uses the connected app to connect to Salesforce. 1. In your Developer Edition organization, from Setup, enter Apps in the Quick Find box, then select Apps, and in the Connected Apps section, click New to create a connected app. Clients can use a connected app to sign in to any organization, even if the connected app isn’t defined in that organization. 2. Enter a connected app name. 3. Enter the contact email and any other required information. 4. Select Enable OAuth Settings. 5. Enter a Callback URL. It must be secure: http:// does not work, only https:// works. For this quick start, you can simply enter https://. 6. Enter an OAuth scope. Select Access and manage your Chatter feed in addition to any other scope you want your connected app to allow access to. 7. Click Save. The Consumer Key is created and displayed, and a Consumer Secret is created (click the link to reveal it).

Step Three: Connect to Chatter REST API Using OAuth Use OAuth to connect to Salesforce and get an access token. Pass the access token in requests to Chatter REST API.

42

Chatter REST API Developer Guide

Step Three: Connect to Chatter REST API Using OAuth

Complete Step Two: Set Up Authorization and create a connected app before starting this task. This table maps the terms used in the connected app you created to the OAuth properties used in the examples. The OAuth 2.0 specification uses the word “client” instead of “consumer.” Connected App Application Label

Value in Example

Consumer Key

client_id

Consumer Secret

client_secret

Note: This quick start uses the username-password OAuth authentication flow. The username-password authentication flow passes the user’s credentials back and forth. Use this authentication flow only when necessary, such as in this quick start. No refresh token is issued. In addition, Salesforce Communities doesn’t support the username-password authentication flow. In this quick start, don’t make a request to a communities URL. To make a request to Salesforce, substitute values from your organization into these examples: 1. Generate the access token. This cURL command generates an access token: curl -v https://login.salesforce.com/services/oauth2/token -d "grant_type=password" -d "client_id=3MVG9PhR6g6B7ps4xDycwGrI4PvjVZvK9" -d "client_secret=8870355475032095511" -d "[email protected]" -d "password=test1234mB1riuD3n"

Note: The response includes the server instance and the access token: { "access_token":"00Dd0000000d2Iy!AQgAQLwpOxN4DhZO2qB8PCbD8VU1T35znzeDeCm....", "instance_url":"https://instance_name.my.salesforce.com", "id":"https://login.salesforce.com/id/00Dd000000XXXXXXX/005d000000XXXXX", "token_type":"Bearer", "issued_at":"1486507938095", "signature":"uEY/R99P/uqgq0GYNQKcvKc9LqICOMf91NvwI2my4eI=" }

2. To request a Chatter REST API resource, use the returned instance_url as the server instance. Pass the returned access_token as a Bearer token in the Authorization request header. curl -X GET https://instance_name/services/data/v41.0/chatter/users/me -H 'Authorization: Bearer 00DD0000000FJ6T!AQkAQPde_DMF2vGzddfZmBRS95Goj DbtArKkgukAgZP0OVFYY5KkAqhLw9ejeKIlpJ3FgwGAWeRlBiWRt8mfXEuAZGbZNosk'

This example uses these values: Property

Value

client_id

3MVG9PhR6g6B7ps4xDycwGrI4PvjVZvK9

client_secret

8870355475032095511

43

Chatter REST API Developer Guide

Connect to Salesforce Communities

Property

Value

grant_type

password The value of grant_type depends on the OAuth authentication flow you are using. Append the user’s security token to their password. A security token is an automatically generated key from Salesforce. For example, if a user's password is mypassword, and their security token is XXXXXXXXXX, then the value provided for this parameter must be mypasswordXXXXXXXXXX.

username

[email protected]

password

test1234mB1riuD3n

Connect to Salesforce Communities To use OAuth to connect to a Salesforce community, replace the server instance name with the full path to the community URL. To connect to a Salesforce community, you can use the OAuth web server and user-agent workflows. To authenticate a user using the authorize URL, replace the login.salesforce.com host name with the full path to the community URL. This is the non-communities URL. https://login.salesforce.com/services/oauth2/authorize? response_type=token&client_id=your_app_id&redirect_uri=your_redirect_uris

This is the communities URL. https://acme.force.com/customers/services/oauth2/authorize? response_type=token&client_id=your_app_id&redirect_uri=your_redirect_uri

When implemented successfully, this URL directs users to your app’s branded login page. After they authorize the app, set a user access token and a refresh token for future authentication. In requests for the token endpoint, replace the host with the community. https://acme.force.com/customers/services/oauth2/token

To request a Chatter REST API resource, use the Salesforce host name and specify the community ID. https://instance_name/services/data/v29.0/connect /communities/communityId/chatter/feeds/news/me/feed-elements

Alternately, you can replace the host name with the full path to the community URL. https://communitydomain.force.com/communitypath/services/data/v29.0/connect /communities/communityId/chatter/feeds/news/me/feed-elements

Chatter REST API Features Find the resources to work with Chatter REST API features.

44

Chatter REST API Developer Guide

Action Links

IN THIS SECTION: Action Links An action link is a button on a feed element. Clicking an action link can take a user to a Web page, initiate a file download, or invoke an API call to Salesforce or to an external server. An action link includes a URL and an HTTP method, and can include a request body and header information, such as an OAuth token for authentication. Use action links to integrate Salesforce and third-party services into the feed so that users can take action to drive productivity and accelerate innovation. Communities Communities are branded spaces for your employees, customers, and partners to connect. You can customize and create communities to meet your business needs, then transition seamlessly between them. Feeds and Feed Elements In API versions 30.0 and earlier, a Chatter feed was a container of feed items. In API version 31.0, the definition of a feed expanded to include new objects that didn’t entirely fit the feed item model. The feed became a container of feed elements. In API version 32.0, feed elements can be either feed items or generic feed elements. Because feeds and feed elements are the core of Chatter, understanding them is crucial to developing applications with Chatter REST API. Salesforce Files Use Chatter REST API to work with Salesforce Files, which includes Salesforce Files Sync.

Action Links An action link is a button on a feed element. Clicking an action link can take a user to a Web page, initiate a file download, or invoke an API call to Salesforce or to an external server. An action link includes a URL and an HTTP method, and can include a request body and header information, such as an OAuth token for authentication. Use action links to integrate Salesforce and third-party services into the feed so that users can take action to drive productivity and accelerate innovation.

Workflow This feed item contains one action link group with two action links: Approve and Reject.

The workflow to create and post action links with a feed element:

45

Chatter REST API Developer Guide

Action Links

1. (Optional) Create an action link template. 2. Make a request to /connect/action-link-group-definitions to define an action link group or to instantiate an action link group from a template. An action link group contains at least one action link. 3. Make a request to /chatter/feed-elements to post a feed element and associate the action link with it.

Action Links Resources Use these resources to work with action links: Resource

HTTP Method

Task

/connect/action-link-group-definitions POST

Create an action link group definition. To associate an action link with a feed element, first create an action link group definition. Then post a feed element with an associated actions capability.

/chatter/feed-elements

POST

Post a feed element with an associated actions capability. Associate up to 10 action link groups with a feed element.

/connect/action-links/actionLinkId

GET, PATCH

Get information about or update the status of an action link. The status of the action link in combination with the labelKey property of the Action Link Definition Input determines the text that displays in the UI. To trigger the API request for Api and ApiAsync action links, set the status to PendingStatus.

/connect/action-link-group-definitions GET, DELETE /actionLinkGroupId

Get information about or delete an action link group definition. Deleting an action link group definition removes all references to it from feed elements. To get or delete the action link group definition, the client must be the same connected app that created the definition and the user must either be the user who created the definition or have View all Data permission.

/connect/action-link-groups /actionLinkGroupId

GET

Get information about an action link group including state for the context user.

/connect/action-links/actionLinkId /diagnostic-info

GET

Get diagnostic information returned when an action link executes. Diagnostic information is given only for users who can access the action link.

/chatter/feed-elements/feedElementId GET /capabilities/associated-actions

Get all the platform actions associated with a feed element. Action links are a type of platform action.

Feeds Resources

Get the feed elements of a specified feed type. If a feed element has action links associated with it, the action links data is returned in the associated actions capability.

GET

/chatter/feeds/feedType/userId/feed-elements /chatter/feeds/feedType/feed-elements

46

Chatter REST API Developer Guide

Action Links

IN THIS SECTION: Action Links Use Cases Use action links to integrate Salesforce and third-party services with a feed. An action link can make an HTTP request to a Salesforce or third-party API. An action link can also download a file or open a web page. This topic contains two use case examples. Action Links Overview, Authentication, and Security Learn about Chatter REST API action links security, authentication, labels, and errors. Action Link Templates Create action link templates in Setup so that you can instantiate action link groups with common properties from Chatter REST API or Apex. You can package templates and distribute them to other Salesforce organizations. SEE ALSO: Define Action Links and Post with a Feed Element Define Action Links in a Template and Post with a Feed Element Define Action Links in a Template and Post with a Feed Element

Action Links Use Cases Use action links to integrate Salesforce and third-party services with a feed. An action link can make an HTTP request to a Salesforce or third-party API. An action link can also download a file or open a web page. This topic contains two use case examples.

Download Instructions and Order a Part from the Feed Let’s imagine that a fictional 3D print shop called “BuildIt” creates an AppExchange app that uses action links to integrate with Salesforce. If a BuildIt customer has the app installed, they can go to the BuildIt website, create an account, and send posts containing action links to Salesforce that invite certain users to order parts from BuildIt. In this sample feed element posted from BuildIt customer Pam Jones to her report Jin Chang, clicking the Download action link downloads a file with parts information from the BuildIt website. Clicking the Order action link takes Jin Chang to a page on the BuildIt website to order a part.

47

Chatter REST API Developer Guide

Action Links

Approve or Reject an Itinerary from the Feed Suppose that you work as a developer for a fictional company called “Travel Example.” You create an app for the Salesforce AppExchange called “Travel Example for Salesforce.” Company A has “Travel Example for Salesforce” installed. Let’s imagine that someone from Company A goes to the Travel Example website and books an itinerary. Your Travel Example server-side code makes a Chatter REST API request to post a feed item in Company A’s Salesforce org with the body text Please approve this trip.. The feed item also has action links with the labels Approve and Reject. The action links make HTTP requests to a REST resource on the Travel Example server to approve or reject the trip.

To create the “Travel Example for Salesforce” app, you created action link templates in Setup that define these action links and the action link group they’re associated with. Your server-side code makes a Chatter REST API request to instantiate the action link group from the template. It makes another Chatter REST API request to associate the action link group with a feed item and post it. The Action URL, HTTP Headers, and HTTP Request Body template fields can contain context variables and binding variables. You include a {!userId} context variable in the Action URL so that when a user clicks the action link in the feed, Salesforce sends the user’s ID to your server-side code to tell it who clicked the action link. Action links support a predefined set of context variables. You can create any binding variables you need in the action link template to make your code future-proof and dynamic. Your server-side code sets the binding variable values when it instantiates the action link group. You decide to use {!Bindings.apiVersion} so that you can release a new API version without having to update your package. You also use {!Bindings.tripId} so that clicking the action link approves or rejects the trip the user created. You set the User Visibility field so that only one user can see the action links. You enter a value in the Custom User Alias field which is also a binding variable whose value your server-side code sets to the ID of the user’s manager when it instantiates the action link group. Here’s the action link template for the Approve action link.

48

Chatter REST API Developer Guide

Action Links

Action Links Overview, Authentication, and Security Learn about Chatter REST API action links security, authentication, labels, and errors.

Workflow This feed item contains one action link group with two action links: Approve and Reject.

The workflow to create and post action links with a feed element: 1. (Optional) Create an action link template.

49

Chatter REST API Developer Guide

Action Links

2. Make a request to /connect/action-link-group-definitions to define an action link group or to instantiate an action link group from a template. An action link group contains at least one action link. 3. Make a request to /chatter/feed-elements to post a feed element and associate the action link with it.

Action Link Templates Create action link templates in Setup to instantiate action link groups with common properties. You can package templates and distribute them to other Salesforce organizations. Specify binding variables in the template and set the values of the variables when you instantiate the action link group. For example, use a binding variable for the API version number, a user ID, or an OAuth token. You can also specify context variables in the templates. When a user executes the action link, Salesforce provides values for these variables, such as who executed the link and in which organization. To instantiate the action link group, make a request to the /connect/action-link-group-definitions resource. Specify the template ID and the values for any binding variables defined in the template. See Design Action Link Templates.

Type of Action Links Specify the action link type in the actionType property when you define an action link. There are four types of action links: • Api—The action link calls a synchronous API at the action URL. Salesforce sets the status to SuccessfulStatus or FailedStatus based on the HTTP status code returned by your server. • ApiAsync—The action link calls an asynchronous API at the action URL. The action remains in a PendingStatus state until a third party makes a request to /connect/action-links/actionLinkId to set the status to SuccessfulStatus or FailedStatus when the asynchronous operation is complete. • Download—The action link downloads a file from the action URL. • Ui—The action link takes the user to a web page at the action URL. Different types of action links have different workflows to set the status of an action link (to Pending, Successful, or Failed). See /connect/action-links/actionLinkId for more information.

Authentication When you define an action link, specify a URL (actionUrl) and the HTTP headers (headers) required to make a request to that URL. If an external resource requires authentication, include the information wherever the resource requires. If a Salesforce resource requires authentication, you can include OAuth information in the HTTP headers or you can include a bearer token in the URL. Salesforce automatically authenticates these resources: • Relative URLs in templates • Relative URLs beginning with /services/apexrest when the action link group is instantiated from Apex Don’t use these resources for sensitive operations.

50

Chatter REST API Developer Guide

Action Links

Security HTTPS The action URL in an action link must begin with https:// or be a relative URL that matches one of the rules in the Authentication section. Encryption API details are stored with encryption, and obfuscated for clients. The actionURL, headers, and requestBody data for action links that are not instantiated from a template are encrypted with the organization’s encryption key. The Action URL, HTTP Headers, and HTTP Request Body for an action link template are not encrypted. The binding values used when instantiating an action link group from a template are encrypted with the organization’s encryption key. Action Link Templates Only users with Customize Application user permission can create, edit, delete, and package action link templates in Setup. Don’t store sensitive information in templates. Use binding variables to add sensitive information when you instantiate the action link group. After the action link group is instantiated, the values are stored in an encrypted format. See Define Binding Variables. Connected Apps When creating action links via a connected app, it's a good idea to use a connected app with a consumer key that never leaves your control. The connected app is used for server-to-server communication and is not compiled into mobile apps that could be decompiled. Expiration Date When you define an action link group, specify an expiration date (expirationDate). After that date, the action links in the group can’t be executed and disappear from the feed. If your action link group definition includes an OAuth token, set the group’s expiration date to the same value as the expiration date of the OAuth token. Action link templates use a slightly different mechanism for excluding a user. See Set the Action Link Group Expiration Time. Exclude a User or Specify a User Use the excludeUserId property of the action link definition input to exclude a single user from executing an action. Use the userId property of the action link definition input to specify the ID of a user who alone can execute the action. If you don’t specify a userId property or if you pass null, any user can execute the action. You can’t specify both excludeUserId and userId for an action link Action link templates use a slightly different mechanism for excluding a user. See Set Who Can See the Action Link. Read, Modify, or Delete an Action Link Group Definition There are two views of an action link and an action link group: the definition, and the context user’s view. The definition includes potentially sensitive information, such as authentication information. The context user’s view is filtered by visibility options and the values reflect the state of the context user. Action link group definitions can contain sensitive information (such as OAuth tokens). For this reason, to read, modify, or delete a definition, the user must have created the definition or have View All Data permission. In addition, in Chatter REST API, the request must be made via the same connected app that created the definition. In Apex, the call must be made from the same namespace that created the definition.

Context Variables Use context variables to pass information about the user who executed the action link and the context in which it was invoked into the HTTP request made by invoking an action link. You can use context variables in the actionUrl, headers, and requestBody properties of the Action Link Definition Input request body or ConnectApi.ActionLinkDefinitionInput object. You can also use context variables in the Action URL, HTTP Request Body, and HTTP Headers fields of action link templates. You can edit these fields, including adding and removing context variables, after a template is published.

51

Chatter REST API Developer Guide

Action Links

The context variables are: Context Variable

Description

{!actionLinkId}

The ID of the action link the user executed.

{!actionLinkGroupId}

The ID of the action link group containing the action link the user executed.

{!communityId}

The ID of the community in which the user executed the action link. The value for your internal organization is the empty key "000000000000000000".

{!communityUrl}

The URL of the community in which the user executed the action link. The value for your internal organization is empty string "".

{!orgId}

The ID of the organization in which the user executed the action link.

{!userId}

The ID of the user that executed the action link.

Versioning To avoid issues due to upgrades or changing functionality in your API, we recommend using versioning when defining action links. For example, the actionUrl property in the Action Link Definition Input should look like https://www.example.com/api/v1/exampleResource. You can use templates to change the values of the actionUrl, headers, or requestBody properties, even after a template is distributed in a package. For example, if you release a new API version that requires new inputs, an admin can change the inputs in the action link template. Even action links already associated with a feed element use the new inputs. However, you can’t add new binding variables to a published action link template. If your API isn’t versioned, you can use the expirationDate property of the Action Link Group Definition Input to avoid issues due to upgrades or changing functionality in your API. See Set the Action Link Group Expiration Time.

Errors Use the Action Link Diagnostic Information resource (/connect/action-links/actionLinkId/diagnostic-info) to return status codes and errors from executing Api and AsyncApi action links. Diagnostic info is given only for users who can access the action link.

Localized Labels Action links use a predefined set of localized labels specified in the labelKey property of the Action Link Definition Input request body and the Label Key field of an action link template. For a list of labels, see Action Links Labels. Note: If none of the label key values make sense for your action link, specify a custom label in the Label field of an action link template and set Label Key to None. However, custom labels aren’t localized.

52

Chatter REST API Developer Guide

Action Links

Action Link Templates Create action link templates in Setup so that you can instantiate action link groups with common properties from Chatter REST API or Apex. You can package templates and distribute them to other Salesforce organizations. An action link is a button on a feed element. Clicking an action link can take a user to a Web page, initiate a file download, or invoke an API call to Salesforce or to an external server. An action link includes a URL and an HTTP method, and can include a request body and header information, such as an OAuth token for authentication. Use action links to integrate Salesforce and third-party services into the feed so that users can take action to drive productivity and accelerate innovation.

EDITIONS Available in: Salesforce Classic and Lightning Experience Available in: All editions except Personal Edition.

In this example, Approve and Reject are action links that make API calls to the REST API of a fictional travel website to approve or reject an itinerary. When Pam created the itinerary on the travel website, the travel website made a Chatter REST API request to post the feed item with the action links to Pam’s manager Kevin so that he can approve or reject the itinerary.

Important: Action links are a developer feature. Although you create action link templates in Setup, you must use Apex or Chatter REST API to generate action links from templates and add them to feed elements. IN THIS SECTION: Design Action Link Templates Before you create a template, consider which values you want to set in the template and which values you want to set with binding variables when you instantiate action link groups from the template. Create Action Link Templates Create action link templates in Setup so that you can instantiate action link groups with common properties from Chatter REST API or Apex. You can package templates and distribute them to other Salesforce organizations. Edit Action Link Templates You can edit all fields on an unpublished action link group template and on its associated action link templates.

53

Chatter REST API Developer Guide

Action Links

Delete Action Link Group Templates When you delete an action link group template, you delete its associated action link templates and all action link groups that have been instantiated from the templates. Deleted action link groups disappear from any feed elements they've been associated with. Package Action Link Templates Package action link templates to distribute them to other Salesforce organizations. SEE ALSO: Define Action Links in a Template and Post with a Feed Element Define Action Links in a Template and Post with a Feed Element

Design Action Link Templates Before you create a template, consider which values you want to set in the template and which values you want to set with binding variables when you instantiate action link groups from the template. • Action Link Templates Overview • Template Design Considerations • Set the Action Link Group Expiration Time • Define Binding Variables • Set Who Can See the Action Link • Use Context Variables

Action Link Templates Overview Here’s an action link group template in Setup:

Each action link group should contain at least one action link. This example action link template has three binding variables: the API version number in the Action URL, the Item Number in the HTTP Request Body, and the OAuth token value in the HTTP Header field.

54

Chatter REST API Developer Guide

Action Links

The Chatter REST API request to instantiate the action link group and set the values of the binding variables: POST /connect/action-link-group-definitions { "templateId":"07gD00000004C9r", "templateBindings":[ { "key":"ApiVersion", "value":"v1.0" }, { "key":"ItemNumber", "value":"8675309" }, { "key":"BearerToken", "value":"00DRR0000000N0g!ARoAQMZyQtsP1Gs27EZ8hl7vdpYXH5O5rv1VNprqTeD12xYnvygD3JgPnNR" } ] }

55

Chatter REST API Developer Guide

Action Links

This is the Apex code that instantiates the action link group from the template and sets the values of the binding variables: // Get the action link group template Id. ActionLinkGroupTemplate template = [SELECT Id FROM ActionLinkGroupTemplate WHERE DeveloperName='Doc_Example']; // Add binding name-value pairs to a map. Map bindingMap = new Map(); bindingMap.put('ApiVersion', '1.0'); bindingMap.put('ItemNumber', '8675309'); bindingMap.put('BearerToken', '00DRR0000000N0g!ARoAQMZyQtsP1Gs27EZ8hl7vdpYXH5O5rv1VNprqTeD12xYnvygD3JgPnNR'); // Create ActionLinkTemplateBindingInput objects from the map elements. List bindingInputs = new List(); for (String key : bindingMap.keySet()) { ConnectApi.ActionLinkTemplateBindingInput bindingInput = new ConnectApi.ActionLinkTemplateBindingInput(); bindingInput.key = key; bindingInput.value = bindingMap.get(key); bindingInputs.add(bindingInput); } // Set the template Id and template binding values in the action link group definition. ConnectApi.ActionLinkGroupDefinitionInput actionLinkGroupDefinitionInput = new ConnectApi.ActionLinkGroupDefinitionInput(); actionLinkGroupDefinitionInput.templateId = template.id; actionLinkGroupDefinitionInput.templateBindings = bindingInputs; // Instantiate the action link group definition. ConnectApi.ActionLinkGroupDefinition actionLinkGroupDefinition = ConnectApi.ActionLinks.createActionLinkGroupDefinition(Network.getNetworkId(), actionLinkGroupDefinitionInput);

Template Design Considerations Considerations for designing a template: • Determine the expiration time of the action link group. See Set the Action Link Group Expiration Time. • Define binding variables in the template and set their values when you instantiate the group. Don’t store sensitive information in templates. Use binding variables to add sensitive information at run time. See Define Binding Variables. • Determine who can see the action link when it’s associated with a feed element. Set Who Can See the Action Link. • Use context variables in the template to get information about the execution context of the action link. When the action link executes, Salesforce fills in the values and sends them in the HTTP request. See Use Context Variables.

56

Chatter REST API Developer Guide

Action Links

Set the Action Link Group Expiration Time When creating an action link group from a template, the expiration date can be calculated based on a period provided in the template, or the action link group can be set not to expire at all. To set the hours until expiration in a template, enter a value in the Hours until Expiration field of the action link group template. This value is the number of hours from when the action link group is instantiated until it's removed from associated feed elements and can no longer be executed. The maximum value is 8760, which is 365 days. To set the action link group expiration date when you instantiate it, set the expirationDate property of either the Action Link Group Definition request body (Chatter REST API) or the ConnectApi.ActionLinkGroupDefinition input class (Apex). To create an action link group that doesn’t expire, don’t enter a value in the Hours until Expiration field of the template and don’t enter a value for the expirationDate property when you instantiate the action link group. Here’s how expirationDate and Hours until Expiration work together when creating an action link group from a template: • If you specify expirationDate, its value is used in the new action link group. • If you don’t specify expirationDate and you specify Hours until Expiration in the template, the value of Hours until Expiration is used in the new action link group. • If you don’t specify expirationDate or Hours until Expiration, the action link groups instantiated from the template don’t expire.

Define Binding Variables Define binding variables in templates and set their values when you instantiate an action link group. Important: Don’t store sensitive information in templates. Use binding variables to add sensitive information at run time. When the value of a binding is set, it is stored in encrypted form in Salesforce. You can define binding variables in the Action URL, HTTP Request Body, and HTTP Headers fields of an action link template. After a template is published, you can edit these fields, you can move binding variables between these fields, and you can delete binding variables. However, you can’t add new binding variables. Define a binding variable’s key in the template. When you instantiate the action link group, specify the key and its value. Binding variable keys have the form {!Bindings.key}. The key supports Unicode characters in the predefined \w character class: [\p{Alpha}\p{gc=Mn}\p{gc=Me}\p{gc=Mc}\p{Digit}\p{gc=Pc}].

This Action URL field has two binding variables: https://www.example.com/{!Bindings.ApiVersion}/items/{!Bindings.ItemId}

This HTTP Headers field has two binding variables: Authorization: OAuth {!Bindings.OAuthToken} Content-Type: {!Bindings.ContentType}

Specify the keys and their values when you instantiate the action link group in Chatter REST API: POST /connect/action-link-group-definitions { "templateId":"07gD00000004C9r", "templateBindings" : [

57

Chatter REST API Developer Guide

Action Links

{ "key":"ApiVersion", "value":"1.0" }, { "key":"ItemId", "value":"8675309" }, { "key":"OAuthToken", "value":"00DRR0000000N0g_!..." }, { "key":"ContentType", "value":"application/json" } ] }

Specify the binding variable keys and set their values in Apex: Map bindingMap = new Map(); bindingMap.put('ApiVersion', '1.0'); bindingMap.put('ItemId', '8675309'); bindingMap.put('OAuthToken', '00DRR0000000N0g_!...'); bindingMap.put('ContentType', 'application/json'); List bindingInputs = new List(); for (String key : bindingMap.keySet()) { ConnectApi.ActionLinkTemplateBindingInput bindingInput = new ConnectApi.ActionLinkTemplateBindingInput(); bindingInput.key = key; bindingInput.value = bindingMap.get(key); bindingInputs.add(bindingInput); } // Define the action link group definition. ConnectApi.ActionLinkGroupDefinitionInput actionLinkGroupDefinitionInput = new ConnectApi.ActionLinkGroupDefinitionInput(); actionLinkGroupDefinitionInput.templateId = '07gD00000004C9r'; actionLinkGroupDefinitionInput.templateBindings = bindingInputs; // Instantiate the action link group definition. ConnectApi.ActionLinkGroupDefinition actionLinkGroupDefinition = ConnectApi.ActionLinks.createActionLinkGroupDefinition(Network.getNetworkId(), actionLinkGroupDefinitionInput);

Tip: You can use the same binding variable multiple times in action link templates, and only provide the value once during instantiation. For example, you could use {!Bindings.MyBinding} twice in the HTTP Request Body field of one action link template, and again in the HTTP Headers of another action link template within the same action link group template, and when you instantiate an action link group from the template, you would need to provide only one value for that shared variable.

58

Chatter REST API Developer Guide

Action Links

Set Who Can See the Action Link Choose a value from the User Visibility drop-down list to determine who can see the action link after it’s associated with a feed element. Among the available options are Only Custom User Can See and Everyone Except Custom User Can See. Choose one of these values to allow only a specific user to see the action link or to prevent a specific user from seeing it. Then enter a value in the Custom User Alias field. This value is a binding variable key. In the code that instantiates the action link group, use the key and specify the value as you would for any binding variable. This template uses the Custom User Alias value Invitee:

When you instantiate the action link group, set the value just like you would set a binding variable: POST /connect/action-link-group-definitions { "templateId":"07gD00000004C9r", "templateBindings" : [ { "key":"Invitee", "value":"005D00000017u6x"

59

Chatter REST API Developer Guide

Action Links

} ] }

If the template uses Only creator’s manager can see, a user that doesn’t have a manager receives an error when instantiating an action link group from the template. In addition, the manager is the manager at the time of instantiation. If the user’s manager changes after instantiation, that change isn’t reflected.

Use Context Variables Use context variables to pass information about the user who executed the action link and the context in which it was invoked into the HTTP request made by invoking an action link. You can use context variables in the actionUrl, headers, and requestBody properties of the Action Link Definition Input request body or ConnectApi.ActionLinkDefinitionInput object. You can also use context variables in the Action URL, HTTP Request Body, and HTTP Headers fields of action link templates. You can edit these fields, including adding and removing context variables, after a template is published. These are the available context variables: Context Variable

Description

{!actionLinkId}

The ID of the action link the user executed.

{!actionLinkGroupId}

The ID of the action link group containing the action link the user executed.

{!communityId}

The ID of the community in which the user executed the action link. The value for your internal organization is the empty key "000000000000000000".

{!communityUrl}

The URL of the community in which the user executed the action link. The value for your internal organization is empty string "".

{!orgId}

The ID of the organization in which the user executed the action link.

{!userId}

The ID of the user that executed the action link.

For example, suppose you work for a company called Survey Example and you create an app for the Salesforce AppExchange called Survey Example for Salesforce. Company A has Survey Example for Salesforce installed. Let’s imagine that someone from company A goes to surveyexample.com and makes a survey. Your Survey Example code uses Chatter REST API to create a feed item in Company A’s Salesforce organization with the body text Take a survey, and an action link with the label OK. This UI action link takes the user from Salesforce to a web page on surveyexample.com to take a survey. If you include a {!userId} context variable in either the HTTP Request Body or the Action URL for that action link, when a user clicks the action link in the feed, Salesforce sends the ID of the user who clicked in the HTTP request it makes to your server. If you include an {!actionLinkId} context variable in the Survey Example server-side code that creates the action link, Salesforce sends an HTTP request with the ID of the action link and you can save that to your database. This example includes the {!userId} context variable in the Action URL in the action link template:

60

Chatter REST API Developer Guide

Action Links

Tip: Binding variables and context variables can be used in the same field. For example, this action URL contains a binding variable and a context variable: https://www.example.com/{!Bindings.apiVersion}/doSurvey?salesforceUserId={!userId}

61

Chatter REST API Developer Guide

Action Links

Create Action Link Templates Create action link templates in Setup so that you can instantiate action link groups with common properties from Chatter REST API or Apex. You can package templates and distribute them to other Salesforce organizations. Note: In addition to creating action link templates in Setup, you can also use Metadata API, SOAP API, and REST API to create action link templates. The Action URL, HTTP Request Body, and HTTP Headers fields support binding variables and context variables. Define binding variables in a template and set their values when you instantiate the action link group. Use context variables in a template and when an action link executes, Salesforce fills in the value and returns it in the request. For information about how to use these variables in a template, see Design Action Link Templates. 1. From Setup, enter Action Link Templates in the Quick Find box, then select Action Link Templates. 2. Click New. 3. Enter the Name of the template. This name is displayed in the list of action link group templates. This is the only action link group template value you can edit after the action link group template has been published.

EDITIONS Available in: Salesforce Classic and Lightning Experience Available in: All editions except Personal edition.

USER PERMISSIONS To create action link group templates: • Customize Application To create action link templates: • Customize Application

4. Enter the Developer Name. Use the Developer Name to refer to this template from code. It defaults to a version of the Developer Name without spaces. Only letters, numbers, and underscores are allowed. 5. Select the Category, which indicates where to display the instantiated action link groups on feed elements. Primary displays action link groups in the body of feed elements. Overflow displays action link groups in the overflow menu of feed elements. If an action link group template is Primary, it can contain up to three action link templates. If an action link group template is Overflow, it can contain up to four action link templates. 6. Select the number of Executions Allowed, which indicates how many times the action link groups instantiated from this template can be executed. (Action links within a group are mutually exclusive.) If you choose Unlimited, the action links in the group cannot be of type Api or ApiAsync. 7. (Optional) Enter the Hours until Expiration, which is the number of hours from when the action link group is created until it's removed from associated feed elements and can no longer be executed. The maximum value is 8760. See Set the Action Link Group Expiration Time. 8. Click Save. 9. Click New to create an action link template. The action link template is automatically associated with an action link group template in a master-detail relationship. 10. Select the Action Type. Values are: • Api—The action link calls a synchronous API at the action URL. Salesforce sets the status to SuccessfulStatus or FailedStatus based on the HTTP status code returned by your server. • ApiAsync—The action link calls an asynchronous API at the action URL. The action remains in a PendingStatus state until a third party makes a request to /connect/action-links/actionLinkId to set the status to SuccessfulStatus or FailedStatus when the asynchronous operation is complete. • Download—The action link downloads a file from the action URL. • Ui—The action link takes the user to a web page at the action URL.

62

Chatter REST API Developer Guide

Action Links

11. Enter an Action URL, which is the URL for the action link. For a UI action link, the URL is a Web page. For a Download action link, the URL is a link to a file to download. For an Api action link or an ApiAsync action link, the URL is a REST resource. Links to resources hosted on Salesforce servers can be relative, starting with a /. All other links must be absolute and start with https://. This field can contain binding variables in the form {!Bindings.key}, for example, https://www.example.com/{!Bindings.itemId}. Set the binding variable’s value when you instantiate the action link group from the template, as in this Chatter REST API example, which sets the value of itemId to 8675309. POST /connect/action-link-group-definitions { "templateId" : "07gD00000004C9r", "templateBindings" : [ { "key":"itemId", "value": "8675309" } ] }

This field can also contain context variables. Use context variables to pass information about the user who executed the action link to your server-side code. For example, this action link passes the user ID of the user who clicked on the action link to take a survey to the server hosting the survey. actionUrl=https://example.com/doSurvey?surveyId=1234&salesforceUserId={!userId}

12. Enter the HTTP Method to use to make the HTTP request. 13. (Optional) If the Action Type is Api or ApiAsync, enter an HTTP Request Body. This field can contain binding variables and context variables. 14. (Optional) If the Action Type is Api or ApiAsync, enter HTTP Headers. This field can contain binding variables and context variables. If an action link instantiated from the template makes a request to a Salesforce resource, the template must have a Content-Type header. 15. (Optional) To make this action link the default link in the group (which has special formatting in the UI), select Default Link in Group. There can be only one default link in a group. 16. (Optional) To display a confirmation dialog to the user before the action link executes, select Confirmation Required. 17. Enter the relative Position of the action link within action link groups instantiated from this template. The first position is 0. 18. Enter the Label Key. This value is the key for a set of UI labels to display for these statuses: NewStatus, PendingStatus, SuccessfulStatus, FailedStatus. For example, the Post set contains these labels: Post, Post Pending, Posted, Post Failed. This image shows an action link with the Post label key when the value of status is SuccessfulStatus:

63

Chatter REST API Developer Guide

Action Links

19. (Optional) If none of the Label Key values make sense for the action link, set Label Key to None and enter a value in the Label field. Action links have four statuses: NewStatus, PendingStatus, SuccessStatus, and FailedStatus. These strings are appended to the label for each status: • label • label Pending • label Success • label Failed For example, if the value of label is “See Example,” the values of the four action link states are: See Example, See Example Pending, See Example Success, and See Example Failed. An action link can use either a LabelKey or Label to generate label names, it can’t use both. 20. Select User Visibility, which indicates who can see the action link group. If you select Only creator’s manager can see, the manager is the creator’s manager when the action link group is instantiated. If the creator’s manager changes after the action link group is instantiated, that change is not reflected. 21. (Optional) If you selected Only Custom User Can See or Everyone Except Custom User Can See, enter a Custom User Alias. Enter a string and set its value when you instantiate an action link group, just like you would set the value for a binding variable. However don’t use the binding variable syntax in the template, just enter a value. For example, you could enter ExpenseApprover. This Chatter REST API example sets the value of ExpenseApprover to 005B0000000Ge16: POST /connect/action-link-group-definitions { "templateId" : "07gD00000004C9r",

64

Chatter REST API Developer Guide

Action Links

"templateBindings" : [ { "key":"ExpenseApprover", "value": "005B0000000Ge16" } ] }

22. To create another action link template for this action link group template, click Save & New. 23. If you’re done adding action link templates to this action link group template, click Save. 24. To publish the action link group template, click Back to List to return to the Action Link Group Template list view. Important: You must publish a template before you can instantiate an action link group from it in Apex or Chatter REST API. 25. Click Edit for the action link group template you want to publish. 26. Select Published and click Save.

Edit Action Link Templates You can edit all fields on an unpublished action link group template and on its associated action link templates.

EDITIONS

1. From Setup, enter Action Link Templates in the Quick Find box, then select Action Link Templates.

Available in: Salesforce Classic and Lightning Experience

2. To edit an action link group template, click Edit next to its name. If the group template isn’t published, edit any field. If it is published, edit the Name field only.

Available in: All editions except Personal edition.

3. To edit an action link template: a. Click the name of its master action link group template.

USER PERMISSIONS

b. Click the Action Link Template ID to open the detail page for the action link template. c. Click Edit. If the associated action link group template isn’t published, edit any field. If it’s published, edit any of these fields: • Action URL

To edit action link group templates: • Customize Application To edit action link templates: • Customize Application

• HTTP Request Body • HTTP Headers These fields support context variables and binding variables. You can add and delete context variables in any of these fields. You cannot add a new binding variable. You can: • Move a binding variable to another editable field in an action link template. • Use a binding variable more than once in an action link template. • Use a binding variable more than once in any action link templates associated with the same action link group template. • Remove binding variables.

65

Chatter REST API Developer Guide

Communities

Delete Action Link Group Templates When you delete an action link group template, you delete its associated action link templates and all action link groups that have been instantiated from the templates. Deleted action link groups disappear from any feed elements they've been associated with. 1. From Setup, enter Action Link Templates in the Quick Find box, then select Action Link Templates. 2. To delete an action link group template, click Del next to its name. Important: When you delete an action link group template, you delete its associated action link templates and all action link groups that have been instantiated from the template. The action link group is deleted from any feed elements it has been associated with, which means that action links disappear from those posts in the feed. 3. To delete an action link template: a. Click the name of its master action link group template. b. Click the Action Link Template ID to open the detail page for the action link template. c. Click Delete.

EDITIONS Available in: Salesforce Classic and Lightning Experience Available in: All editions except Personal edition.

USER PERMISSIONS To delete action link group templates: • Customize Application To delete action link templates: • Customize Application

Important: You can’t delete an action link template that’s associated with a published action link group template.

Package Action Link Templates Package action link templates to distribute them to other Salesforce organizations. When you add an action link group template, any associated action link templates are also added to the package. You can add an action link group template to a managed or unmanaged package. As a packageable component, action link group templates can also take advantage of all the features of managed packages, such as listing on the AppExchange, push upgrades, post-install Apex scripts, license management, and enhanced subscriber support. To create a managed package, you must use a Developer Edition organization.

EDITIONS Available in: Salesforce Classic and Lightning Experience Available in: All editions except Personal edition.

• See Creating and Editing a Package at https://help.salesforce.com.

USER PERMISSIONS

Communities Communities are branded spaces for your employees, customers, and partners to connect. You can customize and create communities to meet your business needs, then transition seamlessly between them.

To package action link templates: • Create AppExchange Package

You can request most Chatter REST API resources within a specific community. For example, you can make requests to feeds, files, groups, topics, and users resources within a specific community. If a resource is available in communities, its documentation includes a resource that starts with /connect/communities/communityId. Some Chatter REST API resources are available only within a community. These include resources for flagging and moderating content, using managed topics, and getting information about a user’s reputation. Resources that are available in communities are available whether you allow access without logging in or not. However, if your community allows access without logging in, guest users don’t have access to any Chatter REST API resources. The resources that are available only within a community are listed in this table.

66

Chatter REST API Developer Guide

Communities

Resource

HTTP Methods Tasks

/connect/communities

GET

Returns a list of all communities available to the context user.

/connect/communities/communityId

GET

Returns information about the specified community.

/connect/communities/communityId/ chatter/comments/commentId/ moderation-flags

GET, POST, DELETE

If the context user is a community moderator, get the number of times community members flagged a comment. Also flag a comment for moderation and delete all flags on a comment. If the context user isn’t a community moderator, returns whether the user flagged a comment. Also flag a comment for moderation and remove a flag the user previously added.

/connect/communities/communityId/ GET, POST, chatter/feed-elements/feedElementId/ DELETE capabilities/moderation

Get information about a feed element's moderation capability, add a moderation flag to a feed element, or delete all moderation flags from a feed element.

/connect/communities/communityId/ files/moderation

GET

If the context user is a community moderator, get the files that community members flagged.

/connect/communities/communityId/ files/fileId/moderation-flags

GET, POST, DELETE

If the context user is a community moderator, get the number of times community members flagged a file. Also flag a file for moderation and delete all flags on a file. If the context user isn’t a community moderator, get whether the user flagged a file. Also flag a file for moderation and remove a flag the user previously added.

/connect/communities/communityId/ GET chatter/feeds/moderation/feed-elements

If the context user is a community moderator with the Moderate Communities Feeds permission, returns a list of all feed elements and comments in the community that have been flagged by community members. By default, returns 25 feed elements per page of results.

/connect/communities/communityId/ chatter/feeds/home/feed-elements

GET

The feed containing feed elements and comments from the community home.

/connect/communities/communityId/ managed-topics

GET, POST, PATCH Get all the managed topics for a community. Create a managed topic, create managed topic hierarchies, and reorder managed topics.

/connect/communities/communityId/ managed-topics/managedTopicId

GET, DELETE

Get information about or delete a managed topic in a community.

/connect/communities/communityId/ trending-articles

GET

Get trending articles for a community.

/connect/communities/communityId/ topics/topicId/trending-articles

GET

Get trending articles for a topic in a community.

67

Chatter REST API Developer Guide

Feeds and Feed Elements

Resource

HTTP Methods Tasks

/connect/communities/communityId/ chatter/users/userId/reputation

GET

Returns the specified community user's reputation.

SEE ALSO: Build the Resource URL Make a Request in a Community

Feeds and Feed Elements In API versions 30.0 and earlier, a Chatter feed was a container of feed items. In API version 31.0, the definition of a feed expanded to include new objects that didn’t entirely fit the feed item model. The feed became a container of feed elements. In API version 32.0, feed elements can be either feed items or generic feed elements. Because feeds and feed elements are the core of Chatter, understanding them is crucial to developing applications with Chatter REST API. Note: Salesforce Help refers to feed items as posts.

Capabilities As part of the effort to diversify the feed, pieces of functionality found in feed elements have been broken out into capabilities. Capabilities provide a consistent way to interact with objects in the feed. Don’t inspect the feed element type to determine which functionality is available for a feed element. Inspect the capability object, which tells you explicitly what’s available. Check for the presence of a capability to determine what a client can do to a feed element. All feed elements have a capabilities property, which holds a Feed Element Capabilities response body. The Feed Element Capabilities response body can have one or more properties, each holding a capability of the feed element. A capability includes both an indication that a feature is possible and data associated with that feature. If a capability exists on a feed element, that capability is available, even if there isn’t any data associated with the capability yet. For example, if the chatterLikes capability property exists on a feed element (with or without any likes included in the list of likes found in the chatterLikes.page.items property), the context user can like that feed element. If the capability property doesn’t exist on a feed element, it isn’t possible to like that feed element.

How the Salesforce UI Displays Feed Items As we learned in Capabilities, a client should use the capabilities property to determine what it can do with a feed element and how it should render a feed element. For all feed elements other than feed item, the client doesn’t need to know what type feed element it is, the client can simply look at the capabilities. Feed items do have capabilities, but they also have a few properties, such as actor, that aren’t exposed as capabilities. For this reason, feed items must be handled a bit differently than other feed elements. To give customers a consistent view of feed items and to give developers an easy way to create UI, the Salesforce UI uses one layout to display every feed item. The layout always contains the same pieces and the pieces are always in the same position; only the content of the layout pieces changes.

68

Chatter REST API Developer Guide

Feeds and Feed Elements

The feed item layout elements are: 1. Actor (actor property of Feed Item response body)—A photo or icon of the creator of the feed item. 2. Header (header property of Feed Item response body)—Provides context. The same feed item can have a different header depending on who posted it and where. For example, Gordon posted this feed item to his profile. If he shared it to a group, the header of the feed item in the group feed would be “Gordon Johnson (originally posted by Gordon Johnson)”. The “originally posted” text would link to the feed item on Gordon’s profile. 3. Body (body property of Feed Item response body)—All feed items have a body, but the body can be null, which is the case when the user doesn’t provide text for the feed item. Because the body can be null, you can’t use it as the default case for rendering text. Instead, use the text property of the feed item’s header, which always contains a value. 4. Auxiliary Body (capabilities property of Feed Item response body)—The visualization of the capabilities of a feed item. See Capabilities. Important: The attachment property is not supported in API versions 32.0 and later. Instead, use the capabilities property, which holds a Feed Element Capabilities response body, to discover what to render for a feed element. 5. Created By Timestamp (relativeCreatedDate property of Feed Item response body)—The date and time when the feed item was posted. If the feed item is less than two days old, the date and time are formatted as a relative, localized string, for example, “17m ago” or “Yesterday”. Otherwise, the date and time are formatted as an absolute, localized string. Here’s another example of a feed item in the Salesforce UI. This feed item’s auxiliary body contains a poll capability:

How the Salesforce UI Displays Bundles Note: Bundled posts contain feed-tracked changes. In Salesforce for Android and Salesforce for iOS, bundled posts are in record feeds only.

69

Chatter REST API Developer Guide

Feeds and Feed Elements

As we learned in the Capabilities section, a client should use the ConnectApi.FeedElement.capabilities property to determine what it can do with a feed element and how to render a feed element. This section uses bundles as an example of how to render a feed element, but these properties are available for every feed element. To give customers a clean, organized feed, feed-tracked change feed items can be aggregated into a bundle. To see individual feed items, click the bundle.

A bundle is a generic feed element with a bundle capability. Bundle layout elements include: 1. Header (header property of the Generic Feed Element response body)—For feed-tracked change bundles, this text is “This record was updated.” The time below the header is the relativeCreatedDate property of the Generic Feed Element response body. 2. Auxiliary Body (capabilities.bundle.changes property of the Generic Feed Element response body)—The bundle displays the fieldName and the oldValue and newValue properties for the first two feed-tracked changes in the bundle. If there are more than two feed-tracked changes, the bundle displays a “Show All Updates” link.

Feed Element Visibility The feed elements a user sees depend on how the administrator has configured feed tracking, sharing rules, and field-level security. For example, if a user doesn’t have access to a record, they don’t see updates for that record. If a user can see the parent of the feed element, the user can see the feed element. Typically, a user sees feed updates for: • Feed elements that @mention the user (if the user can access the feed element’s parent) • Feed elements that @mention groups the user is a member of • Record field changes on records whose parent is a record the user can see, including User, Group, and File records • Feed elements posted to the user • Feed elements posted to groups the user owns or is a member of • Feed elements for standard and custom records, for example, tasks, events, leads, accounts, files

70

Chatter REST API Developer Guide

Feeds and Feed Elements

Feed Types There are many types of feeds. Each feed type is an algorithm that defines a collection of feed elements. Important: The algorithms, and therefore the collection of feed elements, can change between releases. The feed types are exposed in the resources: /chatter/feeds/feedType /chatter/feeds/feedType/subjectId

For example, the resources for a news feed and a topics feed are: /chatter/feeds/news/subjectId /chatter/feeds/topics/subjectId

The feed types and their descriptions: • Bookmarks—Contains all feed items saved as bookmarks by the context user. • Company—Contains all feed items except feed items of type TrackedChange. To see the feed item, the user must have sharing access to its parent. • DirectMessageModeration—Contains all direct messages that are flagged for moderation. The Direct Message Moderation feed is available only to users with Moderate Communities Chatter Messages permissions. • DirectMessages—Contains all feed items of the context user’s direct messages. • Files—Contains all feed items that contain files posted by people or groups that the context user follows. • Filter—Contains the news feed filtered to contain feed items whose parent is a specified object type. • Groups—Contains all feed items from all groups the context user either owns or is a member of. • Home—Contains all feed items associated with any managed topic in a community. • Landing—Contains all feed items that best drive user engagement when the feed is requested. Allows clients to avoid an empty feed when there aren’t many personalized feed items. • Moderation—Contains all feed items that are flagged for moderation, except direct messages. The Communities Moderation feed is available only to users with Moderate Community Feeds permissions. • Mute—Contains all feed items that the context user muted. • News—Contains all updates for people the context user follows, groups the user is a member of, and files and records the user is following. Also contains all updates for records whose parent is the context user and every feed item and comment that mentions the context user or that mentions a group the context user is a member of. • PendingReview—Contains all feed items and comments that are pending review. • People—Contains all feed items posted by all people the context user follows. • Record—Contains all feed items whose parent is a specified record, which could be a group, user, object, file, or any other standard or custom object. When the record is a group, the feed also contains feed items that mention the group. When the record is a user, the feed contains only feed items on that user. You can get another user’s record feed. • Streams—Contains all feed items for any combination of up to 25 feed-enabled entities, such as people, groups, and records, that the context user subscribes to in a stream. • To—Contains all feed items with mentions of the context user, feed items the context user commented on, and feed items created by the context user that are commented on. • Topics—Contains all feed items that include the specified topic.

71

Chatter REST API Developer Guide

Feeds and Feed Elements

• UserProfile—Contains feed items created when a user changes records that can be tracked in a feed, feed items whose parent is the user, and feed items that @mention the user. This feed is different than the news feed, which returns more feed items, including group updates. You can get another user’s user profile feed. • Favorites—Contains favorites saved by the context user. Favorites are feed searches, list views, and topics. • Filter—Contains the news feed filtered to contain items whose parent is a specified entity type.

Post a Feed Item Using /chatter/feed-elements Tip: The /chatter/feed-elements resource is the simplest, most efficient way to post feed items because it doesn’t require you to pass a feed type. As of API version 31.0, feed items are the only feed element type you can post. To future-proof your application, use this resource because there may be other feed element types in the future. Use this resource to post feed items: POST /chatter/feed-elements

When you post a feed item, you create a child of a standard or custom object. Specify the parent object in the subjectId request parameter or in the subjectId property of the Feed Item Input request body. The parent property of the posted feed item contains information about the parent object. Post to your user profile This example uses request parameters to post a text post to the context user’s user profile: POST /chatter/feed-elements?feedElementType=FeedItem&subjectId=me&text=Test

The subjectId, specifies the alias me. You can also specify the user ID of the context user. The parent property of the newly posted feed item contains the User Summary response body of the context user. Post to another user This example uses a request body to post to another user. The subjectId property specifies that user’s ID. POST /chatter/feed-elements { "feedElementType":"FeedItem", "subjectId":"005RR000000DmOg", "body" : { "messageSegments" : [ { "type" : "Text", "text" : "When should we meet for release planning?" } ] } }

The parent property of the newly posted feed item contains the User Summary response body of the target user. Post to a group This example uses a request body to post to a group. The subjectId property specifies the group ID. POST /chatter/feed-elements { "feedElementType":"FeedItem",

72

Chatter REST API Developer Guide

Feeds and Feed Elements

"subjectId":"0F9RR0000004CPw", "body" : { "messageSegments" : [ { "type" : "Text", "text" : "When should we meet for release planning?" } ] } }

The parent property of the newly posted feed item contains the Group response body of the specified group. Post to a record (such as a file or an account) This example uses a request body to mention a user on a record feed. The subjectId property specifies the record ID. POST /chatter/feed-elements { "feedElementType" : "FeedItem", "subjectId" : "001RR000002G4Y0", "body" : { "messageSegments" : [ { "type" : "Mention", "id" : "005RR000000DmOg" }, { "type" : "Text", "text" : " Have you checked on this account recently?" } ] } }

The parent property of the new feed item depends on the record type specified. If the record type is File, the parent is the File Summary response body. If the record type is Group, the parent is a Group response body. If the record type is User, the parent is a User Summary response body. For all other record types, the parent is a Record Summary response body.

Get Feed Elements from a Feed Tip: To return a feed that includes feed elements, call these methods. As of API version 31.0, the only feed element types are feed item and bundle, but that could change in the future. Getting feed elements from a feed is similar, but not identical, for each feed type. To get the feed elements from the company feed, the home feed, or the moderation feed, don’t specify a subject ID: Feed Type

Resource

Company

/chatter/feeds/company/feed-elements

Home

/connect/communities/communityId/chatter/feeds/home/feed-elements

Moderation

/connect/communities/communityId /chatter/feeds/moderation/feed-elements

73

Chatter REST API Developer Guide

Salesforce Files

To get the feed elements from the favorites and filter feeds, specify a favoriteId or a keyPrefix. The keyPrefix indicates the object type and is the first three characters of the object ID. For these feeds, the subjectId must be the ID of the context user or the alias me. Feed Type

Resource

Favorites

/chatter/feeds/favorites/subjectId/favoriteId/feed-elements

Filter

/chatter/feeds/filter/subjectId/keyPrefix/feed-elements

To get the feed elements from a record feed, specify a record ID. Feed Type

Resource

Record

/chatter/feeds/record/recordId/feed-elements

Tip: The recordId can be a record of any type that supports feeds, including group. The feed on the group page in the Salesforce UI is a record feed. To get the feed elements from all other feed types, specify a subject ID. Replace the feedType to specify a different feed. For all the feed types in this table except the user profile feed and the topics feed, the subjectId must be the ID of the context user or the alias me. Feed Type

Resource

Bookmarks, Files, Groups, Mute, /chatter/feeds/feedType/subjectId/feed-elements News, People, To, Topics, User For example: /chatter/feeds/news/me/feed-elements Profile

SEE ALSO: Feeds Resource

Salesforce Files Use Chatter REST API to work with Salesforce Files, which includes Salesforce Files Sync. Use Salesforce Files to upload, store, find, follow, share, and collaborate on files in the cloud. Use Salesforce Files Sync to securely store, sync, and share files between Chatter, the desktop, and mobile devices. Access files and folders from anywhere, and keep them instantly updated across your organization. Resource

HTTP Methods Tasks

/chatter/feed-elements

GET, POST

/chatter/feeds/files/me/feed-elements GET

Post feed elements and search all feed elements in an organization. Returns all feed elements posted with files by people or groups that the context user follows.

74

Chatter REST API Developer Guide

Resource

Salesforce Files

HTTP Methods Tasks

/chatter/feeds/news/me/feed-elements GET

All feed elements from all groups the context user either owns or is a member of, as well as all files, records, and users the context user follows. Use this resource to get information about feed elements and to post feed elements.

/chatter/feeds/record/ recordId/feed-elements

GET

Returns the feed elements for all the records the context user is following, or all the feed elements of the specified recordId. Use this resource to search a feed or to get the feed elements for a specific feed, including another user’s feed. To use this resource to get the feed elements for a group, specify the group ID as the recordId.

/chatter/feeds/user-profile/ userId/feed-elements

GET

Returns feed elements created when a user changes records that can be tracked in a feed, feed elements whose parent is the user, and feed elements that mention the user. This feed is different than the news feed, which returns more feed items, including group updates. You can post feed items to the user-profile feed. You can get another user’s user profile feed.

/connect/files/fileId

GET, POST, PATCH, DELETE

Get information about a specified file, including references to external files. Upload a new version of an existing file, including references to external files. Rename a file, move a file to a different folder, and delete a file.

/connect/files/fileId/content

GET

Returns the content of the file, including references to external files. The content is streamed as the body of the response.

/connect/files/fileId/file-shares

GET, POST

Returns information about the objects with which the specified file has been shared. Objects can be users, groups, or records. Can also be used to share the specified file with users.

/connect/files/fileId/file-shares/link GET, PUT, DELETE A description of a file shared as a link. Create, access, and

delete a file’s share link. /connect/files/fileId/previews

GET, PATCH

Get information about a file's supported previews and generate a file preview.

/connect/files/fileId/previews/ previewFormat

GET

Get a file preview or a specific page in a preview.

/connect/files/fileId/rendition

GET

A rendition of the file. A rendition is a binary preview of the file. The format of the binary depends on the format specified in the request.

/connect/files/batch/fileIds

GET, DELETE

Information about a list of files, specified by file IDs. Get information about a list of files and delete a list of files.

75

Chatter REST API Developer Guide

Chatter REST API Examples

Resource

HTTP Methods Tasks

/connect/folders/folderId

GET, PATCH, DELETE

Get information about the specified folder. Move, rename, and delete a folder. Sync the root folder.

/connect/folders/folderId/items

GET, POST

Get information about the contents of a folder. Add a file to a folder and create a folder. Sync the root folder.

/chatter/groups/groupId/files

GET

Returns information about the files posted to the specified group.

/connect/topics/topicId/files

GET

Returns information about the five files most recently posted to the specified topic.

/connect/files/users/userId

GET, POST

Upload a file, including references to external files, to the Files home or get information about files a user owns. These files don’t include files shared with a user, files a user follows, or general organization files.

/connect/files/users/me/filter/groups GET

Returns information about files posted to groups that the specified user is a member of.

/connect/files/users/me/filter/shared-with-me GET

Returns information about files that have been shared with the specified user.

Note: You can replace the alias me with the user ID of the context user.

Chatter REST API Examples Use Chatter REST API examples to perform tasks. While using the Chatter REST API, keep this in mind: • Request parameters may be included as part of the Chatter REST API resource URL, for example, /chatter/users?q=searchtext. A request body is a rich input which may be included as part of the request. When accessing a resource, you can use either a request body or request parameters. You cannot use both. • With a request body, use Content-Type: application/json or Content-Type: application/xml. • With request parameters, use Content-Type: application/x-www-form-urlencoded. For more information on request bodies, see Using POST, PATCH, or PUT for Input. For examples of how to upload a binary file, see Uploading Binary Files. IN THIS SECTION: Filter a Response Body Make a Request in a Community Get My News Feed Get Another User’s Feed Get a Group Feed

76

Chatter REST API Developer Guide

Chatter REST API Examples

Post a Feed Item Post a Feed Element and Include Files from Salesforce Post a Rich-Text Feed Element Post a Feed Element with a Code Block Post a Feed Element with an Inline Image Post a Comment Post a Comment and Include a File from Salesforce Post a Rich-Text Comment Post a Comment with a Code Block Post a Comment with an Inline Image Post a Binary File Post an @Mention Post Multiple @Mentions Get a List of @Mention Proposals Define Action Links and Post with a Feed Element Define Action Links in a Template and Post with a Feed Element Update the Status of an Action Link or Invoke an Action Link Edit a Feed Post Edit a Comment Edit a Question Title and Post Like a Feed Item Like a Feed Item and Return the Total Number of Likes Share a Feed Item Get Feed Elements Updated Since Last Request Get a Feed with Internal Feed Items Only Search a Feed Get a List of Records a User Follows Get Chatter Activity Statistics for a User Get Recommendations of Users to Follow Create and Schedule Custom Recommendations with Audiences Create a Group Update and Crop a Group Photo Join a Group Request to Join a Private Group Approve or Reject a Request to Join a Private Group Post to a Group Follow a Record

77

Chatter REST API Developer Guide

Filter a Response Body

Stop Following a Record Get a Record Feed Update a User Profile Update and Crop a User Photo Send a Private Message Get User Information for Multiple Users Create a Topic Hierarchy in Communities

Filter a Response Body Resource All HTTP method GET Request parameters exclude, include, and filterGroup Use the exclude and include query parameters to filter a response body when making a request. The query value is a bar (|) delimited list of properties. URL encode the bar as %7C. Use a forward slash (/) before each property name. Use the filterGroup query parameter to specify whether to return a Big, Medium, or Small response body. Every property in every response body is assigned one of these group sizes. Request parameter example This News Feed URL resource: /chatter/users/me?include=/aboutMe%7C/address

For a detailed list of rules and examples, see Specify Response Sizes. Returns A filtered response body The request parameter example above returns this for the Feed response body: { "aboutMe": "Salesforce Administrator and Citizen Developer", "address": { "city": "San Francisco", "country": "US", "formattedAddress": "1 Market St\nSan Francisco, CA 94105\nUS", "state": "CA", "street": "1 Market St", "zip": "94105" } }

Make a Request in a Community Resource A resource supports communities unless the documentation states that it doesn’t.

78

Chatter REST API Developer Guide

Get My News Feed

HTTP method Various Example To make a request to a specific community, prefix the resource with /connect/communities/communityId. For example, this resource gets the feed items from a news feed in a specific community: /connect/communities/communityId/chatter/feeds/news/me/feed-elements

For more information, see Build the Resource URL and Connect to Salesforce Communities. Returns Various

Get My News Feed Resource /chatter/feeds/news/me/feed-elements

HTTP method GET Example /services/data/v41.0/chatter/feeds/news/me/feed-elements

Returns Feed Element Page

Get Another User’s Feed Resource /chatter/feeds/user-profile/userId/feed-elements

or /chatter/feeds/record/userId/feed-elements

HTTP method GET Example /services/data/v41.0/chatter/feeds/user-profile/005R0000000HwMA/feed-elements

or /services/data/v41.0/chatter/feeds/record/005R0000000HwMA/feed-elements

Returns Feed Element Page

Get a Group Feed Resource /chatter/feeds/record/recordId/feed-elements

Substitute recordId with the group ID.

79

Chatter REST API Developer Guide

Post a Feed Item

HTTP method GET Example /services/data/v41.0/chatter/feeds/record/0F9D00000000I4O/feed-elements

Returns Feed Element Page

Post a Feed Item Resource /chatter/feed-elements

HTTP method POST Request body Feed Item Input This Feed Item Input request body includes a body property that is a Message Body Input request body. In this example, the Message Body Input request body includes a messageSegments property that has one Message Segment Input: Text request body and one Message Segment Input: Mention request body. Request body example In the subjectId, specify the user, group, or record that will parent the feed item. { "body" : { "messageSegments" : [ { "type" : "Text", "text" : "When should we meet for release planning? " }, { "type" : "Mention", "id" : "005D00000016Qxp" }] }, "feedElementType" : "FeedItem", "subjectId" : "0F9B000000000W2" }

Request parameters feedElementType, subjectId, text

Request parameter example /services/data/v41.0/chatter/feed-elements?feedElementType=FeedItem&subjectId=0F9B000000000W2&text=New+post

Returns Feed Item

80

Chatter REST API Developer Guide

Post a Feed Element and Include Files from Salesforce

Post a Feed Element and Include Files from Salesforce This example posts a feed element with more than one file, all of which have been uploaded to Salesforce. Important: In version 36.0 and later, you can’t create a feed post and upload a binary file in the same request. Upload files to Salesforce first, and then use the file IDs to attach one or more files to a feed post. Resource /chatter/feed-elements

HTTP method POST Request body Feed Item Input This Feed Item Input request body includes a body property that is a Message Body Input request body. In this example, the Message Body Input request body includes a messageSegments property that has one Message Segment Input: Text request body. This Feed Item Input request body also includes a capabilities property that is a Feed Element Capabilities Input request body. In this example, the Feed Element Capabilities Input includes a files property that is a Files Capability Input request body. The Files Capability Input request body includes an items property that is a collection of File ID Input request bodies. Request body example { "body":{ "messageSegments":[ { "type":"Text", "text":"Please take a look at these files." } ] }, "capabilities":{ "files":{ "items": [ {"id": "069D00000001IOh"}, {"id": "069D00000002IOg"} ] } }, "subjectId":"me", "feedElementType":"FeedItem" }

Returns Feed Item

Post a Rich-Text Feed Element This example posts a feed element that includes two paragraphs, one in bold, and an extra line break between them. Resource /chatter/feed-elements

81

Chatter REST API Developer Guide

Post a Rich-Text Feed Element

HTTP method POST Request body Feed Item Input This Feed Item Input request body includes a body property that is a Message Body Input request body. In this example, the Message Body Input request body includes a messageSegments property that has three Message Segment Input: Text request bodies, four Message Segment Input: Markup Begin request bodies, and four Message Segment Input: Markup End request bodies. Request body example { "body":{ "messageSegments":[ { "markupType" : "Paragraph", "type" : "MarkupBegin" }, { "markupType" : "Bold", "type" : "MarkupBegin" }, { "text" : "First line of text.", "type" : "Text" }, { "markupType" : "Bold", "type" : "MarkupEnd" }, { "markupType" : "Paragraph", "type" : "MarkupEnd" }, { "markupType" : "Paragraph", "type" : "MarkupBegin" }, { "text" : " ", "type" : "Text" }, { "markupType" : "Paragraph", "type" : "MarkupEnd" }, { "markupType" : "Paragraph", "type" : "MarkupBegin" }, { "text" : "Second line of text.", "type" : "Text" },

82

Chatter REST API Developer Guide

Post a Feed Element with a Code Block

{ "markupType" : "Paragraph", "type" : "MarkupEnd" } ] }, "subjectId":"me", "feedElementType":"FeedItem" }

Returns Feed Item

Post a Feed Element with a Code Block This example posts a feed element that includes a code block. Resource /chatter/feed-elements

HTTP method POST Request body Feed Item Input This Feed Item Input request body includes a body property that is a Message Body Input request body. In this example, the Message Body Input request body includes a messageSegments property that has one Message Segment Input: Markup Begin request body, one Message Segment Input: Text request body, and one Message Segment Input: Markup End request body. Request body example { "body":{ "messageSegments":[ { "markupType" : "Code", "type" : "MarkupBegin" }, { "text" : "var i, t = 0;\nfor (i = 0; i < 5; i++) {\n i;\n}\n", "type" : "Text" }, { "markupType" : "Code", "type" : "MarkupEnd" } ] }, "subjectId":"me", "feedElementType":"FeedItem" }

Returns Feed Item

83

t +=

Chatter REST API Developer Guide

Post a Feed Element with an Inline Image

Post a Feed Element with an Inline Image This example posts a feed element with an inline image that has been uploaded to Salesforce. To upload a new file, see Uploading Binary Files. Resource /chatter/feed-elements

HTTP method POST Request body Feed Item Input This Feed Item Input request body includes a body property that is a Message Body Input request body. In this example, the Message Body Input request body includes a messageSegments property that has two Message Segment Input: Text request bodies and two Message Segment Input: Inline Image request bodies. Request body example { "body":{ "messageSegments":[ { "type":"Text", "text":"Please take a look at this file." }, { "type":"InlineImage", "fileId":"069xx00000000QO", "altText":"API Spec" }, { "type":"Text", "text":"And this one." }, { "type":"InlineImage", "fileId":"069xx00000000QT", "altText":"REST API Spec" } ] }, "subjectId":"me", "feedElementType":"FeedItem" }

Returns Feed Item

Post a Comment Resource /chatter/feed-elements/feedElementId/capabilities/comments/items

84

Chatter REST API Developer Guide

Post a Comment and Include a File from Salesforce

HTTP method POST Request body Comment Input This Comment Input request body includes a body property that is a Message Body Input request body. In this example, the Message Body Input request body includes a messageSegments property that has one Message Segment Input: Text request body. Request parameter text

Request body example { "body":{ "messageSegments":[ { "type":"Text", "text":"New comment" } ] } }

Request parameter example /services/data/v41.0/chatter/feed-elements/feedElementId/capabilities/comments/items?text=New+comment

Returns Comment

Post a Comment and Include a File from Salesforce This example posts a comment with a file that has already been uploaded to Salesforce. To upload a new file, see Uploading Binary Files. Resource /chatter/feed-elements/feedElementId/capabilities/comments/items

HTTP method POST Request body Comment Input This Comment Input request body includes a body property that is a Message Body Input request body. In this example, the Message Body Input request body includes a messageSegments property that has one Message Segment Input: Text request body. This Comment Input request body also includes a capabilities property that is a Comment Capabilities Input request body. In this example, the Comment Capabilities Input includes a content property that is a Content Capability Input request body. Request parameter text

85

Chatter REST API Developer Guide

Post a Rich-Text Comment

Request body example { "body":{ "messageSegments":[ { "type":"Text", "text":"Please take a look at this file." } ] }, "capabilities":{ "content":{ "contentDocumentId":"069D00000001pyS" } } }

Returns Comment

Post a Rich-Text Comment This example posts a comment that includes two paragraphs, one in bold, and an extra line break between them. Resource /chatter/feed-elements/feedElementId/capabilities/comments/items

HTTP method POST Request body Comment Input This Comment Input request body includes a body property that is a Message Body Input request body. In this example, the Message Body Input request body includes a messageSegments property that has three Message Segment Input: Text request bodies, four Message Segment Input: Markup Begin request bodies, and four Message Segment Input: Markup End request bodies. Request body example { "body":{ "messageSegments":[ { "markupType" : "Paragraph", "type" : "MarkupBegin" }, { "markupType" : "Bold", "type" : "MarkupBegin" }, { "text" : "First line of text.", "type" : "Text" }, {

86

Chatter REST API Developer Guide

Post a Comment with a Code Block

"markupType" : "Bold", "type" : "MarkupEnd" }, { "markupType" : "Paragraph", "type" : "MarkupEnd" }, { "markupType" : "Paragraph", "type" : "MarkupBegin" }, { "text" : " ", "type" : "Text" }, { "markupType" : "Paragraph", "type" : "MarkupEnd" }, { "markupType" : "Paragraph", "type" : "MarkupBegin" }, { "text" : "Second line of text.", "type" : "Text" }, { "markupType" : "Paragraph", "type" : "MarkupEnd" } ] } }

Returns Comment

Post a Comment with a Code Block This example posts a feed element that includes a code block. Resource /chatter/feed-elements/feedElementId/capabilities/comments/items

HTTP method POST Request body Comment Input This Comment Input request body includes a body property that is a Message Body Input request body. In this example, the Message Body Input request body includes a messageSegments property that has one Message Segment Input: Markup Begin request body, one Message Segment Input: Text request body, and one Message Segment Input: Markup End request body.

87

Chatter REST API Developer Guide

Post a Comment with an Inline Image

Request body example { "body":{ "messageSegments":[ { "markupType" : "Code", "type" : "MarkupBegin" }, { "text" : "var i, t = 0;\nfor (i = 0; i < 5; i++) {\n i;\n}\n", "type" : "Text" }, { "markupType" : "Code", "type" : "MarkupEnd" } ] }

t +=

}

Returns Comment

Post a Comment with an Inline Image This example posts a comment with an inline image that has been uploaded to Salesforce. To upload a new file, see Uploading Binary Files. Resource /chatter/feed-elements/feedElementId/capabilities/comments/items

HTTP method POST Request body Comment Input This Comment Input request body includes a body property that is a Message Body Input request body. In this example, the Message Body Input request body includes a messageSegments property that has two Message Segment Input: Text request bodies and two Message Segment Input: Inline Image request bodies. Request body example { "body":{ "messageSegments":[ { "type":"Text", "text":"Please take a look at this file." }, { "type":"InlineImage", "fileId":"069xx00000000QO", "altText":"API Spec"

88

Chatter REST API Developer Guide

Post a Binary File

}, { "type":"Text", "text":"And this one." }, { "type":"InlineImage", "fileId":"069xx00000000QT", "altText":"REST API Spec" } ] } }

Returns Comment

Post a Binary File For detailed information about uploading and posting binary files, see Inputs and Binary File Upload Examples, which includes examples for: • Post a comment with a binary file • Post a batch of comments with binary files • Upload and crop a user photo • Upload a binary file to the Files home • Upload a file to an external repository Important: In version 36.0 and later, you can’t create a feed post and upload a binary file in the same request. Upload files to Salesforce first, and then use the file IDs to attach one or more files to a feed post. • Post a feed element with a binary file (version 35.0 and earlier) • Post a batch of feed elements with binary files (version 35.0 and earlier)

Post an @Mention Resource To post a feed item with a mention, use /chatter/feed-elements. To post a comment with a mention, use /chatter/feed-elements/feedElementId/capabilities/comments/items.

HTTP method POST Request body For a feed item, use Feed Item Input For a comment, use Comment Input Both of these input request bodies include a body property that is a Message Body Input request body. In these examples, the Message Body Input request body includes a messageSegments property that has one Message Segment Input: Text request body and one Message Segment Input: Mention request body.

89

Chatter REST API Developer Guide

Post Multiple @Mentions

Request body example This example is for a feed item: { "body" : { "messageSegments" : [ { "type" : "Text", "text" : "When should we meet for release planning? " }, { "type" : "Mention", "id" : "005T0000000mzCy" } ] }, "feedElementType" : "FeedItem", "subjectId" : "005D00000016Qxp" }

This example is for a comment: { "body" : { "messageSegments" : [ { "type": "mention", "id" : "005D0000001GpHp" }, { "type": "text", "text" : " Did you see the new plans?" } ] } }

Note: Include a space in the text message segment because spaces aren’t added automatically before or after a mention. Returns Feed Item Comment

Post Multiple @Mentions Resource To post a feed item with up to 25 mentions, use /chatter/feed-elements. To post a comment with up to 25 mentions, use /chatter/feed-elements/feedElementId/capabilities/comments/items.

HTTP method POST

90

Chatter REST API Developer Guide

Post Multiple @Mentions

Request body For a feed item, use Feed Item Input For a comment, use Comment Input Both of these input request bodies include a body property that is a Message Body Input request body. In these examples, the Message Body Input request body includes a messageSegments property that has two Message Segment Input: Text request bodies and two Message Segment Input: Mention request bodies. Request body example This example is for a feed item: { "body" : { "messageSegments" : [ { "type" : "Text", "text" : "When should we meet for release planning? " }, { "type" : "Mention", "id" : "005T0000000mzCy" }, { "type" : "Text", "text" : " " }, { "type" : "Mention", "id" : "005B0000000Ek1S" } ] }, "feedElementType" : "FeedItem", "subjectId" : "005D00000016Qxp" }

This example is for a comment: { "body" : { "messageSegments" : [ { "type": "mention", "id":"005D0000001LL8YIAW" }, { "type" : "Text", "text" : " " }, { "type": "mention", "id":"005D0000001LL8sIAG" }, { "type": "text",

91

Chatter REST API Developer Guide

Get a List of @Mention Proposals

"text":" Did you see the new plans?" } ] } }

Note: Include spaces where you need them because spaces aren’t added automatically before or after a mention. Returns Feed Item Comment

Get a List of @Mention Proposals Resource Use the Mentions Completions resource to get a list of mention proposals: /chatter/mentions/completions. Use the Mentions Validations resource to determine which of those proposals are valid for the context user: /chatter/mentions/validations. HTTP method GET Request parameters contextId, page, pageSize, q, type Returns Mention Completion Page Mention Validations

Define Action Links and Post with a Feed Element Step 1: Define the Action Link Group Just like radio buttons, action links must be nested in a group. Action links within a group share the properties of the group and are mutually exclusive (you can click only one action link within a group). Even if you define only one action link, it must be part of an action link group. Think of an action link as a button on a feed item. Like a button, an action link includes a label (labelKey). An action link definition also includes other properties like a URL (actionUrl), an HTTP method (method), and an optional request body (requestBody) and HTTP headers (headers). When a user clicks this action link, an HTTP POST request is made to a Chatter REST API resource, which posts a feed item to Chatter. The requestBody property holds the request body for the actionUrl resource, including the text of the new feed item. In this example, the new feed item includes only text, but it could include other capabilities such as a file attachment, a poll, or even action links. Resource /connect/action-link-group-definitions

HTTP method POST

92

Chatter REST API Developer Guide

Define Action Links and Post with a Feed Element

Request body Action Link Group Definition Input This request body includes an actionLinks property that holds a collection of Action Link Definition Input request bodies. This example has one action link. Request body example POST /services/data/v41.0/connect/action-link-group-definitions { "executionsAllowed":"OncePerUser", "expirationDate":"2015-05-20T19:32:10+0000", "category":"Primary", "actionLinks":[ { "actionType":"Api", "actionUrl":"/services/data/v41.0/chatter/feed-elements", "labelKey":"Post", "method":"HttpPost", "requiresConfirmation":"false", "requestBody":"{\"subjectId\": \"me\",\"feedElementType\": \"FeedItem\",\"body\": {\"messageSegments\": [{\"type\": \"Text\",\"text\": \"This post was created via an API action link.\"}]}}", "headers":[ { "name":"Content-Type", "value":"application/json" }, { "name":"Authorization", "value":"OAuth 00DD00000007WNP!ARsAQHhIdgwbihG7e8ga" } ] } ] }

Request example using cURL To use cURL to make the request, enter the following and substitute your Developer Edition instance name, and OAuth information. curl -H "X-PrettyPrint: 1" -H "Content-Type: application/json" -d '{ "executionsAllowed":"OncePerUser", "expirationDate":"2015-09-20T19:32:10+0000", "category":"Primary", "actionLinks":[ { "actionType":"Api", "actionUrl":"/services/data/v41.0/chatter/feed-elements", "groupDefault":"true", "labelKey":"Post", "method":"HttpPost", "requiresConfirmation":"true", "requestBody":"{\"subjectId\": \"me\",\"feedElementType\": \"FeedItem\",\"body\": {\"messageSegments\": [{\"type\": \"Text\",\"text\": \"This is a test post created via an API action link.\"}]}}", "headers":[ { "name":"Content-Type", "value":"application/json" }, { "name":"Authorization", "value":"OAuth 00DD00000007WNP!ARsAQHhIdgwbihG7e8ga" }] }] }' -X POST "https://instance_name/services/data/v41.0/connect/action-link-group-definitions"

93

Chatter REST API Developer Guide

Define Action Links and Post with a Feed Element

-H 'Authorization: OAuth 00DRR0000000N0g!RWaPj94O6yOD.lfjB9LqMk' --insecure

Response body Action Link Group Definition

Step 2: Associate the Action Link Group with a Feed Item and Post It You can associate up to 10 action link groups with a feed element. Resource /chatter/feed-elements

HTTP method POST Request body Feed Item Input This Feed Item Input request body includes a body property that is a Message Body Input request body. In this example, the Message Body Input request body includes a messageSegments property that has one Message Segment Input: Text request body. This Feed Item Input request body also includes a capabilities property that is a Feed Element Capabilities Input request body. In this example, the Feed Element Capabilities Input includes an associatedActions property that is a Associated Actions Capability Input request body. Request body example Grab the action link group ID from the id property of the Action Link Group Definition response from step 1. POST /services/data/v41.0/chatter/feed-elements { "body": { "messageSegments": [ { "type": "Text", "text": "Click to post a feed item." } ] }, "subjectId": "me", "feedElementType": "feedItem", "capabilities": { "associatedActions": { "actionLinkGroupIds": ["0AgRR0000004CTr0AM"] } } }

Request example using cURL To use cURL to make the request, enter the following and substitute the action link group ID returned in step 1, your Developer Edition instance name, and your OAuth information. curl -H "X-PrettyPrint: 1" -H "Content-Type: application/json" -d '{ "body": { "messageSegments":

94

Chatter REST API Developer Guide

Define Action Links in a Template and Post with a Feed Element

[ { "type": "Text", "text": "Click to post a feed item." } ] }, "subjectId": "me", "feedElementType": "feedItem", "capabilities": { "associatedActions": { "actionLinkGroupIds": ["0AgRR0000004CTr0AM"] } } }' -X POST "https://instance_name/services/data/v41.0/chatter/feed-elements" -H 'Authorization: OAuth OOARoAQETAKEIddnMWXh462dprYAgRWaPj94O6yOD' --insecure

Response body Feed Item SEE ALSO: Action Links Action Link Templates Action Link Group Definitions Feed Elements, Post and Search Define Action Links in a Template and Post with a Feed Element Define Action Links in a Template and Post with a Feed Element

Define Action Links in a Template and Post with a Feed Element Step 1: Create the Action Link Templates Just like radio buttons, action links must be nested in a group. Action links within a group share the properties of the group and are mutually exclusive (you can click only one action link within a group). Even if you define only one action link, it must be part of an action link group. The same is true for action link templates and action link group templates. This example uses one action link in an action link group. When a user clicks the action link, an HTTP POST request is made to a Chatter REST API resource, which posts a feed item to Chatter. The HTTP Request Body field holds the request body for the Action URL resource, including the text of the new feed item. In this example, the new feed item includes only text, but it could include other capabilities such as a file attachment, a poll, or even action links. 1. From Setup, enter Action Link Templates in the Quick Find box, then select Action Link Templates. 2. Use these values in a new Action Link Group Template: Field

Value

Name

Doc Example

Developer Name

Doc_Example

Category

Primary action

Executions Allowed

Once per User

3. Use these values in a new Action Link Template: Field

Value

Action Link Group Template

Doc Example

95

Chatter REST API Developer Guide

Define Action Links in a Template and Post with a Feed Element

Field

Value

Action Type

Api

Action URL

/services/data/{!Bindings.ApiVersion}/chatter/feed-elements

User Visibility

Everyone can see

HTTP Request Body

{"subjectId": "{!Bindings.SubjectId}","feedElementType": "FeedItem","body": {"messageSegments": [{"type": "Text","text": "{!Bindings.Text}"}]}}

HTTP Headers

Content-Type: application/json

Position

0

Label Key

Post

HTTP Method

POST

4. Go back to the Action Link Group Template and select Published. Click Save. Make a note of the Action Link Group Template ID and skip to Step 3.

Step 2: Get the Action Link Group Template ID If you have access to the action link group template in Setup, you can get the Action Link Group Template ID and skip to Step 3. Resource /services/data/v33.0/query

HTTP method GET Request parameters q—A SOQL query string. Request parameters example GET /services/data/v41.0/query?q=SELECT+id+FROM+ActionLinkGroupTemplate+WHERE+DeveloperName='Doc_Example'

cURL example curl https://instance_name/services/data/v41.0/query?q=SELECT+id+FROM+ActionLinkGroupTemplate+ WHERE+DeveloperName='Doc_Example' -H "Authorization: Bearer token"

Response body An array of query result records. { "totalSize":1, "done":true, "records":[ {

96

Chatter REST API Developer Guide

Define Action Links in a Template and Post with a Feed Element

"attributes":{ "type":"ActionLinkGroupTemplate", "url":"/services/data/v41.0/sobjects/ActionLinkGroupTemplate/07gD00000004CEhIAM" }, "Id":"07gD00000004CEhIAM" } ] }

Step 3: Instantiate the Action Link Group Resource /connect/action-link-group-definitions

HTTP method POST Request body Action Link Group Definition Input This Action Link Group Definition Input request body includes a templateBindings property that is a collection of Action Link Template Binding Input request bodies. In this example, the Action Link Template Binding Input request body includes three template bindings. Request body example POST /services/data/v41.0/connect/action-link-group-definitions { "templateId":"07gD00000004CEhIAM", "templateBindings" : [ { "key":"ApiVersion", "value":"v33.0" }, { "key":"Text", "value":"This post was created by an API Action Link!" }, { "key":"SubjectId", "value":"me" } ] }

Request example using cURL To use cURL to make the request, enter the following and substitute your Developer Edition instance name, and OAuth information. curl -H "X-PrettyPrint: 1" -H "Content-Type: application/json" -d '{ "templateId":"07gD00000004CEhIAM", "templateBindings" : [ { "key":"ApiVersion", "value":"v41.0" }, { "key":"Text", "value":"This post was created by an API Action Link!" }, { "key":"SubjectId", "value":"me" } ] }' -X POST

97

Chatter REST API Developer Guide

Define Action Links in a Template and Post with a Feed Element

"https://instance_name/services/data/v41.0/connect/action-link-group-definitions" -H 'Authorization: OAuth 00DRR0000000N0g!RWaPj94O6yOD.lfjB9LqMk' --insecure

Response body Action Link Group Definition

Step 4: Associate the Action Link Group with a Feed Element and Post It You can associate up to 10 action link groups with a feed element. Resource /chatter/feed-elements

HTTP method POST Request body Feed Item Input This Feed Item Input request body includes a body property that is a Message Body Input request body. In this example, the Message Body Input request body includes a messageSegments property that has one Message Segment Input: Text request body. This Feed Item Input request body also includes a capabilities property that is a Feed Element Capabilities Input request body. In this example, the Feed Element Capabilities Input includes an associatedActions property that is a Associated Actions Capability Input request body. Request body example Grab the action link group ID from the id property of the Action Link Group Definition response from step 3. POST /services/data/v41.0/chatter/feed-elements { "body": { "messageSegments": [ { "type": "Text", "text": "Click to post a feed item." } ] }, "subjectId": "me", "feedElementType": "feedItem", "capabilities": { "associatedActions": { "actionLinkGroupIds": ["0AgRR0000004CTr0AM"] } } }

Request example using cURL To use cURL to make the request, enter the following and substitute the action link group ID returned in step 2, your Developer Edition instance name, and your OAuth information. curl -H "X-PrettyPrint: 1" -H "Content-Type: application/json" -d '{ "body": { "messageSegments": [ { "type": "Text", "text": "Click to post a feed item." } ] },

98

Chatter REST API Developer Guide

Update the Status of an Action Link or Invoke an Action Link

"subjectId": "me", "feedElementType": "feedItem", "capabilities": { "associatedActions": { "actionLinkGroupIds": ["0AgRR0000004CTr0AM"] } } }' -X POST "https://instance_name/services/data/v41.0/chatter/feed-elements" -H 'Authorization: OAuth OOARoAQETAKEIddnMWXh462dprYAgRWaPj94O6yOD' --insecure

Response body Feed Item SEE ALSO: Action Link Group Definitions Feed Elements, Post and Search Action Link Templates Action Links Define Action Links and Post with a Feed Element

Update the Status of an Action Link or Invoke an Action Link Usage Use this resource to update the status property of an action link. To invoke an Api or an ApiAsync action link, set the status to PendingStatus. The status of the action link in combination with the labelKey property of the Action Link Definition Input determines the text that displays in the UI. Different types of action links have different status workflows: Api

To invoke an Api action link from an app, make a PATCH request to mark the link PendingStatus. Salesforce handles the call out to the actionUrl that was provided in the Action Link Definition Input. For an Api action link, Salesforce sets the status to SuccessfulStatus or FailedStatus based on the HTTP status code returned by your server. ApiAsync

To invoke this action from an app, make a PATCH request to mark the link PendingStatus. Salesforce handles the call out to the actionUrl that was provided in the Action Link Definition Input. For an ApiAsync action link, the callout starts an asynchronous operation on your server. Salesforce sets status to PendingStatus unless the call returned an error status code, in which case it sets status to FailedStatus. When your server has finished the asynchronous processing it should call back and PATCH the action link to SuccessfulStatus or FailedStatus. Download and Ui

Direct the user to download or visit the UI from the link in the actionUrl of the Platform Action response body. Your application must decide when to make a PATCH request to set status to SuccessfulStatus or FailedStatus. Note: You can’t PATCH the status of an action link: • Back to NewStatus from a different status. • From a terminal status (FailedStatus or SuccessfulStatus) to NewStatus or PendingStatus. • When the action link belongs to an action link group whose executionsAllowed property is Unlimited. • For an Api or ApiAsync action link whose executionsAllowed property is Once, when a user PATCHes the status to PendingStatus for the first time, the callout is made to the action link. If the same user PATCHes it to PendingStatus again, Salesforce returns the current action link information. However, if another user PATCHes the status to PendingStatus, Salesforce throws an error. In both cases, the callout to the action link is not resent.

99

Chatter REST API Developer Guide

Edit a Feed Post

Resource /connect/action-links/actionLinkId

HTTP method PATCH Request body Action Link Input Request body example { "status":"SuccessfulStatus" }

Request parameter status

Request parameter example /services/data/v41.0/connect/action-links/actionLinkId?status=SuccessfulStatus

Returns Platform Action

Edit a Feed Post Resource /chatter/feed-elements/feedElementId

HTTP method PATCH Request body Feed Item Input This Feed Item Input request body includes a body property that is a Message Body Input request body. In this example, the Message Body Input request body includes a messageSegments property that has one Message Segment Input: Text request body. Request body example { "body":{ "messageSegments":[ { "type":"Text", "text":"Check out the latest API documentation on developer.salesforce.com." } ] } }

Returns Feed Item

100

Chatter REST API Developer Guide

Edit a Comment

Edit a Comment Resource /chatter/comments/commentId

HTTP method PATCH Request body Comment Input This Comment Input request body includes a body property that is a Message Body Input request body. In this example, the Message Body Input request body includes a messageSegments property that has one Message Segment Input: Text request body. Request body example {

"body":{ "messageSegments":[ { "type":"Text", "text":"I am definitely going to check that out." } ] }

}

Returns Comment

Edit a Question Title and Post Resource /chatter/feed-elements/feedElementId

HTTP method PATCH Request body Feed Item Input This Feed Item Input request body includes a body property that is a Message Body Input request body. In this example, the Message Body Input request body includes a messageSegments property that has one Message Segment Input: Text request body. This Feed Item Input request body also includes a capabilities property that is a Feed Element Capabilities Input request body. In this example, the Feed Element Capabilities Input includes a questionAndAnswers property that is a Question and Answers Capability Input request body. Request body example { "body":{ "messageSegments":[ { "type":"Text", "text":"The latest public versions are on developer.salesforce.com."

101

Chatter REST API Developer Guide

Like a Feed Item

} ] }, "capabilities":{ "questionAndAnswers" : { "questionTitle" : "Where can I find API documentation" } } }

Returns Feed Item

Like a Feed Item Resource /chatter/feed-elements/feedElementId/capabilities/chatter-likes/items

HTTP method POST Note: POST takes no request parameters nor a request body. Example /services/data/v41.0/chatter/feed-elements/005B0000000GPo4/capabilities/chatter-likes/items

Returns Like

Like a Feed Item and Return the Total Number of Likes Resource /connect/batch/

HTTP method POST Request body Generic Batch Collection Input This Generic Batch Collection Input request body includes a batchRequests property that is a collection of Batch Input request bodies. Request body example { "batchRequests" : [ { "method" : "Post", "url" : "/v41.0/chatter/feed-elements/feedElementId/capabilities/chatter-likes/items" }, { "method" : "Get", "url" :

102

Chatter REST API Developer Guide

Share a Feed Item

"/v41.0/chatter/feed-elements/feedElementId/capabilities/chatter-likes/items" } ], "haltOnError" : "false" }

Returns Batch Results

Share a Feed Item Resource /chatter/feed-elements

HTTP method POST Request body Feed Item Input This Feed Item Input request body includes a body property that is a Message Body Input request body. In this example, the Message Body Input request body includes a messageSegments property that has one Message Segment Input: Text request body and one Message Segment Input: Mention request body. This Feed Item Input request body also includes a capabilities property that is a Feed Element Capabilities Input request body. In this example, the Feed Element Capabilities Input request body includes a feedEntityShare property that is a Feed Entity Share Capability Input request body. Request body example { "body" : { "messageSegments" : [ { "type" : "Text", "text" : "When should we meet for release planning? " }, { "type" : "Mention", "id" : "005D00000016Qxp" }] }, "capabilities" : { "feedEntityShare" : { "feedEntityId" : "0D5B000000Py41t" } }, "feedElementType" : "FeedItem", "subjectId" : "0F9B000000000W2" }

Request parameters Note: The originalFeedElementId request parameter isn’t supported in version 39.0 and later. Use the request body to share a feed item in version 39.0 and later. originalFeedElementId, subjectId

103

Chatter REST API Developer Guide

Get Feed Elements Updated Since Last Request

Request parameter example /services/data/v38.0/chatter/feed-elements?originalFeedElementId=0D5D0000000DaZBKA0&subjectId=me

Returns Feed Item

Get Feed Elements Updated Since Last Request Resource To get feed elements that were updated since the last call to a feeds resource, make a request to the value of the updatesUrl property of the Feed Element Page response body. Feed elements that are updated in the same second as the request aren’t returned. These feeds return an updatesUrl property: • Company—/chatter/feeds/company/feed-elements • Files—/chatter/feeds/files/me/feed-elements • Filter—/chatter/feeds/filter/me/filterId/feed-elements • Groups—/chatter/feeds/groups/me/feed-elements • News—/chatter/feeds/news/me/feed-elements • People—/chatter/feeds/people/me/feed-elements • Record—/chatter/feeds/record/recordId/feed-elements This excerpt from the Feed Elements Page response body shows a sample value for the updatesUrl property: { ... ..."updatesUrl" : "/services/data/v41.0/chatter/feeds /news/005D0000001LL8OIAW/feed-elements?updatedSince=2:1384811809000" ... }

A feed element is considered to be updated if it was created since the last feed request, or if sort=LastModifiedDateDesc and a comment was added to the feed element since the last feed request. Adding likes and topics doesn’t update a feed element. HTTP method GET Returns Feed Element Page

Get a Feed with Internal Feed Items Only Resource /chatter/feeds/record/recordId/feed-elements

HTTP method GET Request parameter showInternalOnly

104

Chatter REST API Developer Guide

Search a Feed

Example /services/data/v41.0/chatter/feeds/record/0F9D00000000I4O/feed-elements?showInternalOnly=true

Returns Feed Element Page

Search a Feed Resource /chatter/feed-elements?q=searchString

The search string can contain wildcards and must contain at least two characters that aren’t wildcards. HTTP method GET Request parameter q

Request parameter example /services/data/v41.0/chatter/feed-elements?q=track

Returns Feed Element Page

Get a List of Records a User Follows Resource /chatter/users/userId/following

HTTP method GET Request parameter page (optional) Request parameter example /services/data/v41.0/chatter/users/005D0000001GLowIAB/following?page=1

Returns Subscription Page

Get Chatter Activity Statistics for a User Resource /chatter/users/userId

HTTP method GET Example /services/data/v41.0/chatter/users/005D0000001GLowIAB?include=/chatterActivity

105

Chatter REST API Developer Guide

Get Recommendations of Users to Follow

Returns User Detail

Get Recommendations of Users to Follow Resource /chatter/users/me/recommendations/follow/users

HTTP method GET Example /services/data/v41.0/chatter/users/me/recommendations/follow/users

Returns Recommendations

Create and Schedule Custom Recommendations with Audiences Community managers (users with the Create and Set Up Communities or Manage Communities permission) can access, create, and delete audiences, definitions, and schedules for community recommendations. Users with the Modify All Data permission can also access, create, and delete recommendation audiences, recommendation definitions, and scheduled recommendations. These recommendations appear by default on the Customer Service (Napili) template. Specifically, on the community home and question detail pages and in the feed in communities in the Salesforce mobile web. They also appear anywhere community managers add recommendations using Community Builder in communities using the Summer ’15 or later version of the Customer Service (Napili) template.

Step 1: Define the Custom Recommendation Resource /connect/communities/communityId/recommendation-definitions

HTTP method POST Request body Recommendation Definition Input Request body example { "name":"Corporate Training Project", "title":"Want to learn more about the Corporate Training Project?", "explanation":"Click this link to learn more!", "actionUrl":"https://www.example.com", "actionUrlName":"Launch" }

Response body Recommendation Definition

106

Chatter REST API Developer Guide

Create and Schedule Custom Recommendations with Audiences

Step 2: Add an Image to the Custom Recommendation This example adds an image file that has been uploaded to Salesforce. To upload a new image file, see Uploading Binary Files. Resource /connect/recommendation-definitions/recommendationDefinitionId/photo

Use the recommendationDefinitionId returned in the Recommendation Definition response body in Step 1. HTTP method PUT Request body Photo Input Request body example { "cropSize" : "120", "cropX" : "0", "cropY" : "0", "fileId" : "069D00000001IOh" }

Response body Photo

Step 3: Create a Recommendation Audience Resource /connect/communities/communityId/recommendation-audiences

HTTP method POST Request body Recommendation Audience Input Request body example { "name" : "Custom App Users" }

Response body Recommendation Audience

Step 4: Add Members to the Recommendation Audience Resource /connect/communities/communityId/recommendation-audiences/recommendationAudienceId

Use the recommendationAudienceId returned in the Recommendation Audience response body in Step 3. HTTP method PATCH Request body Recommendation Audience Input

107

Chatter REST API Developer Guide

Create a Group

In this example, this Recommendation Audience Input request body includes a criteria property that is a Custom List Audience Criteria Input request body. The Custom List Audience Criteria Input request body includes a members property that is a User ID Collection Input request body. Request body example { "criteria" : { "memberOperationType" : "Add", "members" : { "userIds" : [ "005B0000000Ge16", "005D0000001GpHp" ] }, "type" : "CustomList" } }

Response body Recommendation Audience

Step 5: Schedule the Custom Recommendation with the Audience Resource /connect/communities/communityId/scheduled-recommendations

HTTP method POST Request body Scheduled Recommendation Input Request body example { "recommendationDefinitionId" : "0RDD00000004CEhOAM", "recommendationAudienceId":"02JD00000008SfdMAE" }

Response body Scheduled Recommendation

Create a Group Resource /chatter/groups

HTTP method POST Request body Group Input

108

Chatter REST API Developer Guide

Update and Crop a Group Photo

Request body example { "name" : "Chatter API", "visibility" : "PublicAccess" }

Request parameters (required) name, visibility Request parameter example /services/data/v41.0/chatter/groups?name=Chatter+API&visibility=PublicAccess

Returns Group Detail

Update and Crop a Group Photo This example crops an existing photo (a photo that has already been uploaded). You can also upload and crop a photo. To upload a new photo, use a multipart/form-data request. See Uploading Binary Files. Resource /chatter/groups/groupId/photo

HTTP method POST Request body Photo Input Request body example {

"cropSize" : "240", "cropX" : "20", "cropY" : "20", "fileId" : "069D00000001IOh"

}

Request parameters cropSize, cropX, cropY, fileId Request parameter example /services/data/v41.0/chatter/groups/0F9300000008ORJ /photo?cropSize=240&cropX=20&cropY=20&fileId=069D00000001IOh

Returns Photo SEE ALSO: Update and Crop a User Photo

109

Chatter REST API Developer Guide

Join a Group

Join a Group Resource /chatter/groups/groupId/members

HTTP method POST Request body Group Member Input Request body example {"userId": "005D0000001GpHp" }

Request parameter userId

Request parameter example /services/data/v41.0/chatter/groups/0F9D000000006bOKAQ /members?userId=005D0000001GpHp

Returns Group Member

Request to Join a Private Group Resource /chatter/groups/groupId/members/requests

HTTP method POST Note: POST takes no request parameters nor a request body. Example /services/data/v41.0/chatter/groups/0F9D000000006bOKAQ/members/requests

Returns Group Membership Request

Approve or Reject a Request to Join a Private Group Resource /chatter/group-memberships-requests/requestId

HTTP method PATCH Request body Group Membership Request Update Request body example { "status " : "Accepted" }

110

Chatter REST API Developer Guide

Post to a Group

Request parameters status and responseMessage The responseMessage parameter is used only if the value of status is Declined. Request parameter example /services/data/v41.0/chatter/group-membership-requests/0I5D000000002fwKAA?status=Accepted

Returns Group Membership Request

Post to a Group Resource /chatter/feed-elements

HTTP method POST Request body Feed Item Input This Feed Item Input request body includes a body property that is a Message Body Input request body. In this example, the Message Body Input request body includes a messageSegments property that has one Message Segment Input: Text request body and one Message Segment Input: Mention request body. Request body example Specify the group in the subjectId. { "body" : { "messageSegments" : [ { "type" : "Text", "text" : "When should we meet for release planning?" }, { "type" : "Mention", "id" : "005D00000016Qxp" }] }, "feedElementType" : "FeedItem", "subjectId" : "0F9B000000000W2" }

Request parameters feedElementType, subjectId, text

Request parameter example /services/data/v41.0/chatter /feed-elements?feedElementType=FeedItem&subjectId=0F9B000000000W2&text=New+post

Returns Feed Item

111

Chatter REST API Developer Guide

Follow a Record

Follow a Record Resource /chatter/users/me/following

HTTP method POST Request body Following Input Request body example { "subjectId" : "001D000000Iyu2p" }

Request parameter subjectId

The subjectId is the ID of the item you want to follow. In versions 29.0 and above, the subjectId can be a topic ID. Request parameter example /services/data/v41.0/chatter/users/me/following?subjectId=001D000000Iyu2p

Returns Subscription

Stop Following a Record Resource /chatter/subscriptions/subscriptionId

HTTP method DELETE Example /services/data/v41.0/chatter/subscriptions/0E8D00000001JkFKAU

Returns 204: Successful Delete A complete structured response body is not returned, just a return code.

Get a Record Feed Resource /chatter/feeds/record/recordId/feed-elements

HTTP method GET Example /services/data/v41.0/chatter/feeds/record/005x0000001oXx9AAE /feed-elements

Returns Feed Element Page

112

Chatter REST API Developer Guide

Update a User Profile

Update a User Profile Resource /chatter/users/userId

HTTP method PATCH Request body User Input Request body example {

"aboutMe": "Writer at Salesforce"}

Request parameter aboutMe

Request parameter example /services/data/v41.0/chatter/users/me?aboutMe=Writer+at+Salesforce

Returns User Detail

Update and Crop a User Photo This example crops an existing photo (a photo that has already been uploaded). You can also upload and crop a photo. To upload a new photo, use a multipart/form-data request. See Uploading Binary Files. Resource /connect/user-profiles/userId/photo

HTTP method POST Request body Photo Input Request body example {

"cropSize" : "240", "cropX" : "20", "cropY" : "20", "fileId" : "069D00000001IOh"

}

Request parameters cropSize, cropX, cropY, fileId Request parameter example /services/data/v41.0/connect/user-profiles /me/photo?cropSize=240&cropX=20&cropY=20&fileId=069D00000001IOh

113

Chatter REST API Developer Guide

Send a Private Message

Returns Photo SEE ALSO: Update and Crop a Group Photo

Send a Private Message Resource /chatter/users/me/messages/

HTTP method POST Request body User Message Request body example { "body" : "Are we ready for next week's customer meeting?", "recipients" : ["005D0000001GOYpIAO", "005D0000001GbdHIAS"] }

Request parameter recipients OR inReplyTo text

Request parameter example /services/data/v41.0/chatter/users/me/messages?recipients= 005D0000001GOYpIAO,005D0000001GbdHIAS&text=Are+we+ready+for+next+week's+customer+meeting?

Returns Message

Get User Information for Multiple Users Resource /chatter/users/batch/user_list where user_list is a list of user Ids. Your app may need to call Chatter REST API

twice: once to get the feed items and user Ids, the second time to call this resource with the list of user Ids. HTTP method GET Example /services/data/v41.0/chatter/users /batch/005D0000001Kl6xIAC,005D0000005J3D4HVB, . . .

Returns Batch Results

114

Chatter REST API Developer Guide

Create a Topic Hierarchy in Communities

Create a Topic Hierarchy in Communities Example 1: Create a Hierarchy with Managed Topics Step 1: Identify or Create the Parent Topic The parent topic must be a navigational managed topic. Resource /connect/communities/communityId/managed-topics

HTTP method GET to retrieve a list of navigational managed topics to identify the parent topic. POST to create a parent topic. Community managers (users with the Create and Set Up Communities or Manage Communities permission) can create managed topics. Response body for GET Managed Topic Collection Make a note of the ID of the navigational managed topic you want to be the parent topic. It has a prefix of 0mt. Request body for POST Managed Topic Input Request body example for POST { "name":"Parent Topic", "managedTopicType":"Navigational" }

Response body for POST Managed Topic Make a note of the ID of the parent topic you created. It has a prefix of 0mt. Step 2: Create the Child Topic and Link to the Parent in a Hierarchy In this step, create a managed child topic and link it to its parent in one step. Resource /connect/communities/communityId/managed-topics

HTTP method POST Community managers (users with the Create and Set Up Communities or Manage Communities permission) can create managed topics. Request body Managed Topic Input Request body example Use the navigational managed topic ID from Step 1 as the parentId. { "name":"Child Topic", "managedTopicType":"Navigational", "parentId":"0mtR000000001KLIAY" }

115

Chatter REST API Developer Guide

Create a Topic Hierarchy in Communities

Response body for POST Managed Topic

See the Hierarchy By default, the managed topic response body shows only the top level of a hierarchy. You can have up to three levels in your topic hierarchy. To see all the levels, use this resource and these parameters: /connect/communities/communityId/managed-topics?depth=3&managedTopicType=Navigational

Example 2: Create a Hierarchy with Managed and Standard Topics It’s also possible to use a standard topic, instead of a managed topic, to be the child topic, but this requires an additional step. Step 1: Identify or Create the Parent Topic The parent topic must be a navigational managed topic. Resource /connect/communities/communityId/managed-topics

HTTP method GET to retrieve a list of navigational managed topics to identify the parent topic. POST to create a parent topic. Community managers (users with the Create and Set Up Communities or Manage Communities permission) can create managed topics. Response body for GET Managed Topic Collection Make a note of the ID of the navigational managed topic you want to be the parent topic. It has a prefix of 0mt. Request body for POST Managed Topic Input Request body example for POST { "name":"Parent Topic", "managedTopicType":"Navigational" }

Response body for POST Managed Topic Make a note of the ID of the parent topic you created. It has a prefix of 0mt. Step 2: Identify or Create the Child Topic In this example, identify or create a standard topic, instead of a managed topic, to be the child topic. Resource /connect/communities/communityId/topics

HTTP method GET to retrieve a list of topics to identify the child topic. POST to create a child topic. Users with the Create Topics permission can create topics.

116

Chatter REST API Developer Guide

Chatter REST API Resources

Response body for GET Topic Collection Make a note of the ID of the topic you want to be the child topic. It has a prefix of 0TO. Request body for POST Topic Input Request body example for POST { "description":"This topic will be a child topic of Parent Topic.", "name":"Child Topic" }

Response body for POST Topic Make a note of the ID of the child topic you created. It has a prefix of 0TO. Step 3: Link the Child and Parent Topic in a Hierarchy Resource /connect/communities/communityId/managed-topics

HTTP method POST Request body Managed Topic Input Request body example Use the managed topic ID from Example 2, Step 1 as the parentId and the topic ID from Example 2, Step 2 as the recordId. { "managedTopicType":"Navigational", "parentId":"0mtR000000001KLIAY", "recordId":"0TOD00000000cwk" }

Response body Managed Topic

Chatter REST API Resources Chatter REST API resources are sometimes called endpoints. IN THIS SECTION: Action Links Resources An action link is a button on a feed element. Clicking an action link can take a user to a Web page, initiate a file download, or invoke an API call to Salesforce or to an external server. An action link includes a URL and an HTTP method, and can include a request body and header information, such as an OAuth token for authentication. Use action links to integrate Salesforce and third-party services into the feed so that users can take action to drive productivity and accelerate innovation. Activity Reminders Get a list of upcoming activity reminders in Salesforce Classic.

117

Chatter REST API Developer Guide

Chatter REST API Resources

Announcements Resources Get the announcements for the specified parent or create an announcement. Also get information about, update, or delete an announcement. Async Query Resources Submit Async SOQL queries to be processed asynchronously and check on their status. Use async query resources to make consistent SOQL queries, no matter what size the data is or where the data is stored. Clean Resources Update records with data integration rules and get information about updating with data integration rules, including the active data integration rules, the data services for active data integration rules, and update metrics. Batch Resource Create a request body with a batch of up to 25 subrequests and send them to the server in a single request to improve your application’s performance. The response bodies and HTTP statuses for each subrequest in the batch are returned within a single response body. Each subrequest counts against rate limits. Chatter Resources Get a directory of Chatter feeds, groups, and users resources. Control when Chatter email digests are sent. Get a list of supported emojis. Get extensions. Get information about, update, and delete Chatter streams. Comments Resources Get information about, edit, like, or delete a comment. Determine whether the context user can edit a comment. Communities Resources Information about the communities available to the context user, or information about a specific community. Communities Knowledge Resources Information about trending articles in a community. Communities Moderation Resources Information about whether a user has flagged a feed element, comment, or file as inappropriate. Also used to delete flags. Connect Resources Information about the context user’s organization and settings, and information about the communities the context user is a member of. Content Workspace Permissions Resource Get a user's permissions for a content workspace. Dashboard Component Snapshot Resource A snapshot of a dashboard component. Datacloud Resources Information about Datacloud resources used to purchase Data.com contacts or companies. Use the Datacloud resources to purchase Data.com contacts or companies and get information about your purchases, including how many credits are available for your use. You can also add contacts to selected companies or import contacts to your CRM. Environment Hub Resources Use Environment Hub resources to create new orgs and connect existing orgs to the hub. Email Merge Field Services Resource See a list of merge fields for a specific object. A merge field is a field you can put in an email template, mail merge template, custom link, or formula to incorporate values from a record. External Email Services Resource Get information about the external email services available to the context user.

118

Chatter REST API Developer Guide

Chatter REST API Resources

Feed Elements Resources Information about feed elements. Access, edit, post, search, and delete feed elements. Access a feed element’s capabilities, including bundles and their feed elements. Feed Items Resources Information about feed items. Access, search, delete, bookmark, and like feed items. Access and post comments. Access and vote in polls. And access, add, and remove topics. Feeds Resources Feeds are made up of feed items. There are many feed types. Each feed type has an algorithm that determines which feed items it contains. Files Connect Repository Resources A Files Connect repository is an external content repository that’s connected to Salesforce. Use these resources to get a list of repositories, to get information about a repository or a repository file, and to get the content of a repository file. Also use these resources to get information about the files and folders in a repository folder. Use these resources to get a repository’s directory entries, permissions, and permission types. Also use these resources to update a repository’s permissions. Files Resources Information about files, including content, rendered version, and sharing. Folders Resources Information about a folder or the contents of a folder. Modify and delete folders, add items to folders, and sync root folders. Forecasts Resources Get information about forecast users, managers, and the forecast hierarchy. Groups Resources Information about groups, such as the group's members, photo, and the groups in the organization. Create and delete a group, add members to a group, and change the group photo. Influence Resource List of the percentile thresholds used to categorize an organization’s users by their influence in Chatter. Likes Resource Information about the specified like. Also used to delete a like. Managed Topics Resources Managed topics for a community. Get a list of managed topics. Create a managed topic hierarchy. Create, delete, or reorder managed topics in a community. Mentions Resources Information about users and groups that a user can mention in a feed item body or comment body. When a user or group is mentioned, they receive notification. Motifs Resources Returns URLs for sets of small, medium, and large motif icons. Records have different sets of motif icons depending on the record type. The motif can also include the record type’s base color. Push Notifications Resource Send a mobile push notification to connected apps on users’ devices. This resource is only accessible when the session is established with a connected app that is developed in the same organization or installed in the same package as the recipient’s connected app. Question and Answers Suggestions Resource Get question and answers suggestions.

119

Chatter REST API Developer Guide

Action Links Resources

Recommendation Audience Resources Target specific audiences for your custom recommendations. Use these resources to get information about, create, update, and delete recommendation audiences. Recommendation Definition Resources Recommendation definitions allow you to create custom recommendations that appear in communities, encouraging users to watch videos, take training and more. Use these resources to get information about, create, modify, and delete recommendation definitions. Also get information about, upload, modify, and delete recommendation definition photos. Records Resources Get information about the followers of a record. Add and remove topics from records. Scheduled Recommendations Resources Get information about, create, update, or delete scheduled recommendations. Share Captured Activity Resource Share an email or event that was captured by Automated Activity Capture, which is a feature of Sales Cloud Einstein and Inbox. You can share with no one, everyone, or selected groups. Subscriptions Resource Information about the specified subscription. Also used to delete a subscription, for example, to unfollow a record or a topic. Subscriptions Notifications Member Resource Get information about the frequency with which a user receives subscription notifications. Subscribe or unsubscribe a user from receiving notifications. Topics Resources List of topics for the organization, list of suggested topics for a specified string of text, feed item, or record, list of trending topics for the organization, information about a specified topic, endorsements for a specific topic, information about the files posted recently to a specified topic, information about the groups recently contributing to a specified topic, knowledgeable people for a specified topic, and list of topics related to a specified topic. User Profiles Resources The user profile data populates the profile page (also called the Chatter profile page). This data includes user information (such as address, manager, and phone number), some user capabilities (permissions), and a set of subtab apps, which are custom tabs on the profile page. Users Resources Information about the user, such as who is following the user, the user’s files or recommendations. Also used for posting feed items and updating conversation status. Zones Resources Information about Chatter Answers zones.

Action Links Resources An action link is a button on a feed element. Clicking an action link can take a user to a Web page, initiate a file download, or invoke an API call to Salesforce or to an external server. An action link includes a URL and an HTTP method, and can include a request body and header information, such as an OAuth token for authentication. Use action links to integrate Salesforce and third-party services into the feed so that users can take action to drive productivity and accelerate innovation. There are two views of an action link and an action link group: the definition, and the context user’s view. The definition includes potentially sensitive information, such as authentication information. The context user’s view is filtered by visibility options and the values reflect the state of the context user. Available resources:

120

Chatter REST API Developer Guide

Action Links Resources

Resource

Description

/connect/action-link-group-definitions

Create an action link group definition. To associate an action link with a feed element, first create an action link group definition. Then post a feed element with an associated actions capability.

/connect/action-link-group-definitions /actionLinkGroupId

Get information about or delete an action link group definition. Deleting an action link group definition removes all references to it from feed elements. To get or delete the action link group definition, the client must be the same connected app that created the definition and the user must either be the user who created the definition or have View all Data permission.

/connect/action-link-groups/actionLinkGroupId Get information about an action link group including state for the

context user. /connect/action-links/actionLinkId

Get information about or update the status of an action link. The status of the action link in combination with the labelKey property of the Action Link Definition Input determines the text that displays in the UI. To trigger the API request for Api and ApiAsync action links, set the status to PendingStatus.

/connect/action-links/actionLinkId /diagnostic-info

Get diagnostic information returned when an action link executes. Diagnostic information is given only for users who can access the action link.

SEE ALSO: Action Links Define Action Links and Post with a Feed Element

Action Link Group Definitions Create an action link group definition. To associate an action link with a feed element, first create an action link group definition. Then post a feed element with an associated actions capability. All action links must belong to a group. Action links in a group are mutually exclusive and share some properties. Define stand-alone actions in their own action group. This image shows a feed element with one action link group containing two action links, Download and Order:

121

Chatter REST API Developer Guide

Action Links Resources

Resource /connect/action-link-group-definitions /connect/communities/communityId/action-link-group-definitions

Available since release 33.0 Requires Chatter No HTTP methods POST The Action Link Group Definitions resource doesn’t support query parameters for POST. You must use an Action Link Group Definition Input request body. Request body for POST Action Link Group Definition Input Response body for POST Action Link Group Definition Example for POST To associate an action link group with a feed item, first create an action link group definition: Note: An actionUrl to a Salesforce resource can be relative. All others must be absolute and start with https://. POST /connect/action-link-group-definitions { "actionLinks": [ { "actionType" : "Api", "actionUrl" : "https://www.example.com/api/v1/confirm", "groupDefault" : "true", "headers" : [

122

Chatter REST API Developer Guide

Action Links Resources

{ "name" : "Authorization", "value" : "OAuth 00DRR0000000N0g!ARoAQMZyQtsP1Gs27EZ8hl7vdpYXH5O5rv1 VNprqTeD12xYnvygD3JgPnNR._nmE6thZakAbBVJUsjUInMUaKMlkNKaWXdHO" }, { "name" : "Content-Type", "value" : "application/json" }, { "name" : "Accept", "value" : "application/json" }, { "name" : "X-PrettyPrint", "value" : "1" } ], "labelKey" : "Confirm", "method" : "HttpPost", "requiresConfirmation" : "true" }, { "actionType" : "Api", "actionUrl" : "https://www.example.com/api/v1/deny", "groupDefault" : "false", "headers" : [ { "name" : "Authorization", "value" : "OAuth 00DRR0000000N0g!ARoAQMZyQtsP1Gs27EZ8hl7vdpYXH5O5rv1 VNprqTeD12xYnvygD3JgPnNR._nmE6thZakAbBVJUsjUInMUaKMlkNKaWXdHO" }, { "name" : "Content-Type", "value" : "application/json" }, { "name" : "Accept", "value" : "application/json" }, { "name" : "X-PrettyPrint", "value" : "1" } ], "labelKey": "Deny", "method" : "HttpPost", "requiresConfirmation" : "true" }, { "actionType": "Ui", "actionUrl" : "https://www.example.com/reviewPage.html", "groupDefault" : "false", "labelKey" : "Review",

123

Chatter REST API Developer Guide

Action Links Resources

"method" : "HttpGet", "requiresConfirmation" : "false" }, "executionsAllowed" : "OncePerUser", "category" : "Primary", "expirationDate" : "2014-05-09T18:45:39.000Z" }

Next, associate the action link group with the feed item and post the feed item. Grab the action link group ID from the /connect/action-link-group-definitions response and pass it in a POST request to /chatter/feed-elements. POST

/chatter/feed-elements

{ "body": { "messageSegments": [ { "type": "Text", "text": "Please confirm or deny this item. You can also click Review to provide more feedback." } ] }, "subjectId": "me", "feedElementType": "FeedItem", "capabilities": { "associatedActions": { "actionLinkGroupIds": ["0AgRR0000004CTr0AM"] } } }

Different types of action links have different workflows to set their status property, whose value displays in the UI. See /connect/action-links/actionLinkId for more information. Note: This example doesn’t include other capabilities, but feed items with action links do support other capabilities, such as content, polls, and links. SEE ALSO: Define Action Links and Post with a Feed Element Action Link Templates Define Action Links and Post with a Feed Element Define Action Links in a Template and Post with a Feed Element

Action Link Group Definition Get information about or delete an action link group definition. Deleting an action link group definition removes all references to it from feed elements. To get or delete the action link group definition, the client must be the same connected app that created the definition and the user must either be the user who created the definition or have View all Data permission.

124

Chatter REST API Developer Guide

Action Links Resources

Resource /connect/action-link-group-definitions/actionLinkGroupId /connect/communities/communityId/action-link-group-definitions/actionLinkGroupId

Available since release 33.0 Requires Chatter No HTTP methods GET, DELETE, HEAD Response body for GET Action Link Group Definition Response body for DELETE 204: Successful Delete

Action Link Group Get information about an action link group including state for the context user. All action links must belong to a group. Action links in a group are mutually exclusive and share some properties. Note that action link groups are accessible by clients, unlike action link group definitions. Resource /connect/action-link-groups/actionLinkGroupId /connect/communities/communityId/action-link-groups/actionLinkGroupId

Available since release 33.0 Requires Chatter No HTTP methods GET, HEAD Response body for GET Platform Action Group

Action Link Get information about or update the status of an action link. The status of the action link in combination with the labelKey property of the Action Link Definition Input determines the text that displays in the UI. To trigger the API request for Api and ApiAsync action links, set the status to PendingStatus. This image shows two action links. In this image, the status of both action links is NewStatus.

125

Chatter REST API Developer Guide

Action Links Resources

If Pam Smith clicks Confirm, the action link status is set to SuccessfulStatus and results in the feed item shown in this image.

Different types of action links have different status workflows: Api

To invoke an Api action link from an app, make a PATCH request to mark the link PendingStatus. Salesforce handles the call out to the actionUrl that was provided in the Action Link Definition Input. For an Api action link, Salesforce sets the status to SuccessfulStatus or FailedStatus based on the HTTP status code returned by your server. ApiAsync

To invoke this action from an app, make a PATCH request to mark the link PendingStatus. Salesforce handles the call out to the actionUrl that was provided in the Action Link Definition Input. For an ApiAsync action link, the callout starts an asynchronous operation on your server. Salesforce sets status to PendingStatus unless the call returned an error status code, in which case it sets status to FailedStatus. When your server has finished the asynchronous processing it should call back and PATCH the action link to SuccessfulStatus or FailedStatus.

126

Chatter REST API Developer Guide

Action Links Resources

Download and Ui

Direct the user to download or visit the UI from the link in the actionUrl of the Platform Action response body. Your application must decide when to make a PATCH request to set status to SuccessfulStatus or FailedStatus. Note: You can’t PATCH the status of an action link: • Back to NewStatus from a different status. • From a terminal status (FailedStatus or SuccessfulStatus) to NewStatus or PendingStatus. • When the action link belongs to an action link group whose executionsAllowed property is Unlimited. • For an Api or ApiAsync action link whose executionsAllowed property is Once, when a user PATCHes the status to PendingStatus for the first time, the callout is made to the action link. If the same user PATCHes it to PendingStatus again, Salesforce returns the current action link information. However, if another user PATCHes the status to PendingStatus, Salesforce throws an error. In both cases, the callout to the action link is not resent. Resource /connect/action-links/actionLinkId /connect/communities/communityId/action-links/actionLinkId

Available since release 33.0 Requires Chatter No HTTP methods GET, PATCH, HEAD Request body for PATCH Root XML tag

JSON example {

"status" : "SuccessfulStatus"

}

Properties Name

Type

Description

Required or Optional

Available Version

status

String

The current status of the action. Values are:

Required

33.0

• FailedStatus—The action link execution failed. • NewStatus—The action link is ready to be executed. Available for Download and Ui action links only. • PendingStatus—The action link is executing. Choosing this value

127

Chatter REST API Developer Guide

Name

Action Links Resources

Type

Description

Required or Optional

Available Version

triggers the API call for Api and ApiAsync action links. • SuccessfulStatus—The action link executed successfully.

Request parameters for PATCH Name

Type

Description

Available Version

status

String

Values are:

33.0

• FailedStatus—The action link execution failed. • NewStatus—The action link is ready to be executed. Available for Download and Ui action links only. • PendingStatus—The action link is executing. Choosing this value triggers the API call for Api and ApiAsync action links. • SuccessfulStatus—The action link executed successfully.

Response body for GET or PATCH Platform Action Example for PATCH PATCH /connect/action-links/0AnRR0000004CTS0A2?status=FailedStatus

Action Link Diagnostic Information Get diagnostic information returned when an action link executes. Diagnostic information is given only for users who can access the action link. Resource /connect/action-links/actionLinkId/diagnostic-info /connect/communities/communityId/action-links/actionLinkId/diagnostic-info

Available version 33.0

128

Chatter REST API Developer Guide

Activity Reminders

Requires Chatter No HTTP methods GET, HEAD Response body Action Link Diagnostic

Activity Reminders Get a list of upcoming activity reminders in Salesforce Classic. Resource /connect/reminders/activities

Available version 39.0 Requires Chatter No HTTP methods GET Request parameters for GET Parameter Name

Type

Description

Required or Optional

Available Version

maxRecordCount Integer

The number of returned reminders. The Optional maximum allowed is 2,000. The default is 100.

39.0

numberOfDays

Integer

Returns reminders due for the next Optional number of days in the future. The default is seven, and the maximum is 365.

39.0

type

String

Specifies the type of activity. Valid values Optional are:

39.0

• All • Event • Task The default is All.

Response body for GET ActivityRemindersCollectionRepresentation

129

Chatter REST API Developer Guide

Activity Reminders

IN THIS SECTION: Activity Reminder Get information about, update, or delete an activity reminder in Salesforce Classic.

Activity Reminder Get information about, update, or delete an activity reminder in Salesforce Classic. Resource /connect/reminders/activityId

Available version 39.0 Requires Chatter No HTTP methods GET, PATCH, PUT, DELETE Response body for GET ActivityReminderRepresentation Request body for PATCH and PUT Root XML tag

JSON example { "reminderDateTime": "2016-11-22T16:00:00.000Z", "isReminderDisplayed": false }

Properties Name

Type

Description

Required or Optional

Available Version

isReminderDisplayed Boolean

Indicates whether the activity reminder Required is displayed.

39.0

reminderDateTime Date

Date and time that the activity reminder Optional displays.

39.0

Request parameters for PATCH Parameter Name

Type

isReminderDisplayed Bool

Description

Required or Optional

Available Version

Indicates whether the activity reminder has been displayed.

Required

39.0

130

Chatter REST API Developer Guide

Parameter Name

Type

reminderDateTime Date

Announcements Resources

Description

Required or Optional

Available Version

The date and time that the activity reminder should be displayed.

Optional

39.0

Description

Required or Optional

Available Version

The date and time that the activity reminder should be displayed.

Optional

39.0

Response body for PATCH ActivityReminderRepresentation Request parameters for PUT Parameter Name

Type

reminderDateTime Date

Response body for PUT ActivityReminderRepresentation Response body for DELETE 204: Successful Delete

Announcements Resources Get the announcements for the specified parent or create an announcement. Also get information about, update, or delete an announcement. Use an announcement to highlight information. Users can discuss, like, and post comments on announcements. Deleting the feed post deletes the announcement. This image shows an announcement in a group. Creating an announcement also creates a feed item with the announcement text.

131

Chatter REST API Developer Guide

Announcements Resources

An announcement displays in a designated location in the Salesforce UI until 11:59 p.m. on its expiration date, unless it’s deleted or replaced by another announcement. Available resources are: Resource

Description

/chatter/announcements

Get the announcements for the specified parent or create an announcement.

/chatter/announcements/announcementId

Get information about, update, or delete an announcement.

Announcements Get the announcements for the specified parent or create an announcement. Resource /chatter/announcements /connect/communities/communityId/chatter/announcements

Available version 36.0 Requires Chatter Yes HTTP methods GET, POST, HEAD

132

Chatter REST API Developer Guide

Announcements Resources

Request parameters for GET Parameter Name

Type

Description

Required or Optional

page

Integer

Specifies the number of the page you want Optional returned. Starts at 0. If you pass in null or 0, the first page is returned.

36.0

pageSize

Integer

Specifies the number of announcements Optional per page.

36.0

parentId

String

ID of the parent entity for the announcement, that is, a group ID when the announcement appears in a group.

36.0

Required

Available Version

Response body for GET Announcement Page Request body for POST Root XML tag

JSON example for creating an announcement {

"body": { "messageSegments": [ { "text": "Please install the updates for all iOS devices.", "type": "Text" } ] }, "parentId": "0F9B0000000004S", "expirationDate": "2016-02-22T00:00:00.000Z"

}

JSON example for creating an announcement using an existing feed item { "feedItemId": "0D5D0000000DaZBKA0", "expirationDate": "2016-02-22T00:00:00.000Z" }

Properties Name

Type

Description

Required or Optional

Available Version

body

Message Body Input

Text of the announcement.

Required for creating an announcement if

31.0

133

Chatter REST API Developer Guide

Name

Announcements Resources

Type

Description

Required or Optional

Available Version

feedItemId

isn’t specified Don’t specify for updating an announcement. expirationDate Date

feedItemId

String

The Salesforce UI displays an announcement until 11:59 p.m. on this date unless another announcement is posted first. The Salesforce UI ignores the time value in the expirationDate. However, you can use the time value to create your own display logic in your own UI.

Required for creating an announcement

ID of an AdvancedTextPost feed item that is the body of the announcement.

Required for creating an announcement if body isn’t specified

31.0

Optional for updating an announcement

36.0

Don’t specify for updating an announcement. isArchived

Boolean

Specifies whether the announcement is Optional archived.

36.0

parentId

String

ID of the parent entity for the Required for announcement, that is, a group ID when creating an the announcement appears in a group. announcement if

36.0

feedItemId

isn’t specified Don’t specify for updating an announcement. sendEmails

Boolean

Specifies whether the announcement is sent as an email to all group members regardless of their email setting for the group. If Chatter emails aren’t enabled for the organization, announcement emails aren’t sent. Default value is false.

Response body for POST Announcement

134

Optional for creating an announcement Don’t specify for updating an announcement

36.0

Chatter REST API Developer Guide

Announcements Resources

IN THIS SECTION: Announcement Get information about, update, or delete an announcement.

Announcement Get information about, update, or delete an announcement. Resource /chatter/announcements/announcementId /connect/communities/communityId/chatter/announcements/announcementId

Available since version 31.0 Requires Chatter Yes HTTP methods GET, PATCH, DELETE, HEAD Request body for PATCH Root XML tag

JSON example for updating an announcement { "expirationDate": "2016-02-22T00:00:00.000Z", "isArchived": "false" }

Properties Name

Type

Description

body

Message Body Input Text of the announcement.

Required or Optional

Available Version

Required for creating an announcement if

31.0

feedItemId

isn’t specified Don’t specify for updating an announcement.

135

Chatter REST API Developer Guide

Name

Announcements Resources

Type

expirationDate Date

feedItemId

String

Description

Required or Optional

Available Version

The Salesforce UI displays an announcement until 11:59 p.m. on this date unless another announcement is posted first. The Salesforce UI ignores the time value in the expirationDate. However, you can use the time value to create your own display logic in your own UI.

Required for creating an announcement

31.0

ID of an AdvancedTextPost feed item that is the body of the announcement.

Required for creating an announcement if body isn’t specified

Optional for updating an announcement

36.0

Don’t specify for updating an announcement. isArchived

Boolean

Specifies whether the announcement is archived.

Optional

36.0

parentId

String

ID of the parent entity for the announcement, that is, a group ID when the announcement appears in a group.

Required for creating an announcement if

36.0

feedItemId

isn’t specified Don’t specify for updating an announcement. sendEmails

Boolean

Specifies whether the announcement is sent as an email to all group members regardless of their email setting for the group. If Chatter emails aren’t enabled for the organization, announcement emails aren’t sent. Default value is false.

Optional for creating an announcement

36.0

Don’t specify for updating an announcement

Request parameters for PATCH Parameter Name

Value

Description

Required or Optional Available Version

expirationDate

Date

The Salesforce UI displays an announcement until 11:59 p.m. on this date

Required

136

31.0

Chatter REST API Developer Guide

Parameter Name

Async Query Resources

Value

Description

Required or Optional Available Version

unless another announcement is posted first. The Salesforce UI ignores the time value in the expirationDate. However, you can use the time value to create your own display logic in your own UI.

Response for GET, PATCH Announcement Response for DELETE HTTP Status Code 204

Async Query Resources Submit Async SOQL queries to be processed asynchronously and check on their status. Use async query resources to make consistent SOQL queries, no matter what size the data is or where the data is stored. Available resources: Resource

Description

/async-queries

Submit an Async SOQL query to be processed asynchronously, no matter what size the data is or where the data is stored. Retrieve the status and results of asynchronous query jobs.

/async-queries/jobId

Check the status of an Async SOQL query.

Async Query Submit an Async SOQL query to be processed asynchronously, no matter what size the data is or where the data is stored. Retrieve the status and results of asynchronous query jobs. Resource /async-queries

Available version 35.0 GET supported in 36.0 Requires Chatter No HTTP methods GET, POST

137

Chatter REST API Developer Guide

Clean Resources

Response body for GET Async Query Collection Request body for POST Async Query Input Response body for POST Async Query SEE ALSO: Async Query, Status

Async Query, Status Check the status of an Async SOQL query. Resource /async-queries/jobId

Available version 35.0 DELETE supported in 36.0 Requires Chatter No HTTP methods GET, DELETE Response body for GET Async Query SEE ALSO: Async Query

Clean Resources Update records with data integration rules and get information about updating with data integration rules, including the active data integration rules, the data services for active data integration rules, and update metrics. Available resources are: Resource

Description

/clean

Update records with a data integration rule.

/clean/data-services

Get the data services associated with an organization’s active data integration rules.

/clean/data-services/dataServiceId/metrics Get metrics for the data services associated with an organization’s

active data integration rules. /clean/recordId/rules/statuses

Get the statuses of active data integration rules for a record.

138

Chatter REST API Developer Guide

Clean Resources

IN THIS SECTION: Clean Records Update records with a data integration rule. Clean Rule Data Services Get the data services associated with an organization’s active data integration rules. Clean Rule Data Service Metrics Get metrics for the data services associated with an organization’s active data integration rules. Clean Rule Statuses Get the statuses of active data integration rules for a record.

Clean Records Update records with a data integration rule. Resource /clean

Available version 37.0 Requires Chatter No HTTP methods POST Request body for POST JSON example { "cleanType":"bulk" "cleanRuleId":"07ixx000000000U" "requestId":"0Ysxx0000000004" "entityIds":["003xx000004TnDu", .... ] }

Properties Name

Type

Description

Required or Optional

cleanRuleId

String

The 18-character ID of the data Required integration rule used to update records. Get the IDs for active rules from the Clean Rule Statuses resource.

139

Available Version 37.0

Chatter REST API Developer Guide

Clean Resources

Name

Type

Description

Required or Optional

Available Version

cleanType

String

The system-generated type of update operation used by the data integration rule. One of these values:

Optional

37.0

• BulkClean—Updates all existing records applicable to the specified data integration rule. • Incremental—Updates only records that do not have a status of In Sync or Reviewed. • Manual—Manually updates records with the specified data integration rule. • Perpetual—Automatically updates saved records with the specified data integration rule. entityIds

String[]

The 18-character IDs of the records to update using the data integration rule.

Required

37.0

requestId

String

The system-generated ID of the update Optional request.

37.0

Response body for POST Clean Record Result Collection SEE ALSO: Clean Input

Clean Rule Data Services Get the data services associated with an organization’s active data integration rules. Resource /clean/data-services

Available version 37.0 Requires Chatter No HTTP methods GET Response body for GET Clean Rule Data Service Collection

140

Chatter REST API Developer Guide

Batch Resource

Clean Rule Data Service Metrics Get metrics for the data services associated with an organization’s active data integration rules. Resource /clean/data-services/dataServiceId/metrics

Available version 37.0 Requires Chatter No HTTP methods GET Response body for GET Clean Rule Data Service Metrics Collection

Clean Rule Statuses Get the statuses of active data integration rules for a record. Resource /clean/recordId/rules/statuses

Available version 37.0 Requires Chatter No HTTP methods GET Response body for GET Clean Rule Status Collection

Batch Resource Create a request body with a batch of up to 25 subrequests and send them to the server in a single request to improve your application’s performance. The response bodies and HTTP statuses for each subrequest in the batch are returned within a single response body. Each subrequest counts against rate limits. Use this resource to minimize the number of round-trips between the client and the server. For example, in a mobile app, when a user taps the button to like a feed item, the response body includes information about the like, but it doesn’t include the total number of likes on the feed item. To like the feed item, POST a request to /chatter/feed-elements/feedElementId/capabilities/chatter-likes/items. To get the like total, GET the feed item information from /chatter/feed-elements/feedElementId/capabilities/chatter-likes/items. Add both requests to a Generic Batch Collection Input request body and send them both in a single POST request to /connect/batch: { "batchRequests" : [ {

141

Chatter REST API Developer Guide

Batch Resource

"method" : "Post", "url" : "/v41.0/chatter/feed-elements/feedElementId/capabilities/chatter-likes/items" }, { "method" : "Get", "url" : "/v41.0/chatter/feed-elements/feedElementId/capabilities/chatter-likes/items" } ], "haltOnError" : "false" }

The requests in a batch are called subrequests. All subrequests are executed in the context of the same user. Subrequests are independent and information can’t be passed between them. Subrequests execute serially in their order in the request body. When a subrequest executes successfully, it commits its data. Commits are reflected in the output of later subrequests (as in the previous example which liked a feed item then got the total number of likes). If a subrequest fails, commits made by previous subrequests are not rolled back. Resource /connect/batch

Available since version 28.0 Requires Chatter No HTTP methods POST Request body Generic Batch Collection Input Root XML Tag

JSON { "batchRequests" : [ { "method" : "Get", "url" : "/v41.0/chatter/feeds/news/me" }, { "method" : "Get", "url" : "/v41.0/chatter/feeds/user-profile/me" } ] }

142

Chatter REST API Developer Guide

Batch Resource

Properties Name

Type

Description

Available Version

batchRequests

Generic Batch Input[]

Collection of Batch Request Input request bodies containing the subrequest URLs to execute.

28.0

haltOnError

Boolean

Controls whether Salesforce stops processing 28.0 subrequests if a subrequest fails. The default value is false. If the value is false and a subrequest in the batch does not complete, Salesforce attempts to execute subsequent subrequests in the batch. If the value is true and a subrequest in the batch doesn’t complete due to an HTTP response in the 400 or 500 range, Salesforce halts execution. It doesn’t attempt to execute subsequent subrequests in the batch. It returns an HTTP 412 status code and a BATCH_PROCESSING_HALTED error message for each subsequent subrequest indicating that a previous request was unsuccessful. The top-level request to /connect/batch returns HTTP 200, and the hasErrors property in the response is set to true. Note: Before subrequests are executed, Salesforce verifies that the entire request, including subrequests, is formed properly. If it isn't, Salesforce returns an HTTP 400 Bad Request and doesn't execute subrequests, regardless of the value of haltOnError. Examples of a bad request are a subrequest using the wrong method or having an error in its URL.

Request parameters None. Response Batch Results

143

Chatter REST API Developer Guide

Batch Resource

Example This simple example is a POST request made to https://instance_name/services/data/v41.0/connect/batch that includes the following request body containing two subrequests: { "batchRequests" : [ { "method" : "Get", "url" : "/v41.0/chatter/feeds/user-profile/me" }, { "method" : "Get", "url" : "/v41.0/chatter/feeds/news/me" } ] }

The Batch Results response body includes a Batch Result Item response body for each subrequest: { "hasErrors": false, "results": [ { "result": { "feedElementPostUrl": "/services/data/v41.0/chatter/feed-elements", "feedElementsUrl": "/services/data/v41.0/chatter/feeds /user-profile/005D0000001LL8OIAW/feed-elements", "isModifiedUrl": null }, "statusCode": 200 }, { "result": { "feedElementPostUrl": "/services/data/v41.0/chatter/feed-elements", "feedElementsUrl": "/services/data/v41.0/chatter/feeds /news/005D0000001LL8OIAW/feed-elements", "isModifiedUrl": null }, "statusCode": 200 } ] }

Example: haltOnError is true This example is the same as the previous example but it includes an error in the first subrequest and haltOnError is set to true. Note that the first subrequest contains a typo. { "batchRequests" : [ { "method" : "Get", "url" : "/v41.0/chatter/feeds/user-profile/men" }, { "method" : "Get",

144

Chatter REST API Developer Guide

Batch Resource

"url" : "/v41.0/chatter/feeds/news/me" } ], "haltOnError" : "true" }

The Batch Results response body includes a Batch Result Item response body for each subrequest. The top-level request to /connect/batch returns an HTTP 200, but the first subrequest returns an HTTP 404 because the resource can’t be found. Because haltOnError is true, the next subrequest returns an HTTP 412. Also note that hasErrors is true. { "hasErrors": true, "results": [ { "result": [{ "errorCode": "NOT_FOUND", "message": "The requested resource does not exist" }], "statusCode": 404 }, { "result": [{ "errorCode": "BATCH_PROCESSING_HALTED", "message": "Batch processing halted per request" }], "statusCode": 412 } ] }

Post multiple comments with binary files This example is a generic batch request to https://instance_name/services/data/v41.0/connect/batch that contains two subrequests. Each subrequest comments on a feed item and uploads a binary file to the comment. Include the request body of each subrequest in the richInput properties. Also include information about the binary parts in the binaryPartName and binaryPartNameAlias properties. Here is the cURL example. curl -H "X-PrettyPrint: 1" -F 'json={ "haltOnError":true, "batchRequests":[ { "url":"/v33.0/chatter/feed-elements/0D5D0000000YG0N/capabilities/comments/items", "method":"Post", "binaryPartName":"binaryPart1", "binaryPartNameAlias":"feedElementFileUpload", "richInput":{ "body":{ "messageSegments":[ { "type":"Text", "text":"Check out this file, it may help." } ] }, "capabilities":{ "content":{ "title":"Presentation1.txt" } } } }, { "url":"/v33.0/chatter/feed-elements/0D5D0000000YG0M/capabilities/comments/items", "method":"Post", "binaryPartName":"binaryPart2", "binaryPartNameAlias":"feedElementFileUpload", "richInput":{ "body":{ "messageSegments":[ { "type":"Text", "text":"Check out this file, it may help." } ] }, "capabilities":{ "content":{ "title":"Presentation2.txt" } } } } ] };type=application/json' -F "binaryPart1=@/Users/jbleyle/Desktop/Presentation1.txt;type=application/octet-stream" -F "binaryPart2=@/Users/jbleyle/Desktop/Presentation2.txt;type=application/octet-stream"

145

Chatter REST API Developer Guide

Batch Resource

-X POST https://instance_name/services/data/v41.0/connect/batch -H 'Authorization: OAuth 00DD00000007HoR!...' --insecure

Here is the multipart/form-data request body. https://instance_name/services/data/v41.0/connect/batch Authorization: OAuth 00DD0000000Jhd2!... Accept: application/json Host: instance_name Content-Type: multipart/form-data; boundary=123123 --123123 Content-Disposition: form-data; name="json" Content-Type: application/json { "haltOnError":true, "batchRequests":[ { "url":"/v41.0/chatter/feed-elements/0D5D0000000YG0D/capabilities/comments/items", "method":"Post", "binaryPartName":"binaryPart1", "binaryPartNameAlias":"feedElementFileUpload", "richInput":{ "body":{ "messageSegments":[ { "type":"Text", "text":"Check out this file, it may help." } ] }, "capabilities":{ "content":{ "title":"Presentation1.txt" } } } }, { "url":"/v41.0/chatter/feed-elements/0D5D0000000YG0H/capabilities/comments/items", "method":"Post", "binaryPartName":"binaryPart2", "binaryPartNameAlias":"feedElementFileUpload", "richInput":{ "body":{ "messageSegments":[ { "type":"Text", "text":"Check out this file, it may help." }

146

Chatter REST API Developer Guide

Chatter Resources

] }, "capabilities":{ "content":{ "title":"Presentation2.txt" } } } } ] }

--123123 Content-Disposition: form-data; name="binaryPart1"; filename="Presentation1.txt" Content-Type: application/octet-stream; charset=ISO-8859-1 Content-Transfer-Encoding: binary This is the content of file 1 --123123 Content-Disposition: form-data; name="binaryPart2"; filename="Presentation2.txt" Content-Type: application/octet-stream; charset=ISO-8859-1 Content-Transfer-Encoding: binary This is the content of file 2 --123123--

SEE ALSO: Like a Feed Item and Return the Total Number of Likes Feed Elements, Batch Post

Chatter Resources Get a directory of Chatter feeds, groups, and users resources. Control when Chatter email digests are sent. Get a list of supported emojis. Get extensions. Get information about, update, and delete Chatter streams. Available resources: Resource

Description

/chatter

Get a directory of Chatter feeds, groups, and users resources.

/chatter/digests

Control when daily and weekly Chatter email digests are sent.

/chatter/emojis

Get a list of emojis that are supported in the org.

/chatter/extensions

Get extensions.

/chatter/streams

Get or search a list of Chatter feed streams for the context user. Create a Chatter feed stream.

/chatter/streams/streamId

Get information about, update, or delete a Chatter feed stream.

147

Chatter REST API Developer Guide

Chatter Resources

Chatter Directory Get a directory of Chatter feeds, groups, and users resources. Resource /chatter /connect/communities/communityId/chatter

Available since version 23.0 Requires Chatter No HTTP methods GET or HEAD Response body Chatter Directory Example response body { "feeds": "/services/data/v41.0/chatter/feeds", "groups": "/services/data/v41.0/chatter/groups", "users": "/services/data/v41.0/chatter/users" }

Chatter Digests Control when daily and weekly Chatter email digests are sent. The times when Chatter sends email digests are not configurable in the UI. To control when email digests are sent and to use this resource, contact Salesforce to enable API-only Chatter Digests. Warning: Enabling API-only Chatter Digests disables the scheduled digests for your org. You must call the API for your users to receive their digests. Resource /chatter/digests

Available version 37.0 Requires Chatter Yes HTTP methods POST Request body for POST Root XML tag

148

Chatter REST API Developer Guide

Chatter Resources

JSON example { "period":"DailyDigest" }

Properties Name

Type

Description

Required or Optional

period

String

Specifies the period of time that is Required included in a Chatter email digest. Values are:

Available Version 37.0

• DailyDigest—The email includes up to the 50 latest posts from the previous day. • WeeklyDigest—The email includes up to the 50 latest posts from the previous week.

Request parameters for POST Parameter Name

Type

Description

Required or Optional

period

String

Specifies the period of time that is included Required in a Chatter email digest. Values are: • DailyDigest—The email includes up to the 50 latest posts from the previous day. • WeeklyDigest—The email includes up to the 50 latest posts from the previous week.

Response body for POST Digest Job

Emojis Get a list of emojis that are supported in the org. To get the list, emojis must be enabled in your org. Resource /chatter/emojis

149

Available Version 37.0

Chatter REST API Developer Guide

Chatter Resources

Available version 39.0 Requires Chatter Yes HTTP methods GET Response body for GET Supported Emojis

Chatter Extensions Get extensions. Resource /chatter/extensions /connect/communities/communityId/chatter/extensions

Available version 40.0 Requires Chatter Yes HTTP methods GET Request parameters for GET Parameter Name

Type

Description

Required or Optional

page

String

Specifies the page token to be used to Optional view a page of information. Page tokens are returned as part of the response class, such as currentPageToken or nextPageToken. If you pass in null, the first page is returned.

40.0

pageSize

Integer

Specifies the number of items per page. Valid values are from 1 through 100. The default size is 15.

40.0

Optional

Response body for GET Extension Definition Collection

Chatter Feed Streams Get or search a list of Chatter feed streams for the context user. Create a Chatter feed stream.

150

Available Version

Chatter REST API Developer Guide

Chatter Resources

Resource /chatter/streams /connect/communities/communityId/chatter/streams

Available version 39.0 Requires Chatter Yes HTTP methods GET, POST Request parameters for GET Parameter Name

Type

Description

globalScope

Boolean

Specifies whether to get streams from all Optional the context user’s communities, regardless of the communityId value.

(pilot)

Required or Optional

Available Version 41.0

Note: We provide the globalScope parameter to selected customers through a pilot program that requires agreement to specific terms and conditions. To be nominated to participate in the program, contact Salesforce. Pilot programs are subject to change, and we can’t guarantee acceptance. The globalScope parameter isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features. If you know the community ID of the streams, we recommend using /connect/communities/communityId /chatter/streams and not using globalScope. page

Integer

Specifies the number of the page you want Optional returned. Starts at 0. If you pass in null or 0, the first page is returned.

151

39.0

Chatter REST API Developer Guide

Chatter Resources

Parameter Name

Type

Description

Required or Optional

pageSize

Integer

Specifies the number of items per page. Optional Valid values are from 1 to 250. The default size is 25.

39.0

q

String

Specifies the string to search. The search Optional string must contain at least two characters, not including wildcards. See Wildcards.

40.0

sort

String

Specifies the sort order. Values are:

Optional

40.0

• Ascending—Items are in ascending alphabetical order (A-Z). • Descending—Items are in descending alphabetical order (Z-A). • MostRecentlyViewed—Items are in descending chronological order by view. This sort order is valid only for Chatter feed streams. If not specified, default value is Ascending.

Response body for GET Chatter Stream Collection Request body for POST Root XML tag

JSON example { "description" : "Feeds from my management hierarchy.", "name" : "Managers Stream", "subscriptionsToAdd" : { "subscriptions" : [ {"entityId" : "00590000000Dk5F"}, {"entityId" : "00590000000Fk4M"}, {"entityId" : "00590000000Sy7N"}, {"entityId" : "00590000000Dk4H"}, {"entityId" : "00590000000Uk7L"} ] } }

152

Available Version

Chatter REST API Developer Guide

Chatter Resources

Properties Name

Type

Description

Required or Optional

Available Version

description

String

Description of the stream, up to 1,000 characters.

Optional

39.0

name

String

Name of the stream, up to 120 characters. Required when creating a stream (POST)

39.0

Optional when updating a stream (PATCH) subscriptions Stream List of up to 25 entities whose feeds are Optional Subscription Input[] included in the stream. ToAdd

39.0

Adding an entity that is already added results in no operation. Including the same entity in subscriptionsToAdd and subscriptionsToRemove results in no operation. subscriptions Stream List of entities whose feeds are removed Optional when Subscription Input[] from the stream. updating a stream ToRemove

Removing an entity that is already removed results in no operation. Including the same entity in subscriptionsToAdd and subscriptionsToRemove results in no operation.

39.0

(PATCH) Not supported when creating a stream (POST)

Request parameters for POST Parameter Name

Type

Description

Required or Optional

Available Version

description

String

Description of the stream, up to 1,000 characters.

Optional

39.0

name

String

Name of the stream, up to 120 characters. Required

39.0

Response body for POST Chatter Stream

153

Chatter REST API Developer Guide

Chatter Resources

Chatter Feed Stream Get information about, update, or delete a Chatter feed stream. Resource /chatter/streams/streamId /connect/communities/communityId/chatter/streams/streamId

Available version 39.0 Requires Chatter Yes HTTP methods GET, PATCH, DELETE Request parameters for GET Parameter Name

Type

Description

globalScope

Boolean

Specifies whether to get streams from all Optional the context user’s communities, regardless of the communityId value.

(pilot)

Required or Optional

Note: We provide the globalScope parameter to selected customers through a pilot program that requires agreement to specific terms and conditions. To be nominated to participate in the program, contact Salesforce. Pilot programs are subject to change, and we can’t guarantee acceptance. The globalScope parameter isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features. If you know the community ID of the stream, we recommend using /connect/communities/communityId /chatter/streams/streamId and not using globalScope.

154

Available Version 41.0

Chatter REST API Developer Guide

Chatter Resources

Response body for GET Chatter Stream Request body for PATCH Root XML tag

JSON example { "description" : "Feeds from my management hierarchy.", "name" : "Managers Stream", "subscriptionsToAdd" : { "subscriptions" : [ {"entityId" : "00590000000Dk5F"}, {"entityId" : "00590000000Fk4M"}, {"entityId" : "00590000000Sy7N"}, {"entityId" : "00590000000Dk4H"}, {"entityId" : "00590000000Uk7L"} ] } }

Properties Name

Type

Description

Required or Optional

Available Version

description

String

Description of the stream, up to 1,000 characters.

Optional

39.0

name

String

Name of the stream, up to 120 characters. Required when creating a stream (POST)

39.0

Optional when updating a stream (PATCH) subscriptions Stream List of up to 25 entities whose feeds are Optional Subscription Input[] included in the stream. ToAdd

Adding an entity that is already added results in no operation. Including the same entity in subscriptionsToAdd and subscriptionsToRemove results in no operation.

155

39.0

Chatter REST API Developer Guide

Name

Comments Resources

Type

Description

Required or Optional

subscriptions Stream List of entities whose feeds are removed Optional when Subscription Input[] from the stream. updating a stream ToRemove

Removing an entity that is already removed results in no operation. Including the same entity in subscriptionsToAdd and subscriptionsToRemove results in no operation.

Available Version 39.0

(PATCH) Not supported when creating a stream (POST)

Request parameters for PATCH Name

Type

Description

Required or Optional

Available Version

description

String

Description of the stream, up to 1,000 characters.

Optional

39.0

name

String

Name of the stream, up to 120 characters. Optional

39.0

Response body for PATCH Chatter Stream Response body for DELETE 204: Successful Delete

Comments Resources Get information about, edit, like, or delete a comment. Determine whether the context user can edit a comment. Available resources: Resource

Description

/chatter/comments/commentId

Get information about, edit, or delete a comment.

/chatter/comments/commentId/capabilities /edit/is-editable-by-me

Determines whether the context user can edit a comment.

/chatter/comments/commentId/capabilities /status

Access the status capability of a comment or set the status of a comment.

/chatter/comments/commentId/capabilities /up-down-vote

Get the up and down votes for a comment. Vote a comment up or down.

/chatter/comments/commentId/capabilities /verified

Get the verified status of a comment. Mark a comment as verified or unverified.

156

Chatter REST API Developer Guide

Comments Resources

Resource

Description

/chatter/comments/commentId/likes

Get information about the likes for a comment. Like or unlike a comment.

Comment Get information about, edit, or delete a comment. Resource /chatter/comments/commentId /connect/communities/communityId/chatter/comments/commentId

Available since version 23.0 Requires Chatter Yes HTTP methods GET, DELETE, PATCH PATCH is supported in version 34.0 and later. Request body for PATCH Root XML tag

Properties Name

Type

Description

Available Version

attachment

Depends on type.

Optional. Values are:

24.0–31.0

• Attachment Input: Existing Content • Attachment Input: New File Upload Important: As of version 32.0, use the capabilities property. body

Message Body Input

The body of the comment. Feed item and comment bodies have a 10,000 character limit. Because this limit can change, we recommend that clients make a describeSObjects() call on the FeedItem or FeedComment object. To determine the maximum number of allowed characters, look at the length of the Body or CommentBody field. To edit this property in a comment, make a PATCH request to

157

23.0

Chatter REST API Developer Guide

Name

Comments Resources

Type

Description

Available Version

/chatter/comments/commentId. Editing comments is supported in version 34.0 and later.

Rich text and inline images are supported in comment bodies in version 35.0 and later. capabilities

Comment Capabilities Input

Capabilities of the comment, such as a file attachment

32.0

Response body for GET and PATCH Comment Example for getting information about a comment You can find the ID for a specific comment from any feed, such as a news feed or a record feed. /chatter/comments/0D7D00000000NtkKAE

Example for editing a comment using the request body {

"body":{ "messageSegments":[ { "type":"Text", "text":"I am definitely going to check that out." } ] }

}

Comment Capability, Editability Determines whether the context user can edit a comment. Resource /chatter/comments/commentId/capabilities/edit/is-editable-by-me /connect/communities/communityId/chatter/comments/commentId/capabilities/edit/is-editable-by-me

Available since version 34.0 Requires Chatter Yes HTTP methods GET Response body for GET Feed Entity Is Editable If the comment doesn’t support this capability, the response is 404: Not Found.

158

Chatter REST API Developer Guide

Comments Resources

Comment Likes Get information about the likes for a comment. Like or unlike a comment. Resource /chatter/comments/commentId/likes /connect/communities/communityId/chatter/comments/commentId/likes

Available since version 23.0 Requires Chatter Yes HTTP methods GET, PATCH, POST PATCH is supported in version 39.0 and later. Request parameters for GET Parameter Name

Type

Description

page

Integer

Specifies the number of the page you want returned.

pageSize

Integer

Specifies the number of items per page. Valid values are from 1 through 100. If you don't specify a size, the default is 25.

Required or Optional

Response body for GET Like Page Request parameters for PATCH Parameter Name

Type

Description

isLikedBy CurrentUser

Boolean

Specifies whether the context user likes Required (true) or unlikes (false) the comment.

Response body for PATCH Like Page Request parameters for POST Note: POST takes no request parameters, nor a request body. Response body for POST Like

159

Available Version 39.0

Chatter REST API Developer Guide

Comments Resources

IN THIS SECTION: Comment Capability, Status Access the status capability of a comment or set the status of a comment. Comment Capability, Up Down Vote Get the up and down votes for a comment. Vote a comment up or down. Comment Capability, Verified Get the verified status of a comment. Mark a comment as verified or unverified. SEE ALSO: Edit a Comment

Comment Capability, Status Access the status capability of a comment or set the status of a comment. Resource /chatter/comments/commentId/capabilities/status /connect/communities/communityId/chatter/comments/commentId/capabilities/status

Available version 38.0 Requires Chatter Yes HTTP methods GET, PATCH Response body for GET Status Capability If the comment doesn’t support this capability, the response is 404: Not Found. Request body for PATCH Root XML tag statusCapability

JSON example { "feedEntityStatus":"Published" }

160

Chatter REST API Developer Guide

Comments Resources

Properties Name

Type

feedEntityStatus String

Description

Required or Optional

Available Version

Specifies the status of the feed post or comment. Values are:

Required

37.0

• PendingReview—The feed post or comment isn’t approved yet and therefore isn’t published or visible. • Published—The feed post or comment is approved and visible.

Request parameters for PATCH Parameter Name

Type

feedEntityStatus String

Description

Required or Optional

Available Version

Specifies the status of the feed post or comment. Values are:

Required

38.0

• PendingReview—The feed post or comment isn’t approved yet and therefore isn’t published or visible. • Published—The feed post or comment is approved and visible.

Response body for PATCH Status Capability If the comment doesn’t support this capability, the response is 404: Not Found.

Comment Capability, Up Down Vote Get the up and down votes for a comment. Vote a comment up or down. Resource /chatter/comments/commentId/capabilities/up-down-vote /connect/communities/communityId/chatter/comments/commentId/capabilities/up-down-vote

Available version 41.0 Requires Chatter Yes HTTP methods GET, PATCH

161

Chatter REST API Developer Guide

Comments Resources

Request body for PATCH Root XML tag

JSON example { "vote":"Up" }

Properties Name

Type

Description

Required or Optional

vote

String

Specifies the value of the vote for a feed Required element or comment. Values are:

Available Version 41.0

• Down • None • Up

Request parameters for PATCH Parameter Name

Type

Description

Required or Optional

Available Version

vote

String

Specifies the value of the vote for a feed element or comment. Values are:

Required

41.0

• Down • None • Up

Response body for GET and PATCH Up Down Vote Capability If the comment doesn’t support this capability, the response is 404: Not Found.

Comment Capability, Verified Get the verified status of a comment. Mark a comment as verified or unverified. Resource /chatter/comments/commentId/capabilities/verified /connect/communities/communityId/chatter/comments/commentId/capabilities/verified

The commentId must be the ID of a comment on a question post. Only one comment on a question post can be marked as verified.

162

Chatter REST API Developer Guide

Communities Resources

Available version 41.0 Requires Chatter Yes HTTP methods GET, PATCH Request body for PATCH Root XML tag

JSON example { "isVerified": "true" }

Properties Name

Type

Description

Required or Optional

isVerified

Boolean

Specifies whether to mark the comment Required as verified (true) or unverified (false).

Available Version 41.0

Only verified comments can be marked as unverified, and only unverified comments can be marked as verified.

Request parameters for PATCH Parameter Name

Type

Description

Required or Optional

isVerified

Boolean

Specifies whether to mark the comment Required as verified (true) or unverified (false). Only verified comments can be marked as unverified, and only unverified comments can be marked as verified.

Response body for GET and PATCH Verified Capability If the comment doesn’t support this capability, the response is 404: Not Found.

Communities Resources Information about the communities available to the context user, or information about a specific community. Available resources are:

163

Available Version 41.0

Chatter REST API Developer Guide

Communities Resources

Resource

Description

/connect/communities

Returns a list of all communities available to the context user.

/connect/communities/communityId

Returns information about the specified community.

List of Communities Returns a list of all communities available to the context user. If the user is an administrator, returns a list of all communities that meet the filter criteria. If the user is not an administrator, returns a list of all active communities that meet the filter criteria. Resource /connect/communities

Available since release 28.0 Requires Chatter No HTTP methods GET or HEAD Request parameters Name

Type

Description

status

String

Returns only communities with 28.0 the specified status. Valid values are: • Live • Inactive • UnderConstruction Only users with the Manage Network permission enabled can see communities with an Inactive status. This parameter is optional.

Response body Community Page

Community Information Returns information about the specified community. Resource /connect/communities/communityId

164

Available Version

Chatter REST API Developer Guide

Communities Knowledge Resources

To access resources that are part of a specified community, insert this segment into the URL after the version information and before the resource you want to access. For example, to access a news feed resource in a community, use this URL: https://instance_name/services/data/v41.0/connect /communities/communityId/chatter/feeds/news/me/feed-elements

See Build the Resource URL on page 5 for more information. Available since release 26.0 Requires Chatter No HTTP methods GET or HEAD Response body Community

Communities Knowledge Resources Information about trending articles in a community. Available resources are: Resource

Description

/connect/communities/communityId/ trending-articles

Get trending articles for a community.

/connect/communities/communityId/ topics/topicId/trending-articles

Get trending articles for a topic in a community.

/connect/communities/communityId/ topics/topicId/top-viewed-articles

Get the top viewed articles for a topic in a community.

Community Trending Articles Get trending articles for a community. Resource /connect/communities/communityId/trending-articles

Available version 36.0 Requires Chatter No HTTP methods GET

165

Chatter REST API Developer Guide

Communities Knowledge Resources

Request parameters for GET Parameter Name

Type

Description

Required or Optional

maxResults

Integer

The maximum number of articles returned. Optional Values can be from 0 to 25. Default is 5.

Available Version 36.0

Response body for GET Knowledge Article Version Collection

Community Trending Articles for a Topic Get trending articles for a topic in a community. Resource /connect/communities/communityId/topics/topicId/trending-articles

Available version 36.0 Requires Chatter No HTTP methods GET Request parameters for GET Parameter Name

Type

Description

Required or Optional

maxResults

Integer

The maximum number of articles returned. Optional Values can be from 0 to 25. Default is 5.

Response body for GET Knowledge Article Version Collection

Top Viewed Articles for a Topic Get the top viewed articles for a topic in a community. Resource /connect/communities/communityId/topics/topicId/top-viewed-articles /connect/topics/topicId/top-viewed-articles

Available version 41.0

166

Available Version 36.0

Chatter REST API Developer Guide

Communities Moderation Resources

Requires Chatter No HTTP methods GET Request parameters for GET Parameter Name

Type

Description

Required or Optional

maxResults

Integer

The maximum number of articles returned Optional for each topic ID. Values can be from 1 to 25. The default value is 5.

Available Version 41.0

Response body for GET Knowledge Article Version Collection

Communities Moderation Resources Information about whether a user has flagged a feed element, comment, or file as inappropriate. Also used to delete flags. Available resources are: Resource

Description

/connect/communities/communityId/ chatter/feed-elements/feedElementId/ capabilities/moderation

Get information about a feed element's moderation capability, add a moderation flag to a feed element, or delete all moderation flags from a feed element.

/connect/communities/communityId/ If the context user is a community moderator, get the number of chatter/comments/commentId/moderation-flags times community members flagged a comment. Also flag a

comment for moderation and delete all flags on a comment. If the context user isn’t a community moderator, returns whether the user flagged a comment. Also flag a comment for moderation and remove a flag the user previously added. /connect/communities/communityId/ files/moderation

Files that are flagged in a community.

/connect/communities/communityId/ files/fileId/moderation-flags

If the context user is a community moderator, get the number of times community members flagged a file. Also flag a file for moderation and delete all flags on a file.

If the context user is a community moderator, get the files that community members flagged.

If the context user isn’t a community moderator, get whether the user flagged a file. Also flag a file for moderation and remove a flag the user previously added. /connect/communities/communityId/ Get audit statistics for a user in a community. chatter/users/userId/audit-actions/counts

167

Chatter REST API Developer Guide

Communities Moderation Resources

Moderation Flags on Posts If the context user is a community moderator with the Moderate Communities Feeds permission, get the number of times community members flagged a post. Also flag a post for moderation and delete all flags on a post. If the context user isn’t a community moderator, get whether the user flagged a post. Also flag a post for moderation and remove a flag the user previously added. Resource /connect/communities/communityId/chatter/feed-items/feedItemId/moderation-flags

Available versions 29.0–31.0 Important: In version 32.0 and later, use Feed Elements Capability, Moderation. Requires Chatter Yes HTTP methods GET, DELETE, HEAD, POST Request parameters for GET Name

Type

Description

Required or Optional

Available Version

visibility

String

Specifies the visibility behavior of a flag for various user types.

Optional

30.0–31.0

• ModeratorsOnly—The flag is visible only to users with moderation permissions on the flagged element or item. • SelfAndModerators—The flag is visible to the creator of the flag and to users with moderation permissions on the flagged element or item.

Request body for POST Root XML tag

JSON { "note" : "Flagged by moderator as spam on 6.6.16.", "type" : "FlagAsSpam", "visibility" : "ModeratorsOnly" }

168

Chatter REST API Developer Guide

Communities Moderation Resources

Properties Name

Type

Description

Required or Optional

note

String

A note of up to 4,000 characters about the Optional flag.

38.0

type

String

Specifies the type of moderation flag.

38.0

Optional

Available Version

• FlagAsInappropriate—Flag If not specified, FlagAs for inappropriate content. • FlagAsSpam—Flag for spam.

Inappropriate is

the default value. String

visibility

Specifies the visibility behavior of a flag for various user types.

Optional

30.0

• ModeratorsOnly—The flag is visible only to users with moderation permissions on the flagged element or item. • SelfAndModerators—The flag is visible to the creator of the flag and to users with moderation permissions on the flagged element or item.

Request parameters for POST Name

Type

Description

Required or Optional

Available Version

visibility

String

Specifies the visibility behavior of a flag for various user types.

Optional

30.0–31.0

• ModeratorsOnly—The flag is visible only to users with moderation permissions on the flagged element or item. • SelfAndModerators—The flag is visible to the creator of the flag and to users with moderation permissions on the flagged element or item.

Request parameters for DELETE Name

Type

Description

Required or Optional

userId

String

The ID of the context user. If specified, removes the flag the user Optional previously added to the post. If not specified and the context user is a moderator for the community, removes all flags on the post.

169

Available Version 29.0–31.0

Chatter REST API Developer Guide

Communities Moderation Resources

Response body for GET and POST Moderation Flags

Moderation Flags on Comments If the context user is a community moderator, get the number of times community members flagged a comment. Also flag a comment for moderation and delete all flags on a comment. If the context user isn’t a community moderator, returns whether the user flagged a comment. Also flag a comment for moderation and remove a flag the user previously added. Resource /connect/communities/communityId/chatter/comments/commentId/moderation-flags

Available since release 29.0 Requires Chatter Yes HTTP methods GET, DELETE, HEAD, POST Request parameters for GET Name

Type

Description

Required or Optional

page

String

Specifies the page token to be used to view a page of information. Optional Page tokens are returned as part of the response class, such as currentPageToken or nextPageToken. If you pass in null, the first page is returned.

40.0

pageSize

Integer

Specifies the number of items per page. Valid values are from 1 through 100. The default size is 0.

Optional

40.0

visibility

String

Specifies the visibility behavior of a flag for various user types.

Optional

30.0

• ModeratorsOnly—The flag is visible only to users with moderation permissions on the flagged element or item. • SelfAndModerators—The flag is visible to the creator of the flag and to users with moderation permissions on the flagged element or item.

Request body for POST Root XML tag

JSON { "note" : "Flagged by moderator as spam on 6.6.16.",

170

Available Version

Chatter REST API Developer Guide

Communities Moderation Resources

"type" : "FlagAsSpam", "visibility" : "ModeratorsOnly" }

Properties Name

Type

Description

Required or Optional

note

String

A note of up to 4,000 characters about the Optional flag.

38.0

type

String

Specifies the type of moderation flag.

38.0

Optional

Available Version

• FlagAsInappropriate—Flag If not specified, FlagAs for inappropriate content. • FlagAsSpam—Flag for spam.

Inappropriate is

the default value. String

visibility

Specifies the visibility behavior of a flag for various user types.

Optional

30.0

• ModeratorsOnly—The flag is visible only to users with moderation permissions on the flagged element or item. • SelfAndModerators—The flag is visible to the creator of the flag and to users with moderation permissions on the flagged element or item.

Request parameters for POST Name

Type

Description

Required or Optional

Available Version

note

String

A note of up to 4,000 characters about the flag.

Optional

38.0

type

String

Specifies the type of moderation flag.

Optional

38.0

• FlagAsInappropriate—Flag for inappropriate content. If not specified, • FlagAsSpam—Flag for spam. If a type isn’t specified, it defaults to FlagAsInappropriate.

FlagAs Inappropriate

is the default value. visibility

String

Specifies the visibility behavior of a flag for various user types. • ModeratorsOnly—The flag is visible only to users with moderation permissions on the flagged element or item.

171

Optional

30.0

Chatter REST API Developer Guide

Name

Type

Communities Moderation Resources

Description

Required or Optional

Available Version

Required or Optional

Available Version

• SelfAndModerators—The flag is visible to the creator of the flag and to users with moderation permissions on the flagged element or item.

Request parameters for DELETE Name

Type

Description

userId

String

The ID of the context user. If specified, removes the flag the user Optional previously added to the comment. If not specified and the context user is a moderator for the community, removes all flags on the comment.

29.0

Response body for GET and POST Moderation Flags

Moderation Flags on Files If the context user is a community moderator, get the number of times community members flagged a file. Also flag a file for moderation and delete all flags on a file. If the context user isn’t a community moderator, get whether the user flagged a file. Also flag a file for moderation and remove a flag the user previously added. Resource /connect/communities/communityId/files/fileId/moderation-flags

Available since release 36.0 In versions 30.0–35.0, use /connect/communities/communityId/chatter/files/fileId/moderation-flags.

Requires Chatter No HTTP methods GET, DELETE, HEAD, POST

172

Chatter REST API Developer Guide

Communities Moderation Resources

Request parameters for GET Name

Type

Description

Required or Optional

Available Version

page

String

Specifies the page token to be used to view a page of information. Optional Page tokens are returned as part of the response class, such as currentPageToken or nextPageToken. If you pass in null, the first page is returned.

40.0

pageSize

Integer

Specifies the number of items per page. Valid values are from 1 through 100. The default size is 0.

Optional

40.0

visibility

String

Specifies the visibility behavior of a flag for various user types.

Optional

30.0

• ModeratorsOnly—The flag is visible only to users with moderation permissions on the flagged element or item. • SelfAndModerators—The flag is visible to the creator of the flag and to users with moderation permissions on the flagged element or item.

Request body for POST Root XML tag

JSON { "note" : "Flagged by moderator as spam on 6.6.16.", "type" : "FlagAsSpam", "visibility" : "ModeratorsOnly" }

Properties Name

Type

Description

Required or Optional

note

String

A note of up to 4,000 characters about the Optional flag.

38.0

type

String

Specifies the type of moderation flag.

38.0

Optional

• FlagAsInappropriate—Flag If not specified, FlagAs for inappropriate content. • FlagAsSpam—Flag for spam.

Inappropriate is

the default value.

173

Available Version

Chatter REST API Developer Guide

Communities Moderation Resources

Name

Type

Description

Required or Optional

Available Version

visibility

String

Specifies the visibility behavior of a flag for various user types.

Optional

30.0

• ModeratorsOnly—The flag is visible only to users with moderation permissions on the flagged element or item. • SelfAndModerators—The flag is visible to the creator of the flag and to users with moderation permissions on the flagged element or item.

Request parameters for POST Name

Type

Description

Required or Optional

Available Version

note

String

A note of up to 4,000 characters about the flag.

Optional

38.0

type

String

Specifies the type of moderation flag.

Optional

38.0

• FlagAsInappropriate—Flag for inappropriate content. If not specified, • FlagAsSpam—Flag for spam. FlagAs Inappropriate

is the default value. visibility

String

Specifies the visibility behavior of a flag for various user types.

Optional

30.0

• ModeratorsOnly—The flag is visible only to users with moderation permissions on the flagged element or item. • SelfAndModerators—The flag is visible to the creator of the flag and to users with moderation permissions on the flagged element or item.

Request parameters for DELETE Name

Type

Description

Required or Optional

Available Version

userId

String

The ID of the context user. If specified, removes the flag the user previously added to the file. If not specified and the context user is a moderator for the community, removes all flags on the file.

Optional

30.0

174

Chatter REST API Developer Guide

Communities Moderation Resources

Response body for GET and POST Moderation Flags

Flagged Files Files that are flagged in a community. If the context user is a community moderator, get the files that community members flagged. Resource /connect/communities/communityId/files/moderation

Available since release 36.0 In version 30.0–35.0, use /connect/communities/communityId/chatter/files/moderation. Requires Chatter No HTTP methods GET, HEAD Request parameters for GET Name

Type

Description

Required or Optional

Available Version

page

Integer

Specifies the number of the page you want returned.

Optional

30.0

pageSize

Integer

Specifies the number of items per page. Valid values are from 1 through 100. If you don't specify a size, the default is 25.

Optional

30.0

q

String

A query string to filter the results. The string must contain at least Optional two characters, not including wildcards. For information about wildcards, see Wildcards.

33.0

Response body File Summary IN THIS SECTION: Communities Moderation User Audit Statistics Get audit statistics for a user in a community.

Communities Moderation User Audit Statistics Get audit statistics for a user in a community. Resource /connect/communities/communityId/chatter/users/userId/audit-actions/counts

175

Chatter REST API Developer Guide

Connect Resources

Available version 40.0 Requires Chatter No HTTP methods GET Response body for GET Moderation Audit Record Count

Connect Resources Information about the context user’s organization and settings, and information about the communities the context user is a member of. Note: These resources have the base URL of /services/data/v41.0/connect, not /services/data/v41.0/chatter. Available resources are: Resource

Description

/connect

A directory of the organization and community resources available to the context user.

/connect/organization

Information about the context user’s organization and settings.

/connect/communities

Returns a list of all communities available to the context user.

Connect A directory of the organization and community resources available to the context user. Resource /connect

Available since version 24.0 Requires Chatter No HTTP methods GET and HEAD Response body Connect Directory

Organization Information about the context user’s organization and settings.

176

Chatter REST API Developer Guide

Content Workspace Permissions Resource

Resource /connect/organization

Available since version 24.0 Requires Chatter No HTTP methods GET or HEAD Response body Organization SEE ALSO: News Feed Resources

Content Workspace Permissions Resource Get a user's permissions for a content workspace. Resource /connect/content/workspace/workspaceId/permissions/userId

Available version 39.0 Requires Chatter No HTTP methods GET Response body for GET Workspace Permission

Dashboard Component Snapshot Resource A snapshot of a dashboard component. Use this resource to post a snapshot of a dashboard component to a user, group, or dashboard feed to help other users follow changes in the data. Resource /connect/dashboards/components/componentId/snapshots

Available since version 25.0 Requires Chatter Yes

177

Chatter REST API Developer Guide

Dashboard Component Snapshot Resource

HTTP methods POST Request body Root XML tag

JSON { "parentId" : "0F9D00000000I4O", "feedItemBody" : { "messageSegments" : [ { "text" : "Sales Heat", "type" : "Text" } ] } }

Properties Name

Type

Description

Available Version

parentId

String

A user, group, or dashboard ID to 25.0 which you are posting the snapshot.

filterId1

String

Optional. A dashboard filter item ID. 25.0

filterId2

String

Optional. A second dashboard filter 25.0 item ID.

filterId3

String

Optional. A third dashboard filter item ID.

feedItemBody

Message Body Input Contains the text that accompanies 25.0 the feed item associated with the dashboard component snapshot.

runningUserId

String

25.0

Optional. A user ID from which the 25.0 view of the dashboard will be created, if other than the creator.

Request parameters Name

Type

Description

parentId

String

A user, group, or dashboard Id to which you are posting the snapshot.

filterId1

String.

Optional. A dashboard filter item Id.

filterId2

String

Optional. A second dashboard filter item Id.

178

Chatter REST API Developer Guide

Datacloud Resources

Name

Type

Description

filterId3

String

Optional. A third dashboard filter item Id.

feedItemText

String

Text that accompanies the dashboard component snapshot.

runningUserId

String

Optional. A user Id from which the view of the dashboard will be created, if other than the creator.

Response body API versions 23.0-31.0 return: Feed Item Attachment: Dashboard API versions 32.0 and later return: Dashboard Component Snapshot

Datacloud Resources Information about Datacloud resources used to purchase Data.com contacts or companies. Use the Datacloud resources to purchase Data.com contacts or companies and get information about your purchases, including how many credits are available for your use. You can also add contacts to selected companies or import contacts to your CRM. Available resources are: Resource

Description

/connect/datacloud/companies/companyId

Returns company information.

/connect/datacloud/contacts/contactId

Returns the contact information for the specified contact.

/connect/datacloud/contact-imports

Import records as contacts or leads.

/connect/datacloud/orders/orderId/companies Returns all the order information about all companies . /connect/datacloud/orders/orderId/contacts Returns all the order information for a specific order for contacts. /connect/datacloud/orders

Purchases the contacts or companies for the listed IDs.

/connect/datacloud/usage/userId

Returns usage information for a Monthly user or a Listpool user.

Datacloud Company Information Returns company information. Resource /connect/datacloud/companies/companyId

Available version 32.0 Requires Chatter No HTTP methods GET

179

Chatter REST API Developer Guide

Datacloud Resources

Response Body Datacloud Company

Datacloud Contact Information Returns the contact information for the specified contact. Resource /connect/datacloud/contacts/contactId

Available version 32.0 Requires Chatter No HTTP methods GET Response body Datacloud Contact

Datacloud Contact Import Import records as contacts or leads. Resource /connect/datacloud/contact-imports

Available version 36.0 Requires Chatter No HTTP methods POST Request body for POST The POST request can have contact IDs. Root XML tag

JSON Example Add Contact To add the records as contacts, include a parentAccountId. { "datacloudContactIds": [ 10344600,42701050,45995423 ], "parentAccountId":"09KR00000004C9rMAE" }

180

Chatter REST API Developer Guide

Datacloud Resources

JSON Example Add Lead Without a parentAccountId, the records are added as leads. { "datacloudContactIds": [ 10344600,42701050,45995423 ] }

Properties Name

Type

Description

Required or Optional

Available Version

datacloudContactIds

String[]

A list of the contactIds to Required import. There can be from 1 up to 200 contactIds in a comma-separated list. Requests with more than 200 contacts fail.

36.0

parentAccountId

String

The accountId for the selected Optional account that is in your organization.

36.0

Response body for POST Datacloud Import

Datacloud OrderId Information Returns information for an order. Order information includes the orderId, the number of purchased records for the orderId, the URL for the order information, and the URL for a list of the purchased records. Resource /connect/datacloud/orders/orderId

Available version 32.0 Requires Chatter No HTTP methods GET Response body Datacloud Order

Datacloud Company Order Information Returns all the order information about all companies . Order information includes the orderId, the number of purchased records for the order, information for the purchased companies, and the URLs for next and previous pages.

181

Chatter REST API Developer Guide

Datacloud Resources

Resource /connect/datacloud/orders/orderId/companies

The orderId must be for purchased companies. A request for a contact orderId fails. Available version 32.0 Requires Chatter No HTTP methods GET Request parameters for GET Parameter Name

Type

Description

Required or Optional

Available Version

page

Integer

The page number to be set as the URL for Required the current page.

32.0

pageSize

Integer

The number of the page that you want Optional returned. The default page size is set to 25.

32.0

Response body for GET Datacloud Company Collection

Datacloud Contact Order Information Returns all the order information for a specific order for contacts. Order information includes the orderId, the number of purchased records for the orderId, the URL for the order information, and details for the purchased contacts. Resource /connect/datacloud/orders/orderId/contacts

The orderId must be for purchased contacts. A request with an orderId for purchased companies fails. Available version 32.0 Requires Chatter No HTTP methods GET

182

Chatter REST API Developer Guide

Datacloud Resources

Request parameters for GET Parameter Name

Type

Description

Required or Optional

Available Version

page

Integer

The number of the page that you want returned.

Optional

32.0

pageSize

Integer

The number of contacts you want returned Optional on each page. The default page size is 25.

32.0

Response body for GET Datacloud Contact Collection

Datacloud Orders Purchases the contacts or companies for the listed IDs. Resource /connect/datacloud/orders

Available version 32.0 Requires Chatter No HTTP methods POST Request body for POST The POST request can have either contact IDs or company IDs, not both. Root XML tag

JSON example { "companyIds":[ "23456", "24548" ], "userType":"Monthly" }

Properties Name

Type

companyIds String

Description

Required or Optional

The list of companies to purchase. If contactIds Required to are included with companyIds, your purchase fails. purchase companies

183

Available Version 32.0

Chatter REST API Developer Guide

Name

Type

contactIds String

userType

String

Environment Hub Resources

Description

Required or Optional

Available Version

The list of contacts to purchase. If companyIds are Required to purchase included with contactIds, your purchase fails. contacts

32.0

The Data.com user type.

32.0

Optional

• Monthly—A user type that’s assigned monthly point limits for purchasing Data.com records. Only the assigned user can use monthly points. Points expire at the end of the month. Monthly is the default setting for DatacloudUserType. • Listpool—A user type that allows users to draw from a pool of points to purchase Data.com records.

Response body for POST Datacloud Order

Datacloud Usage Returns usage information for a Monthly user or a Listpool user. Resource /connect/datacloud/usage/userId

Available version 32.0 Requires Chatter No HTTP methods GET Response body Datacloud Purchase Usage

Environment Hub Resources Use Environment Hub resources to create new orgs and connect existing orgs to the hub. Available resources: Resource

Description

/connect/environment-hub/my-domain-validation/myDomain Validates that the specified My Domain value is available, valid,

and unique. To enable single sign-on or connect existing organizations to Environment Hub, you need to set up and deploy My Domain.

184

Chatter REST API Developer Guide

Resource

Environment Hub Resources

Description

/connect/environment-hub/oauth-url-generator/username Generates the URL used to initiate the OAuth workflow that

connects an org to the Environment Hub. /connect/environment-hub/signup-member-validation/username Validates the input parameters used to initiate an org sign-up in

the Environment Hub. /connect/environment-hub/sso-user-mappings/hubMemberId Creates an SSO mapping between an Environment Hub user and

a user in a hub member org. An SSO user mapping lets the Environment Hub user log in as the mapped user in the member org without having to re-authenticate.

IN THIS SECTION: Environment Hub My Domain Validation Validates that the specified My Domain value is available, valid, and unique. To enable single sign-on or connect existing organizations to Environment Hub, you need to set up and deploy My Domain. Environment Hub Sign-up Member Validation Validates the input parameters used to initiate an org sign-up in the Environment Hub. Environment Hub OAuth URL Generator Generates the URL used to initiate the OAuth workflow that connects an org to the Environment Hub. Environment Hub SSO User Mapping Generator Creates an SSO mapping between an Environment Hub user and a user in a hub member org. An SSO user mapping lets the Environment Hub user log in as the mapped user in the member org without having to re-authenticate.

Environment Hub My Domain Validation Validates that the specified My Domain value is available, valid, and unique. To enable single sign-on or connect existing organizations to Environment Hub, you need to set up and deploy My Domain. Resource /connect/environment-hub/my-domain-validation/myDomain

myDomain is the subdomain to use for My Domain.

Available version 36.0 Requires Chatter No HTTP methods GET

185

Chatter REST API Developer Guide

Environment Hub Resources

Request parameters for GET Parameter Name

Type

Description

Required or Optional

orgEdition

String

The edition of the org to validate. Possible Optional values are:

Available Version 36.0

• Personal Edition • Contact Manager Edition • Team Edition (for Group Edition) • Professional Edition • Enterprise Edition • Unlimited Edition • Developer Edition

Response body for GET Environment Hub My Domain Validation

Environment Hub Sign-up Member Validation Validates the input parameters used to initiate an org sign-up in the Environment Hub. Resource /connect/environment-hub/signup-member-validation/username

username is the admin username for the org being connected to the Environment Hub.

Available version 36.0 Requires Chatter No HTTP methods GET Request parameters for GET Parameter Name

Type

Description

Required or Optional

Available Version

edition

String

The edition to validate.

Optional

36.0

templateId

String

The template ID to validate.

Optional

36.0

You must specify at least one parameter when you make your request. Response body for GET Environment Hub Sign-up Member Validation

186

Chatter REST API Developer Guide

Environment Hub Resources

Environment Hub OAuth URL Generator Generates the URL used to initiate the OAuth workflow that connects an org to the Environment Hub. Resource /connect/environment-hub/oauth-url-generator/username

username is the admin username for the org being connected to the Environment Hub.

Available version 36.0 Requires Chatter No HTTP methods GET Response body for GET Environment Hub OAuth URL

Environment Hub SSO User Mapping Generator Creates an SSO mapping between an Environment Hub user and a user in a hub member org. An SSO user mapping lets the Environment Hub user log in as the mapped user in the member org without having to re-authenticate. User mappings can be many-to-one but not one-to-many. In other words, you can associate multiple users in the hub org with the same user in a member org. Resource /connect/environment-hub/sso-user-mappings/hubMemberId

Available version 36.0 Requires Chatter No HTTP methods POST Request body for POST Root XML tag

JSON example { "hubUserId":"005B0000000F6SNIA0", "memberUsername":"jeanSmith" }

187

Chatter REST API Developer Guide

Email Merge Field Services Resource

Properties Name

Type

Description

Required or Optional

Available Version

hubUserId

String

The ID of a user in an Environment Hub organization.

Required

36.0

The username of a user in an Required Environment Hub member organization.

36.0

memberUsername String

Request parameters for POST Parameter Name

Type

Description

Required or Optional

Available Version

hubUserId

String

The ID of a user in an Environment Hub organization.

Required

36.0

The username of a user in an Environment Required Hub member organization.

36.0

memberUsername String

Response body for POST Environment Hub SSO User Mapping Validation

Email Merge Field Services Resource See a list of merge fields for a specific object. A merge field is a field you can put in an email template, mail merge template, custom link, or formula to incorporate values from a record. Resource /email-merge-fields

Available version 39.0 Requires Chatter No HTTP methods GET Request parameters for GET Parameter Name

Type

objectApiNames List

Description

Required or Optional

Available Version

The API names for the objects being referenced.

Required

39.0

188

Chatter REST API Developer Guide

External Email Services Resource

Response body for GET Email Merge Field

External Email Services Resource Get information about the external email services available to the context user. Resource /authenticated-email-service

Available version 37.0 Requires Chatter No HTTP methods GET Request parameters for GET Parameter Name

Type

Description

Required or Optional

Available Version

landingPage

String

The landing page that the user starts on when they are finished with the OAuth authorization process.

Required

37.0

Response body for GET OAuth User

Feed Elements Resources Information about feed elements. Access, edit, post, search, and delete feed elements. Access a feed element’s capabilities, including bundles and their feed elements. Available resources: Resource

Description

/chatter/feed-elements

Post feed elements and search all feed elements in an organization.

/chatter/feed-elements/batch

Post a batch of up to 500 feed elements.

/chatter/feed-elements/batch/feedElementIds

Get information about a comma-separated list of up to 500 feed elements. Errors for feed elements that can’t be loaded are returned in the results.

189

Chatter REST API Developer Guide

Feed Elements Resources

Resource

Description

/chatter/feed-elements/feedElementId

Access, edit, or delete a feed element. Feed items are the only type of feed element that can be edited.

/chatter/feed-elements/feedElementId/capabilities

Access a feed element's set of capabilities.

/chatter/feed-elements/feedElementId/capabilities/approval Access the approval capability of a feed

element. Access the associated actions capability of a feed element.

/chatter/feed-elements/feedElementId /capabilities/associated-actions

/chatter/feed-elements/feedElementId/capabilities/banner Access the banner capability of a feed

element. Get information about whether a feed element is bookmarked, or add bookmarks to feed elements.

/chatter/feed-elements/feedElementId /capabilities/bookmarks

/chatter/feed-elements/feedElementId/capabilities/bundle Access the bundle capability of a feed

element. Access all feed elements that are grouped together in a bundle.

/chatter/feed-elements/feedElementId /capabilities/bundle/feed-elements

/chatter/feed-elements/feedElementId/capabilities/canvas Access the canvas capability of a feed

element. /chatter/feed-elements/feedElementId /capabilities/case-comment

Access the case comment capability of a feed element.

/chatter/feed-elements/feedElementId /capabilities/chatter-likes

Access information about the chatter likes capability for a feed element.

/chatter/feed-elements/feedElementId /capabilities/chatter-likes/items

Access a page of likes for a feed element. Like or unlike a feed element.

/chatter/feed-elements/feedElementId/capabilities/comments Access the comments capability for a feed

element Access comments for a feed element, or add a comment to a feed element.

/chatter/feed-elements/feedElementId /capabilities/comments/items

/chatter/feed-elements/feedElementId/capabilities/content Access the content capability of a feed

element. /chatter/feed-elements/feedElementId /capabilities/dashboard-component-snapshot

Access the dashboard component capability of a feed element.

/chatter/feed-elements/feedElementId /capabilities/direct-message

Access the direct message capability of a feed element. Update the members of a direct message.

190

Chatter REST API Developer Guide

Feed Elements Resources

Resource

Description

/chatter/feed-elements/feedElementId /capabilities/direct-message/members

Get all the members for a direct message.

/chatter/feed-elements/feedElementId /capabilities/direct-message/original-members

Get the original members for a direct message.

/chatter/feed-elements/feedElementId /capabilities/direct-message/membership-activity

Get the membership activities for a direct message.

/chatter/feed-elements/feedElementId /capabilities/edit/is-editable-by-me

Indicates whether the context user can edit the feed element. Feed items are the only type of feed element that can be edited.

/chatter/feed-elements/feedElementId /capabilities/email-message

Access the email message capability of a feed element.

/chatter/feed-elements/feedElementId /capabilities/enhanced-link

Access the enhanced link capability of a feed element.

/chatter/feed-elements/feedElementId /capabilities/extensions

Access the extensions capability of a feed element.

/chatter/feed-elements/feedElementId /capabilities/feed-entity-share

Access the feed entity share capability of a feed element.

/chatter/feed-elements/feedElementId/capabilities/link

Access the link capability of a feed element.

/chatter/feed-elements/feedElementId /capabilities/media-references

Access the media references capability of a feed element.

/connect/communities/communityId /chatter/feed-elements/feedElementId /capabilities/moderation

Get information about a feed element's moderation capability, add a moderation flag to a feed element, or delete all moderation flags from a feed element.

/chatter/feed-elements/feedElementId/capabilities/mute

Get information about whether a feed element is muted, or mute or unmute a feed element.

/chatter/feed-elements/feedElementId/capabilities/origin Access the origin capability of a feed

element. If a feed element has this capability, it was created by a feed action. /chatter/feed-elements/feedElementId/capabilities/poll

Access a poll for a feed element, create a poll, or vote on a poll.

/chatter/feed-elements/feedElementId /capabilities/question-and-answers

Access question and answers for a feed element, or update question and answers on a feed element.

/chatter/feed-elements/feedElementId/capabilities/read-by Access the read by capability of a feed

element. Mark a feed element as read for the context user.

191

Chatter REST API Developer Guide

Feed Elements Resources

Resource

Description

/chatter/feed-elements/feedElementId /capabilities/read-by/items

Get information about who read a feed element and when.

/chatter/feed-elements/batch/feedElementIds /capabilities/read-by

Mark multiple feed elements as read by the context user at the same time.

/chatter/feed-elements/feedElementId /capabilities/recommendations

Access the recommendations capability of a feed element.

/chatter/feed-elements/feedElementId /capabilities/record-snapshot

Access the record snapshot capability of a feed element.

/chatter/feed-elements/feedElementId/capabilities/status Access the status capability of a feed post

or set the status of a feed post. /chatter/feed-elements/feedElementId/capabilities/topics Access question and answers for a feed

element, or update question and answers on a feed element. /chatter/feed-elements/feedElementId /capabilities/tracked-changes

Access the tracked changes capability of a feed element.

/chatter/feed-elements/feedElementId /capabilities/up-down-vote

Get the up and down votes for a feed element. Vote a feed element up or down.

/chatter/feed-elements/feedElementId/related-posts

Get questions related to the context question.

Feed Elements, Post and Search Post feed elements and search all feed elements in an organization. Resource /chatter/feed-elements /connect/communities/communityId/chatter/feed-elements

Available version 31.0 Requires Chatter Yes HTTP methods GET, POST Request parameters for GET Parameter Name

Type

Description

page

String

Specifies the page token to be used to Optional view a page of information. Page tokens

192

Required or Optional

Available Version 31.0

Chatter REST API Developer Guide

Parameter Name

Feed Elements Resources

Type

Description

Required or Optional

Available Version

are returned as part of the response class, such as currentPageToken or nextPageToken. If you pass in null, the first page is returned. pageSize

Integer

Specifies the number of feed elements Optional per page. Valid values are from 1 through 100. If you pass in null, the default size is 25.

31.0

q

String

One or more keywords to search for in Required the feed elements visible to the context user. The search string can contain wildcards and must contain at least two characters that aren’t wildcards. See Wildcards.

31.0

The maximum number of comments to Optional return with each feed element. The default value is 3.

31.0

Specifies the order of feed items in the feed.

31.0

recentCommentCount Integer

sort

String

• CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds.

193

Optional

Chatter REST API Developer Guide

Feed Elements Resources

Response body for GET Feed Element Page Request body for POST Feed item and comment bodies have a 10,000 character limit. Because this limit can change, we recommend that clients make a describeSObjects() call on the FeedItem or FeedComment object. To determine the maximum number of allowed characters, look at the length of the Body or CommentBody field. Feed Item Input Request parameters for POST Parameter Name

Type

feedElementType String

Description

Required or Optional

Feed elements are the top-level items that Required a feed contains. Feeds are feed element containers.

Available Version 31.0

The only possible value is FeedItem. originalFeed ElementId

String

If this feed element is shared, the original Optional feed element 18-character ID.

31.0–38.0

Important: In version 39.0 and later, use the Feed Item Input with the nested Feed Entity Share Capability Input. subjectId

String

The ID of the parent this feed element is Required being posted to. This value can be the ID of a user, group, or record, or the string me to indicate the context user.

31.0

text

String

Text of the feed element.

Required

31.0

visibility

String

Specifies the type of users who can see a Optional feed element.

31.0

• AllUsers—Visibility is not limited to internal users. • InternalUsers—Visibility is limited to internal users.

Response body for POST Feed Item Example for posting a feed item using the request body { "body" : { "messageSegments" : [ { "type" : "Text",

194

Chatter REST API Developer Guide

Feed Elements Resources

"text" : "When should we meet for release planning? " }] }, "feedElementType" : "FeedItem", "subjectId" : "005D00000016Qxp" }

Example for posting a feed item with a mention using the request body { "body" : { "messageSegments" : [ { "type" : "Text", "text" : "When should we meet for release planning? " }, { "type" : "Mention", "id" : "005T0000000mzCy" } ] }, "feedElementType" : "FeedItem", "subjectId" : "005D00000016Qxp" }

Example for posting a feed item with multiple mentions using the request body { "body" : { "messageSegments" : [ { "type" : "Text", "text" : "When should we meet for release planning? " }, { "type" : "Mention", "id" : "005T0000000mzCy" }, { "type" : "Text", "text" : " " }, { "type" : "Mention", "id" : "005B0000000Ek1S" } ] }, "feedElementType" : "FeedItem", "subjectId" : "005D00000016Qxp" }

195

Chatter REST API Developer Guide

Feed Elements Resources

Example for posting a feed item with files using the request body { "body":{ "messageSegments":[ { "type":"Text", "text":"Please take a look at these files." } ] }, "capabilities":{ "files":{ "items": [ {"id": "069D00000001IOh"}, {"id": "069D00000002IOg"} ] } }, "subjectId":"me", "feedElementType":"FeedItem" }

Example for posting a rich-text feed item using the request body { "body":{ "messageSegments":[ { "markupType" : "Paragraph", "type" : "MarkupBegin" }, { "markupType" : "Bold", "type" : "MarkupBegin" }, { "text" : "First line of text.", "type" : "Text" }, { "markupType" : "Bold", "type" : "MarkupEnd" }, { "markupType" : "Paragraph", "type" : "MarkupEnd" }, { "markupType" : "Paragraph", "type" : "MarkupBegin" }, { "text" : " ", "type" : "Text"

196

Chatter REST API Developer Guide

Feed Elements Resources

}, { "markupType" : "Paragraph", "type" : "MarkupEnd" }, { "markupType" : "Paragraph", "type" : "MarkupBegin" }, { "text" : "Second line of text.", "type" : "Text" }, { "markupType" : "Paragraph", "type" : "MarkupEnd" } ] }, "subjectId":"me", "feedElementType":"FeedItem" }

Example for posting a feed item with a code block using the request body { "body":{ "messageSegments":[ { "markupType" : "Code", "type" : "MarkupBegin" }, { "text" : "var i, t = 0;\nfor (i = 0; i < 5; i++) {\n i;\n}\n", "type" : "Text" }, { "markupType" : "Code", "type" : "MarkupEnd" } ] }, "subjectId":"me", "feedElementType":"FeedItem" }

Example for posting a feed item with an inline image using the request body { "body":{ "messageSegments":[ { "type":"Text", "text":"Please take a look at this file."

197

t +=

Chatter REST API Developer Guide

Feed Elements Resources

}, { "type":"InlineImage", "fileId":"069xx00000000QO", "altText":"API Spec" }, { "type":"Text", "text":"And this one." }, { "type":"InlineImage", "fileId":"069xx00000000QT", "altText":"REST API Spec" } ] }, "subjectId":"me", "feedElementType":"FeedItem" }

Example for sharing a feed item using the request body { "body" : { "messageSegments" : [ { "type" : "Text", "text" : "When should we meet for release planning? " }, { "type" : "Mention", "id" : "005D00000016Qxp" }] }, "capabilities" : { "feedEntityShare" : { "feedEntityId" : "0D5B000000Py41t" } }, "feedElementType" : "FeedItem", "subjectId" : "0F9B000000000W2" }

SEE ALSO: Action Link Templates Define Action Links and Post with a Feed Element Define Action Links in a Template and Post with a Feed Element Post a Feed Element with a Code Block Post a Feed Element with an Inline Image

198

Chatter REST API Developer Guide

Feed Elements Resources

Feed Elements, Batch Post Post a batch of up to 500 feed elements. Resource /chatter/feed-elements/batch /connect/communities/communityId/chatter/feed-elements/batch

Available version 32.0 Requires Chatter Yes HTTP methods POST, HEAD Request body for POST Batch Collection Input The rich input for this batch collection is a Feed Item Input Response body for POST Batch Results The Batch Results response body contains Feed Item response bodies corresponding to each of the request bodies. The Feed Item response bodies are returned in the same order as the request bodies. The request returns an HTTP 200 status code unless an error occurs that affects the entire request (such as a parsing failure). If an individual request body causes an error, the Batch Results Item statusCode property contains the appropriate HTTP status code. Post a batch of feed elements This example uses the /chatter/feed-elements/batch resource to post a batch of feed elements. This example uses cURL. curl -H "X-PrettyPrint: 1" -F 'json={"inputs":[{"richInput":{"subjectId":"me","body":{"messageSegments":[{"type":"Text","text":"Post Number 1"}]},"feedElementType":"FeedItem"}},{"richInput":{"subjectId":"me","body":{"messageSegments":[{"type":"Text","text":"Post Number 2"}]},"feedElementType":"FeedItem"}}]};type=application/json' -X POST https://instance_name/services/data/v41.0/chatter/feed-elements/batch -H 'Authorization: OAuth 00DD00000007HoR!...' --insecure

Here’s the same example showing just the request body: { "inputs": [ { "richInput": { "subjectId": "me", "body": { "messageSegments": [ { "type": "Text", "text": "Post Number 1" } ]

199

Chatter REST API Developer Guide

Feed Elements Resources

}, "feedElementType": "FeedItem" } }, { "richInput": { "subjectId": "me", "body": { "messageSegments": [ { "type": "Text", "text": "Post Number 2" } ] }, "feedElementType": "FeedItem" } } ] }

Post a batch of feed elements with binary files (version 35.0 and earlier) Important: In version 36.0 and later, you can’t create a feed post and upload a binary file in the same request. Upload files to Salesforce first, and then use the file IDs to attach one or more files to a feed post. This example uses the /chatter/feed-elements/batch resource to post a batch of feed elements, uploads two binary files, and attach them to the feed elements in the batch. Include the information about the binary parts in the request body. This example uses cURL. curl -H "X-PrettyPrint: 1" -F 'json={"inputs":[{"binaryPartNames":["bin1"], "richInput":{"subjectId":"me","body":{ "messageSegments":[{"type":"Text","text":"Please accept this receipt"}]},"capabilities": {"content" : {"description": "Receipt for expenses", "title":"receipt.pdf"}},"feedElementType":"FeedItem"}}, {"binaryPartNames":["bin2"],"richInput":{"subjectId":"me","body":{"messageSegments":[{"type":"Text","text":"Post Number 2"}]}, "capabilities": {"content" : {"description": "Receipt for expenses", "title":"receipt2.pdf"}},"feedElementType":"FeedItem"}}]};type=application/json' -F "bin1=@/Users/jsmith/Desktop/receipt.pdf;type=application/octet-stream" -F "bin2=@/Users/jsmith/Desktop/receipt2.pdf;type=application/octet-stream" -X POST https://instance_name/services/data/v35.0/chatter/feed-elements/batch -H 'Authorization: OAuth 00DD00000007HoR44QATPNzhzYEJBfU' --insecure

Here is the same example formatted to show the request body parts. POST /services/data/v35.0/chatter/feed-elements/batch HTTP/1.1 Authorization: OAuth 00DRR0000000N0g!... User-Agent: Jakarta Commons-HttpClient/3.0.1 Host: instance_name Content-Length: 845 Content-Type: multipart/form-data; boundary=a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq Accept: application/json --a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq Content-Disposition: form-data; name="json"

200

Chatter REST API Developer Guide

Feed Elements Resources

Content-Type: application/json; charset=UTF-8 { "inputs": [ { "binaryPartNames": [ "bin1" ], "richInput": { "subjectId": "me", "body": { "messageSegments": [ { "type": "Text", "text": "Please accept this receipt" } ] }, "capabilities": { "content": { "description": "Receipt for expenses", "title": "receipt.pdf" } }, "feedElementType": "FeedItem" } }, { "binaryPartNames": [ "bin2" ], "richInput": { "subjectId": "me", "body": { "messageSegments": [ { "type": "Text", "text": "Post Number 2" } ] }, "capabilities": { "content": { "description": "Receipt for expenses", "title": "receipt2.pdf" } }, "feedElementType": "FeedItem" } } ] } --a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq

201

Chatter REST API Developer Guide

Feed Elements Resources

Content-Disposition: form-data; name="bin1"; filename="receipt.pdf" Content-Type: application/octet-stream; charset=ISO-8859-1 ...contents of receipt.pdf...

--a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq Content-Disposition: form-data; name="bin2"; filename="receipt2.pdf" Content-Type: application/octet-stream; charset=ISO-8859-1 ...contents of receipt2.pdf... --a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq--

Note: The binary part names in the binaryPartNames properties must match the binary part names in the name properties of the binary request parts. SEE ALSO: Inputs and Binary File Upload Examples Batch Resource

Feed Elements, Batch Get Get information about a comma-separated list of up to 500 feed elements. Errors for feed elements that can’t be loaded are returned in the results. Resource /chatter/feed-elements/batch/feedElementIds /connect/communities/communityId/chatter/feed-elements/batch/feedElementIds

Available version 31.0 Requires Chatter Yes HTTP methods GET Response body for GET Batch Results

Feed Element Access, edit, or delete a feed element. Feed items are the only type of feed element that can be edited. Resource /chatter/feed-elements/feedElementId /connect/communities/communityId/chatter/feed-elements/feedElementId

202

Chatter REST API Developer Guide

Feed Elements Resources

Available version 31.0 Requires Chatter Yes HTTP methods GET, DELETE, PATCH PATCH is supported in version 34.0 and later. Request parameters for GET Parameter Name

Type

Description

Required or Optional

Available Version

commentSort

String

Specifies the order of comments. Values are:

Optional

41.0

Integer

The maximum number of feed Optional elements per bundle. The default and maximum value is 10.

31.0

recentCommentCount Integer

The maximum number of comments Optional to return with each feed element. The default value is 3.

31.0

• CreatedDateLatestAsc—Sorts by most recently created comments in ascending order. • Relevance—Sorts by most relevant content. The default value is CreatedDateLatestAsc. elementsPerBundle

Response body for GET Generic Feed Element or Feed Item Request body for PATCH Feed Item Input Response body for PATCH Feed Item Example for editing a feed post using the request body { "body":{ "messageSegments":[ { "type":"Text", "text":"Check out the latest API documentation on developer.salesforce.com." } ]

203

Chatter REST API Developer Guide

Feed Elements Resources

} }

Example for editing a question title and post { "body":{ "messageSegments":[ { "type":"Text", "text":"The latest public versions are on developer.salesforce.com." } ] }, "capabilities":{ "questionAndAnswers" : { "questionTitle" : "Where can I find API documentation" } } }

Response body for DELETE 204: Successful Delete SEE ALSO: Edit a Feed Post Edit a Question Title and Post

Feed Elements Capabilities Access a feed element's set of capabilities. Resource /chatter/feed-elements/feedElementId/capabilities /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities

Available version 31.0 Requires Chatter Yes HTTP methods GET Request parameters for GET Parameter Name

Type

elementsPerBundle Integer

Description

Required or Optional

The maximum number of feed elements Optional per bundle. The default and maximum value is 10.

204

Available Version 31.0

Chatter REST API Developer Guide

Parameter Name

Feed Elements Resources

Type

recentCommentCount Integer

Description

Required or Optional

The maximum number of comments to Optional return with each feed element. The default value is 3.

Available Version 31.0

Response body for GET Feed Element Capabilities

Feed Elements Capability, Approval Access the approval capability of a feed element. Resource /chatter/feed-elements/feedElementId/capabilities/approval /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/approval

Available version 32.0 Requires Chatter Yes HTTP methods GET, HEAD Response bodies for GET Approval Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Associated Actions Access the associated actions capability of a feed element. Resource /chatter/feed-elements/feedElementId/capabilities/associated-actions /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/associated-actions

Available version 33.0 Requires Chatter Yes HTTP methods GET, HEAD Response bodies for GET Associated Actions Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

205

Chatter REST API Developer Guide

Feed Elements Resources

Feed Elements Capability, Banner Access the banner capability of a feed element. Resource /chatter/feed-elements/feedElementId/capabilities/banner /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/banner

Available version 32.0 Requires Chatter Yes HTTP methods GET, HEAD Response bodies for GET Banner Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Bookmarks Get information about whether a feed element is bookmarked, or add bookmarks to feed elements. Resource /chatter/feed-elements/feedElementId/capabilities/bookmarks /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/bookmarks

Available version 32.0 Requires Chatter Yes HTTP methods GET, PATCH Request body for PATCH Root XML tag true

JSON example { "isBookmarkedByCurrentUser": true }

206

Chatter REST API Developer Guide

Feed Elements Resources

Properties Name

Type

isBookmarked Boolean ByCurrentUser

Description

Required or Optional

Specifies if the feed element should be Required bookmarked for the user (true) or not (false).

Available Version 32.0

Request parameter for PATCH Parameter Name

Type

isBookmarked Boolean ByCurrentUser

Description

Required or Optional

Available Version

Specifies if the feed element should be bookmarked for the user (true) or not (false).

Required

32.0

Response body for GET, PATCH Bookmarks Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Bundle Access the bundle capability of a feed element. Resource /chatter/feed-elements/feedElementId/capabilities/bundle /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/bundle

Available version 31.0 Requires Chatter Yes HTTP methods GET, HEAD Request parameters for GET Parameter Name

Type

elementsPerBundle Integer

Description

Required or Optional

The maximum number of feed elements Optional per bundle. The default and maximum value is 10.

207

Available Version 31.0

Chatter REST API Developer Guide

Parameter Name

Feed Elements Resources

Type

recentCommentCount Integer

Description

Required or Optional

The maximum number of comments to Optional return with each feed element. The default value is 3.

Available Version 31.0

Response bodies for GET One of these response bodies: • Generic Bundle Capability • Tracked Change Bundle Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Bundle Elements Access all feed elements that are grouped together in a bundle. Note: Bundled posts contain feed-tracked changes. In Salesforce for Android and Salesforce for iOS, bundled posts are in record feeds only. Resource /chatter/feed-elements/feedElementId/capabilities/bundle/feed-elements connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/bundle/feed-elements

Available version 31.0 Requires Chatter Yes HTTP methods GET Request parameters for GET Parameter Name

Type

elementsPerBundle Integer

Description

Required or Optional

Available Version

The maximum number of feed elements per bundle. The default and maximum value is 10.

Optional

31.0

page

String

Specifies the page token to be used to Optional view a page of information. Page tokens are returned as part of the response class, such as currentPageToken or nextPageToken. If you pass in null, the first page is returned.

31.0

pageSize

Integer

Specifies the number of feed elements Optional per page. Valid values are from 1

31.0

208

Chatter REST API Developer Guide

Parameter Name

Feed Elements Resources

Type

Description

Required or Optional

Available Version

through 100. If you pass in null, the default size is 25. recentCommentCount Integer

The maximum number of comments Optional to return with each feed element. The default value is 3.

31.0

Response body for GET Feed Element Page If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Canvas Access the canvas capability of a feed element. Resource /chatter/feed-elements/feedElementId/capabilities/canvas /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/canvas

Available version 32.0 Requires Chatter Yes HTTP methods GET, HEAD Response bodies for GET Canvas Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Case Comment Access the case comment capability of a feed element. Resource /chatter/feed-elements/feedElementId/capabilities/case-comment /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/case-comment

Available version 32.0 Requires Chatter Yes HTTP methods GET, HEAD

209

Chatter REST API Developer Guide

Feed Elements Resources

Response bodies for GET Case Comment Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Chatter Likes Access information about the chatter likes capability for a feed element. Resource /chatter/feed-elements/feedElementId/capabilities/chatter-likes /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/chatter-likes

Available version 32.0 Requires Chatter Yes HTTP methods GET Response Chatter Likes Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Chatter Likes Items Access a page of likes for a feed element. Like or unlike a feed element. Resource /chatter/feed-elements/feedElementId/capabilities/chatter-likes/items /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/chatter-likes/items

Available version 32.0 Requires Chatter Yes HTTP methods GET, PATCH, POST PATCH is supported in version 39.0 and later. Request parameters for GET Parameter Name

Type

Description

Required or Optional

page

Integer

Specifies the number of the page you want Optional returned. If you don’t specify a value, the first page is returned.

210

Available Version 32.0

Chatter REST API Developer Guide

Feed Elements Resources

Parameter Name

Type

Description

Required or Optional

pageSize

Integer

Specifies the number of likes per page. Optional Valid values are from 1 to 100. If you don't specify a size, the default is 25.

Available Version 32.0

Response body for GET Like Page If the feed element doesn’t support this capability, the response is 404: Not Found. Request parameters for PATCH Parameter Name

Type

Description

Required or Optional

Available Version

isLikedBy CurrentUser

Boolean

Specifies whether the context user likes (true) or unlikes (false) the feed element.

Required

39.0

Response body for PATCH Like Page If the feed element doesn’t support this capability, the response is 404: Not Found. Request parameters for POST Note: POST takes no request parameters nor a request body. Response body for POST Like If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Comments Access the comments capability for a feed element Resource /chatter/feed-elements/feedElementId/capabilities/comments /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/comments

Available version 32.0 Requires Chatter Yes HTTP methods GET

211

Chatter REST API Developer Guide

Feed Elements Resources

Request parameters for GET Parameter Name

Type

Description

Required or Optional

Available Version

sort

String

Specifies the order of comments. Values are:

Optional

41.0

• CreatedDateLatestAsc—Sorts by most recently created comments in ascending order. • Relevance—Sorts by most relevant content. The default value is CreatedDateLatestAsc.

Response body for GET Comments Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Comments Items Access comments for a feed element, or add a comment to a feed element. For additional information about posting a comment, see Using POST, PATCH, or PUT for Input. To upload a binary file to attach to a comment, you must send it in a multipart/form-data request. To send the text of the comment, you can choose to include a JSON or XML rich input body part in the multipart/form-data request. Alternately, you can choose to pass the information in request parameter parts. For information about how to create the multipart/form-data message, see Uploading Binary Files. Resource /chatter/feed-elements/feedElementId/capabilities/comments/items /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/comments/items

Available version 32.0 Requires Chatter Yes HTTP methods GET, POST Request parameters for GET Parameter Name

Type

Description

Required or Optional

Available Version

page

String

The page token to use to view the page. Use the value given in the

Optional

32.0

212

Chatter REST API Developer Guide

Parameter Name

Feed Elements Resources

Type

Description

Required or Optional

Available Version

Optional

32.0

nextPageUrl property of the

Comment Page. pageSize

Integer

The number of comments per page. The default value is 3.

Response body for GET Comment Page If the feed element doesn’t support this capability, the response is 404: Not Found. Request body for POST Root XML tag

Properties Name

Type

Description

Available Version

attachment

Depends on type.

Optional. Values are:

24.0–31.0

• Attachment Input: Existing Content • Attachment Input: New File Upload Important: As of version 32.0, use the capabilities property. body

Message Body Input

The body of the comment.

23.0

Feed item and comment bodies have a 10,000 character limit. Because this limit can change, we recommend that clients make a describeSObjects() call on the FeedItem or FeedComment object. To determine the maximum number of allowed characters, look at the length of the Body or CommentBody field. To edit this property in a comment, make a PATCH request to /chatter/comments/commentId. Editing comments is supported in version 34.0 and later. Rich text and inline images are supported in comment bodies in version 35.0 and later. capabilities

Comment Capabilities Input

213

Capabilities of the comment, such as a file attachment

32.0

Chatter REST API Developer Guide

Feed Elements Resources

Request parameters for POST Parameter Name

Type

Description

Required or Optional

Available Version

text

String

The comment text.

Required

32.0

Response body for POST Comment If the feed element doesn’t support this capability, the response is 404: Not Found. Example for posting a comment using the request body { "body":{ "messageSegments":[ { "type":"Text", "text":"New comment" } ] } }

Example for posting a comment with a mention using the request body { "body" : { "messageSegments" : [ { "type": "mention", "id" : "005D0000001GpHp" }, { "type": "text", "text" : " Did you see the new plans?" } ] } }

Example for posting a comment with multiple mentions using the request body { "body" : { "messageSegments" : [ { "type": "mention", "id":"005D0000001LL8YIAW" }, { "type" : "Text", "text" : " " },

214

Chatter REST API Developer Guide

Feed Elements Resources

{ "type": "mention", "id":"005D0000001LL8sIAG" }, { "type": "text", "text":" Did you see the new plans?" } ] } }

Example for posting a comment with a file using the request body { "body":{ "messageSegments":[ { "type":"Text", "text":"Please take a look at this file." } ] }, "capabilities":{ "content":{ "contentDocumentId":"069D00000001pyS" } } }

Example for posting a rich-text comment using the request body { "body":{ "messageSegments":[ { "markupType" : "Paragraph", "type" : "MarkupBegin" }, { "markupType" : "Bold", "type" : "MarkupBegin" }, { "text" : "First line of text.", "type" : "Text" }, { "markupType" : "Bold", "type" : "MarkupEnd" }, { "markupType" : "Paragraph", "type" : "MarkupEnd" },

215

Chatter REST API Developer Guide

Feed Elements Resources

{ "markupType" : "Paragraph", "type" : "MarkupBegin" }, { "text" : " ", "type" : "Text" }, { "markupType" : "Paragraph", "type" : "MarkupEnd" }, { "markupType" : "Paragraph", "type" : "MarkupBegin" }, { "text" : "Second line of text.", "type" : "Text" }, { "markupType" : "Paragraph", "type" : "MarkupEnd" } ] } }

Example for posting a comment with a code block using the request body { "body":{ "messageSegments":[ { "markupType" : "Code", "type" : "MarkupBegin" }, { "text" : "var i, t = 0;\nfor (i = 0; i < 5; i++) {\n i;\n}\n", "type" : "Text" }, { "markupType" : "Code", "type" : "MarkupEnd" } ] } }

Example for posting a comment with an inline image using the request body { "body":{ "messageSegments":[

216

t +=

Chatter REST API Developer Guide

Feed Elements Resources

{ "type":"Text", "text":"Please take a look at this file." }, { "type":"InlineImage", "fileId":"069xx00000000QO", "altText":"API Spec" }, { "type":"Text", "text":"And this one." }, { "type":"InlineImage", "fileId":"069xx00000000QT", "altText":"REST API Spec" } ] } }

Feed Elements Capability, Content Access the content capability of a feed element. Resource /chatter/feed-elements/feedElementId/capabilities/content /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/content

Available version 32.0 Requires Chatter Yes HTTP methods GET, HEAD Response bodies for GET Content Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Dashboard Component Snapshot Access the dashboard component capability of a feed element. Resource /chatter/feed-elements/feedElementId/capabilities/dashboard-component-snapshot /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/dashboard-component-snapshot

217

Chatter REST API Developer Guide

Feed Elements Resources

Available version 32.0 Requires Chatter Yes HTTP methods GET, HEAD Response bodies for GET Dashboard Component Snapshot Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Direct Message Access the direct message capability of a feed element. Update the members of a direct message. Resource /chatter/feed-elements/feedElementId/capabilities/direct-message /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/direct-message

Available version 39.0 Requires Chatter No HTTP methods GET, PATCH Request body for PATCH Root XML tag

JSON example { "membersToAdd": ["005R0000000I2X4","005R0000000I23Y","005R0000000IUV5"] }

Properties Name

Type

membersToAdd String[]

Description

Required or Optional

List of user IDs for members to include in Required when the direct message. creating a direct message (POST) Optional when updating a direct message (PATCH)

218

Available Version 39.0

Chatter REST API Developer Guide

Name

Feed Elements Resources

Type

membersToRemove String[]

Description

Required or Optional

Available Version

List of user IDs for members to remove from the direct message.

Optional when updating a direct message (PATCH)

40.0

Not supported when creating a direct message (POST) subject

String

Subject of the direct message.

Optional when creating a direct message (POST)

39.0

Not supported when updating a direct message (PATCH)

Response body for GET and PATCH Direct Message Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Direct Message Members Get all the members for a direct message. Resource /chatter/feed-elements/feedElementId/capabilities/direct-message/members /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/direct-message/members

Available version 39.0 Requires Chatter No HTTP methods GET Request parameters for GET Parameter Name

Type

Description

Required or Optional

page

String

Specifies the page token to be used to Optional view a page of information. Page tokens are returned as part of the response class, such as currentPageToken or

219

Available Version 40.0

Chatter REST API Developer Guide

Parameter Name

Type

Feed Elements Resources

Description

Required or Optional

Available Version

nextPageToken. If you pass in null, the first page is returned.

Response body for GET Direct Message Member Collection If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Direct Message Original Members Get the original members for a direct message. Resource /chatter/feed-elements/feedElementId/capabilities/direct-message/original-members /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/direct-message/original-members

Available version 40.0 Requires Chatter No HTTP methods GET Request parameters for GET Parameter Name

Type

Description

Required or Optional

page

String

Specifies the page token to be used to Optional view a page of information. Page tokens are returned as part of the response class, such as currentPageToken or nextPageToken. If you pass in null, the first page is returned.

Response body for GET Direct Message Member Collection

Feed Elements Capability, Direct Message Membership Activity Get the membership activities for a direct message.

220

Available Version 40.0

Chatter REST API Developer Guide

Feed Elements Resources

Resource /chatter/feed-elements/feedElementId/capabilities/direct-message/membership-activity /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/direct-message/membership-activity

Available version 40.0 Requires Chatter No HTTP methods GET Request parameters for GET Parameter Name

Type

Description

Required or Optional

Available Version

page

String

Specifies the page token to be used to Optional view a page of information. Page tokens are returned as part of the response class, such as currentPageToken or nextPageToken. If you pass in null, the first page is returned.

40.0

pageSize

Integer

Specifies the number of items per page. Optional Valid values are from 1 through 100. If you pass in null, the default size is 25.

40.0

Response body for GET Direct Message Membership Activity Collection

Feed Elements Capability, Editability Indicates whether the context user can edit the feed element. Feed items are the only type of feed element that can be edited. Resource /chatter/feed-elements/feedElementId/capabilities/edit/is-editable-by-me /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/edit/is-editable-by-me

Available version 34.0 Requires Chatter Yes HTTP methods GET Response body for GET Feed Entity Is Editable

221

Chatter REST API Developer Guide

Feed Elements Resources

If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Email Message Access the email message capability of a feed element. Resource /chatter/feed-elements/feedElementId/capabilities/email-message /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/email-message

Available version 32.0 Requires Chatter Yes HTTP methods GET, HEAD Response bodies for GET Email Message Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Enhanced Link Access the enhanced link capability of a feed element. Resource /chatter/feed-elements/feedElementId/capabilities/enhanced-link /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/enhanced-link

Available version 32.0 Requires Chatter Yes HTTP methods GET, HEAD Response bodies for GET Enhanced Link Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Extensions Access the extensions capability of a feed element.

222

Chatter REST API Developer Guide

Feed Elements Resources

Resource /chatter/feed-elements/feedElementId/capabilities/extensions /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/extensions

Available version 40.0 Requires Chatter Yes HTTP methods GET, HEAD Response body for GET Extensions Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Feed Entity Share Access the feed entity share capability of a feed element. Resource /chatter/feed-elements/feedElementId/capabilities/feed-entity-share /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/feed-entity-share

Available version 39.0 Requires Chatter Yes HTTP methods GET, HEAD Response body for GET Feed Entity Share Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Files Access the files capability of a feed element. Resource /chatter/feed-elements/feedElementId/capabilities/files /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/files

Available version 37.0 Requires Chatter Yes

223

Chatter REST API Developer Guide

Feed Elements Resources

HTTP methods GET, HEAD Response body for GET Files Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Interactions Access the interactions capability of a feed element. Resource /chatter/feed-elements/feedElementId/capabilities/interactions /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/interactions

Available version 37.0 Requires Chatter Yes HTTP methods GET, HEAD Response body for GET Interactions Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Link Access the link capability of a feed element. Resource /chatter/feed-elements/feedElementId/capabilities/link /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/link

Available version 32.0 Requires Chatter Yes HTTP methods GET, HEAD Response bodies for GET Link Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

224

Chatter REST API Developer Guide

Feed Elements Resources

Feed Elements Capability, Media References Access the media references capability of a feed element. Resource /chatter/feed-elements/feedElementId/capabilities/media-references /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/media-references

Available version 41.0 Requires Chatter Yes HTTP methods GET, HEAD Response body for GET Media Reference Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Moderation Get information about a feed element's moderation capability, add a moderation flag to a feed element, or delete all moderation flags from a feed element. Resource /connect/communities/communityId/chatter/feed-elements /feedElementId/capabilities/moderation

Available version 31.0 Requires Chatter Yes HTTP methods GET, POST, DELETE, HEAD Request parameters for GET Parameter Name

Type

Description

Required or Optional

page

String

Specifies the page token to be used to Optional view a page of information. Page tokens are returned as part of the response class, such as currentPageToken or nextPageToken. If you pass in null, the first page is returned.

40.0

pageSize

Integer

Specifies the number of items per page. Valid values are from 1 through 100. The default size is 0.

40.0

225

Optional

Available Version

Chatter REST API Developer Guide

Feed Elements Resources

Parameter Name

Type

Description

Required or Optional

visibility

String

Specifies the visibility behavior of a flag for Optional various user types. One of these values:

Available Version 31.0

• ModeratorsOnly—The flag is visible only to users with moderation permissions on the flagged element or item. • SelfAndModerators—The flag is visible to the creator of the flag and to users with moderation permissions on the flagged element or item.

Request body for POST Root XML tag

JSON { "note" : "Flagged by moderator as spam on 6.6.16.", "type" : "FlagAsSpam", "visibility" : "ModeratorsOnly" }

Properties Name

Type

Description

Required or Optional

note

String

A note of up to 4,000 characters about the Optional flag.

38.0

type

String

Specifies the type of moderation flag.

38.0

Optional

Available Version

• FlagAsInappropriate—Flag If not specified, FlagAs for inappropriate content. • FlagAsSpam—Flag for spam.

Inappropriate is

the default value. visibility

String

Specifies the visibility behavior of a flag for various user types. • ModeratorsOnly—The flag is visible only to users with moderation permissions on the flagged element or item. • SelfAndModerators—The flag is visible to the creator of the flag and

226

Optional

30.0

Chatter REST API Developer Guide

Name

Feed Elements Resources

Type

Description

Required or Optional

Available Version

to users with moderation permissions on the flagged element or item.

Request parameters for POST Parameter Name

Type

Description

Required or Optional

note

String

A note of up to 4,000 characters about the Optional flag.

38.0

type

String

Specifies the type of moderation flag.

38.0

Optional

Available Version

• FlagAsInappropriate—Flag If not specified, FlagAs for inappropriate content. • FlagAsSpam—Flag for spam. If a type isn’t specified, it defaults to FlagAsInappropriate. visibility

String

Inappropriate

is the default value.

Specifies the visibility behavior of a flag for Optional various user types. One of these values:

31.0

• ModeratorsOnly—The flag is visible only to users with moderation permissions on the flagged element or item. • SelfAndModerators—The flag is visible to the creator of the flag and to users with moderation permissions on the flagged element or item.

Response body for GET and POST Moderation Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Mute Get information about whether a feed element is muted, or mute or unmute a feed element. Resource /chatter/feed-elements/feedElementId/capabilities/mute /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/mute

227

Chatter REST API Developer Guide

Feed Elements Resources

Available version 35.0 Requires Chatter Yes HTTP methods GET, HEAD, PATCH Request body for PATCH Root XML tag

JSON example { "isMutedByMe": true }

Properties Name

Type

Description

Required or Optional

isMutedByMe

Boolean

Indicates whether the feed element is Required muted for the context user. Default value is false.

Available Version 35.0

Request parameters for PATCH Parameter Name

Type

Description

Required or Optional

isMutedByMe

Boolean

Indicates whether the feed element is Required muted for the context user. Default value is false.

Available Version 35.0

Response body for GET and PATCH Mute Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Origin Access the origin capability of a feed element. If a feed element has this capability, it was created by a feed action. Resource /chatter/feed-elements/feedElementId/capabilities/origin /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/origin

228

Chatter REST API Developer Guide

Feed Elements Resources

Available version 33.0 Requires Chatter Yes HTTP methods GET, HEAD Response bodies for GET Origin Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Poll Access a poll for a feed element, create a poll, or vote on a poll. Resource /chatter/feed-elements/feedElementId/capabilities/poll /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/poll

Available version 32.0 Requires Chatter Yes HTTP methods GET, PATCH Request body for PATCH XML example Monday Tuesday

JSON example { "choices" : [ "Monday", "Tuesday" ] }

229

Chatter REST API Developer Guide

Feed Elements Resources

Properties Name

Type

Description

Required or Optional

Available Version

choices

String[]

The choices used to create a new poll. You must specify 2–10 poll choices for each poll.

Required for creating a poll

32.0

myChoiceId

String

ID of an existing choice on the feed poll. Required for voting 32.0 Used to vote on an existing poll. on a poll

Request parameters for PATCH Parameter Name

Type

Description

Required or Optional

Available Version

myChoiceId

String

A poll choice ID.

Required

32.0

Response body for GET, PATCH Poll Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Question and Answers Access question and answers for a feed element, or update question and answers on a feed element. Resource /chatter/feed-elements/feedElementId/capabilities/question-and-answers /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/question-and-answers

Available version 32.0 Requires Chatter Yes HTTP methods GET, PATCH Request body for PATCH Root XML tag 0D7D00000000lMAKAY

230

Chatter REST API Developer Guide

Feed Elements Resources

JSON example { "bestAnswerId": "0D7D00000000lMAKAY" }

Properties Name

Type

bestAnswerId String

questionTitle String

Description

Required or Optional

A comment ID to use as a best answer for a question feed element. The best answer comment must already exist on the question feed element.

Required to PATCH 32.0 the best answer.

Title for a question feed element.

Required to POST or PATCH a question.

To edit the title of a question, make a PATCH request to

Available Version

Not supported in POST requests. 32.0

/chatter/feed-elements /feedElementId. Editing question

titles is supported in version 34.0 and later.

Request parameters for PATCH Parameter Name

Type

Description

Required or Optional

bestAnswerId

String

A comment ID to use as a best answer for Required a question feed element. The best answer comment must already exist on the question feed element.

Available Version 32.0

Response body for GET, PATCH Question and Answers Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Read By Access the read by capability of a feed element. Mark a feed element as read for the context user. Resource /chatter/feed-elements/feedElementId/capabilities/read-by /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/read-by

231

Chatter REST API Developer Guide

Feed Elements Resources

Available version 40.0 Requires Chatter Yes HTTP methods GET, PATCH Request body for PATCH Root XML tag

JSON example { "isReadByMe": "true" }

Properties Name

Type

Description

Required or Optional

Available Version

isReadByMe

Boolean

Specifies to mark the feed element as read (true) for the context user.

Required

40.0

Specifies the last date when the feed Optional element is marked as read for the context user. If you don’t specify a date or you specify a future date, the current system date is used.

40.0

lastReadDateByMe Date

Request parameters for PATCH Parameter Name

Type

Description

Required or Optional

isReadByMe

Boolean

Specifies to mark the feed element as read Required (true) for the context user.

Response body for GET and PATCH Read By Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Read By Items Get information about who read a feed element and when.

232

Available Version 40.0

Chatter REST API Developer Guide

Feed Elements Resources

Resource /chatter/feed-elements/feedElementId/capabilities/read-by/items /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/read-by/items

Available version 40.0 Requires Chatter Yes HTTP methods GET Request parameters for GET Parameter Name

Type

Description

Required or Optional

Available Version

page

String

Specifies the page token to be used to Optional view a page of information. Page tokens are returned as part of the response class, such as currentPageToken or nextPageToken. If you pass in null, the first page is returned.

40.0

pageSize

Integer

Specifies the number of items per page. Optional Valid values are from 1 through 100. If you pass in null, the default size is 25.

40.0

Response body for GET Read By Collection If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Batch Update Read By Mark multiple feed elements as read by the context user at the same time. Resource /chatter/feed-elements/batch/feedElementIds/capabilities/read-by /connect/communities/communityId/chatter/feed-elements/batch/feedElementIds/capabilities/read-by

Available version 40.0 Requires Chatter Yes HTTP methods PATCH

233

Chatter REST API Developer Guide

Feed Elements Resources

Request body for PATCH Root XML tag

JSON example { "isReadByMe": "true" }

Properties Name

Type

Description

Required or Optional

Available Version

isReadByMe

Boolean

Specifies to mark the feed element as read (true) for the context user.

Required

40.0

Specifies the last date when the feed Optional element is marked as read for the context user. If you don’t specify a date or you specify a future date, the current system date is used.

40.0

lastReadDateByMe Date

Request parameters for PATCH Parameter Name

Type

Description

Required or Optional

isReadByMe

Boolean

Specifies to mark the feed element as read Required (true) for the context user.

Available Version 40.0

Response body for PATCH Batch Results If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Recommendations Access the recommendations capability of a feed element. Resource /chatter/feed-elements/feedElementId/capabilities/recommendations /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/recommendations

Available version 32.0 Requires Chatter Yes

234

Chatter REST API Developer Guide

Feed Elements Resources

HTTP methods GET, HEAD Response bodies for GET Recommendations Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Record Snapshot Access the record snapshot capability of a feed element. Resource /chatter/feed-elements/feedElementId/capabilities/record-snapshot /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/record-snapshot

Available version 32.0 Requires Chatter Yes HTTP methods GET, HEAD Response bodies for GET Record Snapshot Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Social Post Access the social post capability of a feed element. Resource /chatter/feed-elements/feedElementId/capabilities/social-post /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/social-post

Available version 37.0 Requires Chatter Yes HTTP methods GET, HEAD Response body for GET Social Post Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

235

Chatter REST API Developer Guide

Feed Elements Resources

Feed Elements Capability, Status Access the status capability of a feed post or set the status of a feed post. Only users with the Can Approve Feed Post and Comment permission can set the status of a feed post or comment. Resource /chatter/feed-elements/feedElementId/capabilities/status /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/status

Available version 37.0 Requires Chatter Yes HTTP methods GET, HEAD, PATCH Response body for GET Status Capability If the feed element doesn’t support this capability, the response is 404: Not Found. Request body for PATCH Root XML tag statusCapability

JSON example { "feedEntityStatus":"Published" }

Properties Name

Type

feedEntityStatus String

Description

Required or Optional

Available Version

Specifies the status of the feed post or comment. Values are:

Required

37.0

• PendingReview—The feed post or comment isn’t approved yet and therefore isn’t published or visible. • Published—The feed post or comment is approved and visible.

236

Chatter REST API Developer Guide

Feed Elements Resources

Request parameters for PATCH Parameter Name

Type

feedEntityStatus String

Description

Required or Optional

Available Version

Specifies the status of the feed post or comment. Values are:

Required

37.0

• PendingReview—The feed post or comment isn’t approved yet and therefore isn’t published or visible. • Published—The feed post or comment is approved and visible.

Response body for PATCH Status Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Topics Get, delete, and post topics associated with a feed element. Resource /chatter/feed-elements/feedElementId/capabilities/topics /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/topics

Available version 32.0 Requires Chatter Yes HTTP methods GET, DELETE, POST Request body for POST Root XML tag

JSON The following example attaches a new topic to a feed item: { "topicName": "W3C" }

237

Chatter REST API Developer Guide

Feed Elements Resources

Properties Name

Type

Description

Required or Optional

Available Version

topicId

String

ID of an existing topic

Required for existing topics if the 29.0 topicName property isn’t used

topicName

String

Name of a new or existing topic, Required for new topics; 29.0 up to 150 characters required for existing topics if the topicId property isn’t used

Request parameters for POST Parameter Name

Type

Description

Required or Optional

Available Version

topicId

String

ID of an existing topic.

Required for existing 32.0 topics if the topicName

property isn’t used. topicName

String

Name of a new or existing topic, up to 150 Required for new 32.0 characters. topics; required for existing topics if the topicId

property isn’t used.

Request parameters for DELETE Parameter Name

Type

Description

Required or Optional

Available Version

topicId

String

An existing topic ID.

Required

32.0

Response body for POST Topic If the feed element doesn’t support this capability, the response is 404: Not Found. Response body for GET Topics Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Tracked Changes Access the tracked changes capability of a feed element.

238

Chatter REST API Developer Guide

Feed Elements Resources

Resource /chatter/feed-elements/feedElementId/capabilities/tracked-changes /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/tracked-changes

Available version 32.0 Requires Chatter Yes HTTP methods GET, HEAD Response bodies for GET Tracked Changes Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

Feed Elements Capability, Up Down Vote Get the up and down votes for a feed element. Vote a feed element up or down. Resource /chatter/feed-elements/feedElementId/capabilities/up-down-vote /connect/communities/communityId/chatter/feed-elements/feedElementId/capabilities/up-down-vote

Available version 41.0 Requires Chatter Yes HTTP methods GET, PATCH Request body for PATCH Root XML tag

JSON example { "vote":"Up" }

Properties Name

Type

Description

Required or Optional

vote

String

Specifies the value of the vote for a feed Required element or comment. Values are: • Down

239

Available Version 41.0

Chatter REST API Developer Guide

Name

Feed Elements Resources

Type

Description

Required or Optional

Available Version

• None • Up

Request parameters for PATCH Parameter Name

Type

Description

Required or Optional

Available Version

vote

String

Specifies the value of the vote for a feed element or comment. Values are:

Required

41.0

• Down • None • Up

Response body for GET and PATCH Up Down Vote Capability If the feed element doesn’t support this capability, the response is 404: Not Found.

Related Questions Get questions related to the context question. Resource /chatter/feed-elements/feedElementId/related-posts /connect/communities/communityId/chatter/feed-elements/feedElementId/related-posts

In version 37.0 and later, feedElementId must be a question ID. Available version 37.0 Requires Chatter Yes HTTP methods GET

240

Chatter REST API Developer Guide

Feed Items Resources

Request parameters for GET Parameter Name

Type

Description

Required or Optional

filter

String

Specifies the related question type. Values Optional are: If not specified, • Answered—Related questions that Generic is the have at least one answer. default value.

Available Version 37.0

• BestAnswer—Related questions that have a best answer. • Generic—All types of related questions, including answered, with a best answer, and unanswered. • Unanswered—Related questions that don’t have answers. maxResults

Integer

The maximum number of results to return. Optional 37.0 You can return up to 25 results; 5 is the If not specified, 5 is default. the default value.

Response body for GET Related Feed Post Collection Each related feed post has a score indicating how closely it’s related to the context feed post. We return related feed posts sorted by score, with the highest score first.

Feed Items Resources Information about feed items. Access, search, delete, bookmark, and like feed items. Access and post comments. Access and vote in polls. And access, add, and remove topics. Important: Feed Item Resources aren’t available in version 32.0 and later. In version 32.0 and later, use Feed Elements Resources.

Feed-Items Batch A batch of feed items. Get information about multiple feed items in one request. Get information about the comma-separated list of up to 500 feed items. Errors for feed items that couldn’t be loaded are returned in the results. Resource /chatter/feed-items/batch/feedItemIds

Available versions 29.0–31.0 Important: In version 32.0 and later, use Feed Elements, Batch Get.

241

Chatter REST API Developer Guide

Feed Items Resources

Requires Chatter Yes HTTP methods GET, HEAD Response body for GET Batch Results

Feed-Items Query A paginated collection of feed items. Use this resource to search for feed items. The query parameter (q) is required. All types of feed items are searched, including tracked changes. A search returns feed items with the search term in the feed item body, as well as feed items that have comments that contain the search term. You can also use wildcards with the query parameter. Resource /chatter/feed-items?q=searchTerm

Available versions 23.0–31.0 Important: In version 32.0 and later, use Feed Elements, Post and Search. Requires Chatter Yes HTTP methods GET, HEAD Request parameters Parameter Name

Type Description

Required Available or Since Optional

page

String A generated token that indicates the view of feed items in the feed.

Optional

23.0–31.0

pageSize

Integer Specifies the number of items per page. Valid values are from 1 through 100. If you don't specify a size, the default is 25.

Optional

23.0–31.0

q

String Specifies the string to search. The search string must contain at least two characters, not including any wildcards. For more information about wildcards, see Wildcards.

Required

23.0–31.0

recentCommentCount Integer Maximum number of comments to include per feed item. The default value Optional

29.0–31.0

The query parameter searches all types of feed items, including tracked changes. The search returns feed items with the search term in the feed item body, as well as feed items that have comments that contain the search term.

is 3.

242

Chatter REST API Developer Guide

Feed Items Resources

Parameter Name

Type Description

Required Available or Since Optional

sort

String The sort order of the results. Values are:

Optional

28.0–31.0

• CreatedDateDesc • LastModifiedDateDesc The default value is CreatedDateDesc.

Response body Feed Item Page

Feed-Items, Specific Feed Item Access, delete, or bookmark a specific feed item. Resource /chatter/feed-items/feedItemId

Available versions 23.0–31.0 Important: In version 32.0 and later, use Feed Element. Requires Chatter Yes HTTP methods GET, DELETE, PATCH, or HEAD Request body for PATCH The root XML tag is . Parameter Name

Type

Description

isBookmarkedByCurrentUser

Boolean

Specify true to add the feed item to the list of bookmarked feed items for the context user. Specify false to remove this feed item from the list of bookmarked feed items for the context user.

Parameter Name

Type

Description

isBookmarkedByCurrentUser

Boolean

Specify true to add the feed item to the list of bookmarked feed items for the context user. Specify false to remove

Request parameter for PATCH

243

Chatter REST API Developer Guide

Feed Items Resources

Parameter Name

Type

Description this feed item from the list of bookmarked feed items for the context user.

Response body for GET, PATCH, or HEAD Feed Item Example This PATCH request bookmarks a feed item: /chatter/feed-items/0D5D0000000JvckKAC?isBookmarkedByCurrentUser=true

Feed Items Comments Access comments for a feed item or post a comment. The default number of comments to retrieve is 3. To retrieve more comments increase the size of the pageSize parameter. For additional information about posting a comment, see Using POST, PATCH, or PUT for Input. To upload a binary file to attach to a comment, you must send it in a multipart/form-data request. To send the text of the comment, you can choose to include a JSON or XML rich input body part in the multipart/form-data request. Alternately, you can choose to pass the information in request parameter parts. For information about how to create the multipart/form-data message, see Uploading Binary Files. Resource /chatter/feed-items/feedItemId/comments

Available since version 23.0–31.0 Important: In version 32.0 and later, use Feed Elements Capability, Comments Items. Requires Chatter Yes HTTP methods GET, POST or HEAD Request body for POST Root XML tag

Properties Name

Type

Description

Available Version

attachment

Depends on type.

Optional. Values are:

24.0–31.0

• Attachment Input: Existing Content • Attachment Input: New File Upload

244

Chatter REST API Developer Guide

Feed Items Resources

Name

Type

Description

Available Version

Important: As of version 32.0, use the capabilities property. Message Body Input

body

The body of the comment.

23.0

Feed item and comment bodies have a 10,000 character limit. Because this limit can change, we recommend that clients make a describeSObjects() call on the FeedItem or FeedComment object. To determine the maximum number of allowed characters, look at the length of the Body or CommentBody field. To edit this property in a comment, make a PATCH request to /chatter/comments/commentId. Editing comments is supported in version 34.0 and later. Rich text and inline images are supported in comment bodies in version 35.0 and later. Comment Capabilities Input

capabilities

Capabilities of the comment, such as a file attachment

32.0

Request parameters for POST Parameters for attaching an existing file Parameter Name Type

Description

Required or Optional Available Version

attachmentType String

The type of attachment. Must contain the value ExistingContent.

Required

27.0–31.0

contentDocumentId String

ID of an existing file to be posted.

Required

24.0–31.0

Text of the comment.

Optional

23.0–31.0

text

String

Parameters for posting text Parameter Name

Type

Description

Required or Optional Available Version

text

String

The comment text.

Required

245

23.0–31.0

Chatter REST API Developer Guide

Feed Items Resources

Request parameters for GET or HEAD Parameter Name

Type

Description

Required or Optional Available Version

page

String

A generated token that Optional 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.

23.0–31.0

pageSize

Integer

Specifies the number of Optional items per page. Valid values are from 1 through 100. If you don't specify a size, the default is 25.

23.0–31.0

This parameter specifies the number of comments per page.

Response body for GET or HEAD Comment Page Response body for POST Comment Example: Posting a Comment This POST request uses a request parameter to post a comment to a feed item: /chatter/feed-items/0D5D0000000JvckKAC/comments?text=I+completely+agree

Example: Posting a Comment and Attaching an Existing File This POST request posts a comment and attaches a file that has already been uploaded to the user’s organization: /chatter/feed-items/0D5D0000000JvckKAC/comments?text=yes&attachmentType=ExistingContent&contentDocumentId=069D00000001FHF

Example: Posting a Comment and Uploading and Attaching a New File See Uploading Binary Files on page 11.

Feed-Items Likes Used to access likes for a specific feed item, or to add a like to a specific feed item. Resource /chatter/feed-items/feedItemId/likes

Available versions 23.0–31.0

246

Chatter REST API Developer Guide

Feed Items Resources

Important: In version 32.0 and later, use Feed Elements Capability, Chatter Likes Items. Requires Chatter Yes HTTP methods GET, POST or HEAD Request parameters for GET or HEAD Note: There aren’t any request parameters for POST. Parameter Name

Type

Description

page

Integer

Specifies the number of the page you want returned.

pageSize

Integer

Specifies the number of items per page. Valid values are from 1 through 100. If you don't specify a size, the default is 25.

Response body for GET or HEAD Like Page Response body for POST Like SEE ALSO: Like a Feed Item

Feed-Items Polls Used to access or vote in an existing poll. Resource /chatter/feed-items/feedItemId/poll

The feedItemId must have the type PollPost. Available versions 26.0–31.0 Important: In version 32.0 and later, use Feed Elements Capability, Poll. Requires Chatter Yes HTTP methods GET, PATCH or HEAD Use PATCH to either vote in an existing poll, or change the context user’s vote.

247

Chatter REST API Developer Guide

Feed Items Resources

Request body for PATCH Root XML tag

Properties Name

Type

Description

Available Version

myChoiceId

String

ID of an existing choice on the 26.0–31.0 feed poll. Used to specify the ID of the poll choice that the context user is voting on.

Request parameters for PATCH Name

Type

Description

Available Version

myChoiceId

String

ID of an existing choice on the 26.0–31.0 feed poll. Used to specify the ID of the poll choice that the context user is voting on.

Response body Feed Item Attachment: Poll

Feed-Items Topics The topics associated with a specific feed item. Associate a new or existing topic with a specific feed item. Remove a topic from a specific feed item. Only users with the Assign Topics permission can add or remove existing topics from feed items. Only users with the Create Topics permission can add new topics to feed items. Resource /chatter/feed-items/feedItemId/topics

Available versions 28.0–31.0 Important: In version 32.0 and later, use Feed Elements Capability, Topics. Requires Chatter Yes HTTP methods DELETE, POST Request parameter for DELETE Parameter Name

Type

Description

Required or Optional Available Version

topicId

String

ID of an existing topic

Required

248

28.0–31.0

Chatter REST API Developer Guide

Feed Items Resources

Request body for POST Root XML tag

JSON The following example attaches a new topic to a feed item: { "topicName": "W3C" }

Properties Name

Type

Description

Required or Optional

Available Version

topicId

String

ID of an existing topic

Required for existing topics if the 29.0 topicName property isn’t used

topicName

String

Name of a new or existing topic, Required for new topics; 29.0 up to 150 characters required for existing topics if the topicId property isn’t used

Request parameters for POST Parameter Name

Type

Description

Required or Optional Available Version

topicId

String

ID of an existing topic

Required for existing topics if the

28.0–31.0

topicName

parameter isn’t used topicName

String

Name of a new or Required for new topics; 28.0–31.0 existing topic, up to 150 required for existing characters topics if the topicId parameter isn’t used

Response body for DELETE 204: Successful Delete Response body for POST Topic Example for POST This example passes the ID of an existing topic in the topidId parameter to associate it with a feed item: /chatter/feed-items/0D5D0000000JmiB/topics?topicId=0TOD0000000090r

249

Chatter REST API Developer Guide

Feeds Resources

Feeds Resources Feeds are made up of feed items. There are many feed types. Each feed type has an algorithm that determines which feed items it contains. The news feed, record feed, and user profile feed support GET and POST requests. All other feeds support GET requests. IN THIS SECTION: Bookmarks Feed Resources A feed containing feed elements saved as bookmarks by the context user. Communities Direct Message Moderation Feed Resources The feed containing direct messages that are flagged for moderation in a community. This feed is available only to users with Moderate Communities Chatter Messages permissions. Communities Home Feed Resources The feed containing feed elements and comments from the community home. Communities Moderation Feed Resources A feed containing feed elements and comments that have been flagged for moderation in a community. Company Feed Resources A feed containing all feed elements and comments from an entire company. Direct Messages Feed Resources The feed of direct messages. Favorites Feed Resources A feed containing favorites saved by the context user. Feeds Resource A list of all of the feeds the context user is able to view. Files Feed Resources A feed containing all the feed elements that contain files posted by people or groups that the context user follows. Filter Feed Resources The filter feed is the news feed filtered to contain feed elements whose parent is a specified object type. Groups Feed Resources A feed containing all feed elements from all groups the context user either owns or is a member of. Landing Feed Resource Get information about the landing feed for internal communities and a page of feed elements. Mute Feed Resources A feed containing feed elements that the context user muted. News Feed Resources A feed containing feed elements of interest to the context user. You can post feed items to the news feed. Pending Review Feed Resources The feed containing feed elements and comments that are pending review. People Feed Resources All feed elements posted by all of the people the context user follows.

250

Chatter REST API Developer Guide

Feeds Resources

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. You can get another user’s record feed. Streams Feed Resources The feed of a stream. To Feed Resources A feed containing all @mentions of the context user and posts others have made to the context user's feed. Topics Feed Resources The feed of the specified topic. User Profile Feed Resources Contains feed elements created when a user changes records that can be tracked in a feed, feed elements whose parent is the user, and feed elements that mention the user. This feed is different than the news feed, which returns more feed items, including group updates. You can post feed items to the user-profile feed. You can get another user’s user profile feed. SEE ALSO: Feeds and Feed Elements

Bookmarks Feed Resources A feed containing feed elements saved as bookmarks by the context user. To bookmark an item, use PATCH with the Feed Elements Capability, Bookmarks resource and the isBookmarkedByCurrentUser parameter. For example: /chatter/feed-elements/0D5D0000000Ir6zKAC/capabilities/bookmarks?isBookmarkedByCurrentUser=true

Available resources are: Resource

Description

/chatter/feeds/bookmarks/me

Returns the URL for the bookmarks feed for the context user.

/chatter/feeds/bookmarks/me/feed-elements Returns all feed elements bookmarked by the context user.

Bookmarks Feed URL Returns the URL for the bookmarks feed for the context user. Resource /chatter/feeds/bookmarks/userId /connect/communities/communityId/chatter/feeds/bookmarks/userId

Note: userId must be the ID of the context user or the alias me. Available since version 24.0 Requires Chatter Yes

251

Chatter REST API Developer Guide

Feeds Resources

HTTP methods GET or HEAD Request parameter Parameter Name

Type

Description

sort

String

Specifies the order of feed items in the feed. • CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

Response body Feed

Bookmarks Feed Elements Returns all feed elements bookmarked by the context user. Resource /chatter/feeds/bookmarks/userId/feed-elements /connect/communities/communityId/chatter/feeds/bookmarks/userId/feed-elements

Note: userId must be the ID of the context user or the alias me. Available since version 24.0

252

Chatter REST API Developer Guide

Feeds Resources

Requires Chatter Yes HTTP methods GET or HEAD Request parameters for GET Parameter Name

Type

Description

Required Available or Version Optional

density

String

The density of the feed. One of these values:

Optional

31.0

Optional

31.0

Optional

31.0

Specifies the number of elements per page. Valid values Optional are between 1 and 100. If you don't specify a size, the default is 25.

31.0

• AllUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations. • FewerUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations, but hides some system-generated updates from records. The default value is AllUpdates. elementsPerBundle Integer

Maximum number of feed elements to include in a bundle. The value must be an integer between 0 and 10. The default value is 3. Note: Bundled posts contain feed-tracked changes. In Salesforce for Android and Salesforce for iOS, bundled posts are in record feeds only.

page

String

A generated token that indicates the view of feed elements in the feed. Page tokens are returned as part of the response body, in one of the URL parameters, such as nextPageURL, for example: "nextPageUrl": "/services/data/v41.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-elements ?page=2011-03-30T17:34:50Z, 0D5D0000000DSv4KAG"

pageSize

Integer

253

Chatter REST API Developer Guide

Feeds Resources

Parameter Name

Type

Description

Required Available or Version Optional

q

String

One or more keywords to search for in the body and comments of feed elements in this feed.

Optional

31.0

Maximum number of comments to include per feed Optional element. The default value is 3. The maximum value is 25.

31.0

Specifies the order of feed items in the feed.

31.0

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

sort

String

• CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

Response body Feed Element Page

Bookmarks Feed Items Returns all feed items bookmarked by the context user. Resource /chatter/feeds/bookmarks/me/feed-items

OR /chatter/feeds/bookmarks/userId/feed-items

Note: userId must be the ID of the context user or the alias me.

254

Optional

Chatter REST API Developer Guide

Feeds Resources

Available versions 24.0–31.0 Important: In version 32.0 and later, use Bookmarks Feed Elements. Requires Chatter Yes HTTP methods GET or HEAD Request parameters Parameter Name

Type

Description

Required Available or Version Optional

density

String

The density of the feed. One of these values:

Optional

29.0–31.0

A generated token that indicates the view of feed items Optional in the feed. Page tokens are returned as part of the response body, in one of the URL parameters, such as nextPageURL, for example:

23.0–31.0

• AllUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations. • FewerUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations, but hides some system-generated updates from records. The default value is AllUpdates. page

String

"nextPageUrl": "/services/data/v41.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-items ?page=2011-03-30T17:34:50Z, 0D5D0000000DSv4KAG"

pageSize

Integer

Specifies the number of items per page. Valid values Optional are between 1 and 100. If you don't specify a size, the default is 25.

23.0–31.0

q

String

One or more keywords to search for in the body and comments of feed items in this feed.

28.0–31.0

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

255

Optional

Chatter REST API Developer Guide

Parameter Name

Type

recentComment Integer Count sort

String

Feeds Resources

Description

Required Available or Version Optional

Maximum number of comments to include per feed Optional item. The default value is 3. The maximum value is 25.

29.0–31.0

Specifies the order of feed items in the feed.

23.0–31.0

Optional

• CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

Response body Feed Item Page

Bookmarks 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 /chatter/feeds/bookmarks/me/feed-items/flat

or /chatter/feeds/bookmarks/userId/feed-items/flat

Note: userId must be the ID of the context user or the alias me. Available since version 25.0–26.0 Requires Chatter Yes

256

Chatter REST API Developer Guide

Feeds Resources

HTTP methods GET or HEAD Request parameters Parameter Name

Type

Description

numFeedItems

Integer

Specifies the number of feed items returned. Valid values are from 0 through 100. Default value is 25. Because feed items can 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.

recentCommentCount

Integer

Specifies the number of recent comments returned. Valid values are from 0 through 25. Default value is 3.

sort

String. One of the following:

Sorts the returned feed either by created date in ascending order, or by last modified date, also in ascending order. The default is LastModifiedDateDesc

• CreatedDateDesc • LastModifiedDateDesc

Response body Flat Feed SEE ALSO: Feeds and Feed Elements

Communities Direct Message Moderation Feed Resources The feed containing direct messages that are flagged for moderation in a community. This feed is available only to users with Moderate Communities Chatter Messages permissions. Available resources are: Resource

Description

/connect/communities/communityId /chatter/feeds/direct-message-moderation

Get the URL to the direct message moderation feed and a page of feed elements.

257

Chatter REST API Developer Guide

Feeds Resources

Resource

Description

/connect/communities/communityId Get all the direct messages that are flagged for moderation in the /chatter/feeds/direct-message-moderation/feed-elements community.

Communities Direct Message Moderation Feed URL Get the URL to the direct message moderation feed and a page of feed elements. This feed is available only to users with Moderate Communities Chatter Messages permissions. Resource /connect/communities/communityId/chatter/feeds/direct-message-moderation

Available since version 40.0 Requires Chatter Yes HTTP methods GET, HEAD Request parameters Parameter Name

Type

Description

pageSize

Integer

Specifies the number of feed elements per page. Valid values are from 1 through 100. If you pass in 0, feed elements aren’t returned with the feed.

recentCommentCount

Integer

The maximum number of comments to return with each feed element. The default value is 3.

sort

String

Specifies the order of feed items in the feed. • CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when

258

Chatter REST API Developer Guide

Feeds Resources

Parameter Name

Type

Description the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

Response body Feed

Communities Direct Message Moderation Feed Elements Get all the direct messages that are flagged for moderation in the community. This feed is available only to users with Moderate Communities Chatter Messages permissions. Resource /connect/communities/communityId/chatter/feeds/direct-message-moderation/feed-elements

Available since version 40.0 Requires Chatter Yes HTTP methods GET, HEAD Request parameters Parameter Name

Type

Description

Required Available or Version Optional

page

String

A generated token that indicates the view of feed elements Optional in the feed. Page tokens are returned as part of the response body in one of the URL parameters, such as nextPageURL: "nextPageUrl": "/services/data/v41.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-elements ?page=2011-03-30T17:34:50Z, 0D5D0000000DSv4KAG"

259

40.0

Chatter REST API Developer Guide

Feeds Resources

Parameter Name

Type

Description

Required Available or Version Optional

pageSize

Integer

Specifies the number of elements per page. Valid values are Optional from 1 through 100. If you don't specify a size, the default is 25.

40.0

q

String

One or more keywords to search for in the body and comments of feed elements in this feed.

Optional

40.0

Optional

40.0

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

String

Specifies the order of feed items in the feed. • CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

Response body Feed Element Page

Communities Home Feed Resources The feed containing feed elements and comments from the community home. Available resources are: Resource

Description

/connect/communities/communityId /chatter/feeds/home

Get the URL to the communities home feed and a page of feed elements.

/connect/communities/communityId /chatter/feeds/home/feed-elements

Get all feed elements from the communities home feed.

260

Chatter REST API Developer Guide

Feeds Resources

Communities Home Feed URL Get the URL to the communities home feed and a page of feed elements. Resource /connect/communities/communityId/chatter/feeds/home

Available since version 32.0 Requires Chatter Yes HTTP methods GET, HEAD Request parameters Parameter Name

Type

Description

pageSize

Integer

Specifies the number of feed elements per page. Valid values are from 1 through 100. If you pass in 0, feed elements aren’t returned with the feed.

recentCommentCount

Integer

The maximum number of comments to return with each feed element. The default value is 3.

sort

String

Specifies the order of feed items in the feed. • CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

261

Chatter REST API Developer Guide

Feeds Resources

Response body Feed

Communities Home Feed Elements Get all feed elements from the communities home feed. Resource /connect/communities/communityId/chatter/feeds/home/feed-elements

Available since release 32.0 Requires Chatter Yes HTTP methods GET, HEAD GET parameters Parameter Name Type

filter

String

Description

Required Available or Version Optional

Specifies a filter value for a feed.

Optional

• AllQuestions—Feed elements that are questions. • AuthoredBy—Feed elements authored by the user profile owner. This value is valid only for the UserProfile feed. • CommunityScoped—Feed elements that are scoped to communities. Currently, these feed elements have a User or a Group parent record. However, other parent record types could be scoped to communities in the future. Feed elements that are always visible in all communities are filtered out. This value is valid only for the UserProfile feed. • QuestionsWithCandidateAnswers—Feed elements that are questions that have candidate answers associated with them. This value is valid only for users with the Access Einstein-Generated Answers permission. • QuestionsWithCandidateAnswers ReviewedPublished—Feed elements that are questions that have candidate answers that have been reviewed or published. This value is valid only for users with the Access Einstein-Generated Answers permission.

262

32.0

Chatter REST API Developer Guide

Parameter Name Type

Feeds Resources

Description

Required Available or Version Optional

• Read—Feed elements that are older than 30 days or are marked as read for the context user. Includes existing feed elements when the context user joined the group. This value is valid only for the Record feed of a group. • SolvedQuestions—Feed elements that are questions and that have a best answer. • UnansweredQuestions—Feed elements that are questions and that don’t have any answers. • UnansweredQuestionsWithCandidate Answers—Feed elements that are questions that don’t have answers but have candidate answers associated with them. This value is valid only for users with the Access Einstein-Generated Answers permission. • Unread—Feed elements that are created in the past 30 days and aren’t marked as read for the context user. This value is valid only for the Record feed of a group. • UnsolvedQuestions—Feed elements that are questions and that don’t have a best answer. page

String

A generated token that indicates the view of feed Optional elements in the feed. Page tokens are returned as part of the response body, in one of the URL parameters, such as nextPageURL, for example:

29.0

"nextPageUrl": "/services/data/v41.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-elements ?page=2011-03-30T17:34:50Z, 0D5D0000000DSv4KAG"

When the sort parameter is MostViewed, the page parameter can’t be used. pageSize

Integer

Specifies the number of elements per page. Valid values Optional are between 1 and 100. If you don't specify a size, the default is 25. When the sort parameter is MostViewed, the pageSize must be a value from 1 to 25.

263

29.0

Chatter REST API Developer Guide

Parameter Name Type

q

String

Feeds Resources

Description

Required Available or Version Optional

One or more keywords to search for in the body and comments of feed elements in this feed.

Optional

29.0

Optional

29.0

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

String

Specifies the order of feed items in the feed. • CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

Response body for GET Feed Element Page

Communities Moderation Feed Resources A feed containing feed elements and comments that have been flagged for moderation in a community. Available resources are: Resource

Description

/connect/communities/communityId /chatter/feeds/moderation

If the context user is a community moderator with the Moderate Communities Feeds permission, returns the URL to the communities moderation feed and a page of feed elements.

/connect/communities/communityId /chatter/feeds/moderation/feed-elements

If the context user is a community moderator with the Moderate Communities Feeds permission, returns a list of all feed elements and comments in the community that have been flagged by community members. By default, returns 25 feed elements per page of results.

264

Chatter REST API Developer Guide

Feeds Resources

Communities Moderation Feed URL If the context user is a community moderator with the Moderate Communities Feeds permission, returns the URL to the communities moderation feed and a page of feed elements. Resource /connect/communities/communityId/chatter/feeds/moderation

Available since version 32.0 Requires Chatter Yes HTTP methods GET, HEAD Request parameters Parameter Name

Type

Description

pageSize

Integer

Specifies the number of feed elements per page. Valid values are from 1 through 100. If you pass in 0, feed elements aren’t returned with the feed.

recentCommentCount

Integer

The maximum number of comments to return with each feed element. The default value is 3.

sort

String

Specifies the order of feed items in the feed. • CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds.

265

Chatter REST API Developer Guide

Parameter Name

Feeds Resources

Type

Description The default value is CreatedDateDesc.

Response body Feed

Communities Moderation Feed Elements If the context user is a community moderator with the Moderate Communities Feeds permission, returns a list of all feed elements and comments in the community that have been flagged by community members. By default, returns 25 feed elements per page of results. Resource /connect/communities/communityId/chatter/feeds/moderation/feed-elements

Available since release 31.0 Requires Chatter Yes HTTP methods GET, HEAD GET parameters Parameter Name Type

page

String

Description

Required Available or Version Optional

A generated token that indicates the view of feed Optional elements in the feed. Page tokens are returned as part of the response body, in one of the URL parameters, such as nextPageURL, for example:

29.0

"nextPageUrl": "/services/data/v41.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-elements ?page=2011-03-30T17:34:50Z, 0D5D0000000DSv4KAG"

pageSize

Integer

Specifies the number of elements per page. Valid values Optional are between 1 and 100. If you don't specify a size, the default is 25.

266

29.0

Chatter REST API Developer Guide

Parameter Name Type

q

String

Feeds Resources

Description

Required Available or Version Optional

One or more keywords to search for in the body and comments of feed elements in this feed.

Optional

29.0

Optional

29.0

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

String

Specifies the order of feed items in the feed. • CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

Response body for GET Feed Element Page If a feed element has comments, the Comment Page response body contains a value in the total property to indicate the number of comments. However the comments property doesn’t contain a collection of comments. For example, this excerpt from a response shows a total of 2 comments, but no information about the comments: "comments": { "comments": [], "currentPageUrl": "/services/data/v41.0/connect/communities/0DBD000000002etOAA /chatter/feed-elements/0D5D0000000LYi9KAG/comments", "nextPageUrl": null, "total": 2 },

Communities Moderation Feed Items If the context user is a community moderator with the Moderate Communities Feeds permission, returns a list of all feed elements and comments in the community that have been flagged by community members. By default, returns 25 feed items per page of results.

267

Chatter REST API Developer Guide

Feeds Resources

Resource /connect/communities/communityId/chatter/feeds/moderation/feed-items

Available versions 29.0–31.0 Important: In version 32.0 and later, use Communities Moderation Feed Elements. Requires Chatter Yes HTTP methods GET, HEAD GET parameters Parameter Name Type

page

String

Description

Required Available or Version Optional

A generated token that indicates the view of feed items Optional in the feed. Page tokens are returned as part of the response body, in one of the URL parameters, such as nextPageURL, for example:

29.0–31.0

"nextPageUrl": "/services/data/v41.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-items ?page=2011-03-30T17:34:50Z, 0D5D0000000DSv4KAG"

pageSize

Integer

Specifies the number of items per page. Valid values Optional are between 1 and 100. If you don't specify a size, the default is 25.

29.0–31.0

q

String

One or more keywords to search for in the body and comments of feed items in this feed.

Optional

29.0–31.0

Optional

29.0–31.0

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

String

Specifies the order of feed items in the feed. • CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity.

268

Chatter REST API Developer Guide

Parameter Name Type

Feeds Resources

Description

Required Available or Version Optional

• MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

Response body for GET Feed Item Page If a feed item has comments, the Comment Page response body contains a value in the total property to indicate the number of comments. However the comments property doesn’t contain a collection of comments. For example, this excerpt from a response shows a total of 2 comments, but no information about the comments: "comments": { "comments": [], "currentPageUrl": "/services/data/v41.0/connect/communities/0DBD000000002etOAA /chatter/feed-items/0D5D0000000LYi9KAG/comments", "nextPageUrl": null, "total": 2 },

Example for GET This example makes a GET request. GET /connect/communities/0DBD000000002etOAA/chatter/feeds/moderation/feed-items

The response is a Feed Item Page response body. SEE ALSO: Feeds and Feed Elements

Company Feed Resources A feed containing all feed elements and comments from an entire company. The company feed includes posts and comments from: • People in the company, the ones a user follows and the ones a user doesn’t follow • Public groups, including the ones a user is not a member of • Private groups a user is a member of • Updates for records and fields that an administrator configured for feed tracking, including the ones a user is not following. However, a user only sees updates for records they are allowed to access. Please note the following:

269

Chatter REST API Developer Guide

Feeds Resources

• These resources are not available for communities. Available resources are: Resource

Description

/chatter/feeds/company

Returns a URL to the company feed and a page of feed elements.

/chatter/feeds/company/feed-elements

Returns the feed elements of a company feed.

Company Feed URL Returns a URL to the company feed and a page of feed elements. Resource /chatter/feeds/company

Available since version 23.0 Requires Chatter Yes HTTP methods GET or HEAD Request parameters Parameter Name

Type

Description

pageSize

Integer

Specifies the number of feed elements per page. Valid values are from 1 through 100. If you pass in 0, feed elements aren’t returned with the feed.

recentCommentCount

Integer

The maximum number of comments to return with each feed element. The default value is 3.

sort

String

Specifies the order of feed items in the feed. • CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is

270

Chatter REST API Developer Guide

Feeds Resources

Parameter Name

Type

Description available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

Response body Feed

Company Feed Elements Returns the feed elements of a company feed. Resource /chatter/feeds/company/feed-elements

Available since version 31.0 Requires Chatter Yes HTTP methods GET, HEAD Request parameters Parameter Name

Type

Description

Required Available or Version Optional

density

String

The density of the feed. One of these values:

Optional

• AllUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations. • FewerUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations, but hides some system-generated updates from records. The default value is AllUpdates.

271

31.0

Chatter REST API Developer Guide

Parameter Name

Feeds Resources

Type

elementsPerBundle Integer

page

String

Description

Required Available or Version Optional

Maximum number of feed elements to include in a bundle. Optional The value must be an integer from 0 through 10. The default value is 3.

31.0

A generated token that indicates the view of feed elements Optional in the feed.

31.0

Page tokens are returned as part of the response body in one of the URL parameters, such as nextPageURL: "nextPageUrl": "/services/data/v41.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-elements ?page=2011-03-30T17:34:50Z, 0D5D0000000DSv4KAG"

pageSize

Integer

Specifies the number of elements per page. Valid values are Optional from 1 through 100. If you don't specify a size, the default is 25.

31.0

q

String

One or more keywords to search for in the body and comments of feed elements in this feed.

Optional

31.0

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

Integer

Maximum number of comments to include per feed element. The default value is 3. The maximum value is 25.

Optional

31.0

sort

String

Specifies the order of feed items in the feed.

Optional

31.0

• CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds.

272

Chatter REST API Developer Guide

Parameter Name

Feeds Resources

Type

Description

Required Available or Version Optional

The default value is CreatedDateDesc. updatedSince

String

An opaque token defining the modification time stamp of Optional the feed and the sort order.

31.0

Do not construct this token. Retrieve this token from the updatesToken property of the Feed Element Page response body. The updatedSince parameter doesn’t return feed elements that are created in the same second as the request.

Response body Feed Element Page

Company Feed Items Returns the feed items of a company feed. Resource /chatter/feeds/company/feed-items

Available versions 23.0–31.0 Important: In version 32.0 and later, use Company Feed Elements. Requires Chatter Yes HTTP methods GET, HEAD Request parameters Parameter Name

Type

Description

Required Available or Version Optional

density

String

The density of the feed. One of these values:

Optional

• AllUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations. • FewerUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations, but hides some system-generated updates from records. The default value is AllUpdates.

273

29.0–31.0

Chatter REST API Developer Guide

Feeds Resources

Parameter Name

Type

Description

Required Available or Version Optional

page

String

A generated token that indicates the view of feed elements Optional in the feed.

23.0–31.0

Page tokens are returned as part of the response body, in one of the URL parameters, such as nextPageURL, for example: "nextPageUrl": "/services/data/v41.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-elements ?page=2011-03-30T17:34:50Z, 0D5D0000000DSv4KAG"

pageSize

Integer

Specifies the number of items per page. Valid values are Optional between 1 and 100. If you don't specify a size, the default is 25.

23.0–31.0

q

String

One or more keywords to search for in the body and comments of feed elements in this feed.

Optional

28.0–31.0

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

Integer

Maximum number of comments to include per feed item. Optional The default value is 3. The maximum value is 25.

29.0–31.0

sort

String

Specifies the order of feed items in the feed.

23.0–31.0

• CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

274

Optional

Chatter REST API Developer Guide

Feeds Resources

Parameter Name

Type

Description

Required Available or Version Optional

updatedSince

String

An opaque token defining the modification time stamp of Optional the feed and the sort order.

30.0–31.0

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

Response body Feed Item Page SEE ALSO: Feeds and Feed Elements

Direct Messages Feed Resources The feed of direct messages. Available resources are: Resource

Description

/chatter/feeds/direct-messages

Get the URL to the context user’s direct messages feed and a page of feed elements.

/chatter/feeds/direct-messages/feed-elements Get all the feed elements for the context user’s direct messages.

Direct Messages Feed URL Get the URL to the context user’s direct messages feed and a page of feed elements. Resource /chatter/feeds/direct-messages /connect/communities/communityId/chatter/feeds/direct-messages

Available since version 39.0 Requires Chatter Yes HTTP methods GET, HEAD

275

Chatter REST API Developer Guide

Feeds Resources

Request parameters Parameter Name

Type

Description

pageSize

Integer

Specifies the number of feed elements per page. Valid values are from 1 through 100. If you pass in 0, feed elements aren’t returned with the feed.

recentCommentCount

Integer

The maximum number of comments to return with each feed element. The default value is 3.

sort

String

Specifies the order of feed items in the feed. • CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

Response body Feed

Direct Messages Feed Elements Get all the feed elements for the context user’s direct messages.

276

Chatter REST API Developer Guide

Feeds Resources

Resource /chatter/feeds/direct-messages/feed-elements /connect/communities/communityId/chatter/feeds/direct-messages/feed-elements

Available since version 39.0 Requires Chatter Yes HTTP methods GET, HEAD Request parameters Parameter Name

Type

Description

Required Available or Version Optional

page

String

A generated token that indicates the view of feed elements Optional in the feed.

31.0

Page tokens are returned as part of the response body in one of the URL parameters, such as nextPageURL: "nextPageUrl": "/services/data/v41.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-elements ?page=2011-03-30T17:34:50Z, 0D5D0000000DSv4KAG"

pageSize

Integer

Specifies the number of elements per page. Valid values are Optional from 1 through 100. If you don't specify a size, the default is 25.

31.0

recentComment Count

Integer

Maximum number of comments to include per feed element. The default value is 3. The maximum value is 25.

Optional

31.0

sort

String

Specifies the order of feed items in the feed. The only valid Optional value is LastModifiedDateDesc, which sorts the feed by the most recent activity.

31.0

Response body Feed Element Page

Favorites Feed Resources A feed containing favorites saved by the context user. Favorites are feed searches, list views, and topics that the context user has added as a Chatter favorite.

277

Chatter REST API Developer Guide

Feeds Resources

Available resources are: Resource

Description

/chatter/feeds/favorites/me

Returns all the favorites for the context user. Creates a favorite of a Chatter feed search or topic.

/chatter/feeds/favorites/me/favoriteId

Returns the feed for the specified favorite. Deletes the specified favorite. Updates the last view date of the specified favorite.

/chatter/feeds/favorites/me/favoriteId/feed-elements Returns a filtered feed, only showing those feed elements for the

specified favorite.

List of Favorites Returns all the favorites for the context user. Creates a favorite of a Chatter feed search or topic. Note: The response contains feed searches that were saved using the web UI. However, you can’t use Chatter API to save a feed search. Resource /chatter/feeds/favorites/userId /connect/communities/communityId/chatter/feeds/favorites/userId

Note: userId must be the ID of the context user or the alias me. Available since version 24.0 Requires Chatter Yes HTTP methods GET, HEAD, or POST Request body for POST Root XML tag

JSON for POST { "searchText" : "release", "targetId" : "0TOD0000000099d" }

Properties for POST Name

Type

Description

Available Version

searchText

String

Text of the feed search. Use this parameter for feed searches only.

24.0

278

Chatter REST API Developer Guide

Feeds Resources

Name

Type

Description

Available Version

targetId

String

Id of the topic. Use this parameter for topics only.

28.0

Request parameters for POST Name

Type

Description

Available Version

searchText

String

Text of the feed search. Use this 24.0 parameter for feed searches only.

targetId

String

Id of the topic. Use this parameter for topics only.

28.0

Response body for GET Favorites Page Response body for POST Favorite

Favorite Returns the feed for the specified favorite. Deletes the specified favorite. Updates the last view date of the specified favorite. Resource /chatter/feeds/favorites/userId/favoriteId /connect/communities/communityId/chatter/feeds/favorites/userId/favoriteId

Note: userId must be the ID of the context user or the alias me. Available since version 24.0 Requires Chatter Yes HTTP methods GET, HEAD, PATCH, or DELETE Request parameter for GET or HEAD Parameter Name

Type

Description

sort

String

Specifies the order of feed items in the feed. • CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration,

279

Chatter REST API Developer Guide

Feeds Resources

Parameter Name

Type

Description Moderation, and PendingReview feeds.

• CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

Request body for PATCH Root XML tag

JSON for PATCH { "updateLastViewDate" : "true" }

Properties for PATCH Name

Type

Description

Available Version

updateLastViewDate

Boolean

Sets the last view date of the specified feed favorite to the current system time. Default value is false.

24.0

Request parameter for PATCH Parameter Name

Type

Description

updateLastViewDate

Boolean

Sets the last view date of the specified feed favorite to the current system time. Default value is false.

280

Chatter REST API Developer Guide

Feeds Resources

Response body for GET Favorite Response body for PATCH Favorite

Favorites Feed Items Returns a filtered feed, only showing those feed items for the specified favorite. Resource /chatter/feeds/favorites/me/favoriteId/feed-items

or /chatter/feeds/favorites/userId/favoriteId/feed-items

Note: userId must be the ID of the context user or the alias me. Available versions 24.0–31.0 Important: In version 32.0 and later, use Favorites Feed Elements. Requires Chatter Yes HTTP methods GET or HEAD Request parameters Parameter Name

Type

Description

Required Available or Version Optional

density

String

The density of the feed. One of these values:

Optional

29.0–31.0

A generated token that indicates the view of feed items Optional in the feed. Page tokens are returned as part of the

23.0–31.0

• AllUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations. • FewerUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations, but hides some system-generated updates from records. The default value is AllUpdates. page

String

281

Chatter REST API Developer Guide

Parameter Name

Type

Feeds Resources

Description

Required Available or Version Optional

response body, in one of the URL parameters, such as nextPageURL, for example: "nextPageUrl": "/services/data/v41.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-items ?page=2011-03-30T17:34:50Z, 0D5D0000000DSv4KAG"

pageSize

Integer

Specifies the number of items per page. Valid values Optional are from 1 through 100. If you don't specify a size, the default is 25.

23.0–31.0

q

String

One or more keywords to search for in the body and comments of feed items in this feed.

Optional

28.0–31.0

Maximum number of comments to include per feed Optional item. The default value is 3. The maximum value is 25.

29.0–31.0

Specifies the order of feed items in the feed.

23.0–31.0

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

String

• CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

282

Optional

Chatter REST API Developer Guide

Feeds Resources

Response body Feed Item Page SEE ALSO: Feeds and Feed Elements

Favorites Feed Elements Returns a filtered feed, only showing those feed elements for the specified favorite. Resource /chatter/feeds/favorites/userId/favoriteId/feed-elements /connect/communities/communityId/chatter/feeds/favorites/userId/favoriteId/feed-elements

Note: userId must be the ID of the context user or the alias me. Available version 31.0 Requires Chatter Yes HTTP methods GET Request parameters for GET Parameter Name

Type

Description

Required or Optional

Available Version

elementsPer Bundle

Integer

The maximum number of feed elements per bundle. The default and maximum value is 10.

Optional

31.0

Note: Bundled posts contain feed-tracked changes. In Salesforce for Android and Salesforce for iOS, bundled posts are in record feeds only. page

String

The page token to use to view the page. Optional Page tokens are returned as part of the response class, for example, currentPageToken or nextPageToken. If you pass in null, the first page is returned.

31.0

pageSize

Integer

Specifies the number of feed elements per Optional page. Valid values are from 1 through 100. If you pass in null, the default size is 25.

31.0

283

Chatter REST API Developer Guide

Parameter Name

Type

recentComment Integer Count

sort

String

Feeds Resources

Description

Required or Optional

Available Version

The maximum number of comments to Optional return with each feed element. The default value is 3.

31.0

Specifies the order of feed items in the feed.

31.0

Optional

• CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. If you pass in null, the default value CreatedDateDesc is used.

Response body for GET Feed Element Page

Feeds Resource A list of all of the feeds the context user is able to view. Each user may have a different set of feeds. Use this resource to determine what feeds are available. In addition, the different feeds may have unique labels as well as URLs. Use the given labels returned in this resource and avoid hard-coding any of these values. Resource /chatter/feeds/ /connect/communities/communityId/chatter/feeds/

Available since version 23.0

284

Chatter REST API Developer Guide

Feeds Resources

Requires Chatter Yes HTTP methods GET or HEAD Response body Feed Directory

Files Feed Resources A feed containing all the feed elements that contain files posted by people or groups that the context user follows. Available resources are: Resource

Description

/chatter/feeds/files/me

Returns the URL to the feed elements that contain files that are posted by users or groups the context user is following.

/chatter/feeds/files/me/feed-elements

Returns all feed elements posted with files by people or groups that the context user follows.

Files Feed URL Returns the URL to the feed elements that contain files that are posted by users or groups the context user is following. Resource /chatter/feeds/files/userId /connect/communities/communityId/chatter/feeds/files/userId

Note: userId must be the ID of the context user or the alias me. Available since version 23.0 Requires Chatter Yes HTTP methods GET or HEAD Request parameter Parameter Name

Type

Description

sort

String

Specifies the order of feed items in the feed. • CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration,

285

Chatter REST API Developer Guide

Parameter Name

Feeds Resources

Type

Description Moderation, and PendingReview feeds.

• CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

Response body Feed

Files Feed Elements Returns all feed elements posted with files by people or groups that the context user follows. Resource /chatter/feeds/files/userId/feed-elements /connect/communities/communityId/chatter/feeds/files/userId/feed-elements

Note: userId must be the ID of the context user or the alias me. Available since version 31.0 Requires Chatter Yes HTTP methods GET, HEAD

286

Chatter REST API Developer Guide

Feeds Resources

Request parameters Parameter Name

Type

Description

Required Available or Version Optional

density

String

The density of the feed. One of these values:

Optional

31.0

Maximum number of feed elements to include in a bundle. Optional The value must be an integer from 0 through 10. The default value is 3.

31.0

A generated token that indicates the view of feed elements Optional in the feed.

31.0

• AllUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations. • FewerUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations, but hides some system-generated updates from records. The default value is AllUpdates. elementsPerBundle Integer

page

String

Page tokens are returned as part of the response body in one of the URL parameters, such as nextPageURL: "nextPageUrl": "/services/data/v41.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-elements ?page=2011-03-30T17:34:50Z, 0D5D0000000DSv4KAG"

pageSize

Integer

Specifies the number of elements per page. Valid values are Optional from 1 through 100. If you don't specify a size, the default is 25.

31.0

q

String

One or more keywords to search for in the body and comments of feed elements in this feed.

Optional

31.0

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

Integer

Maximum number of comments to include per feed element. The default value is 3. The maximum value is 25.

Optional

31.0

sort

String

Specifies the order of feed items in the feed.

Optional

31.0

• CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds.

287

Chatter REST API Developer Guide

Parameter Name

Feeds Resources

Type

Description

Required Available or Version Optional

• CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc. updatedSince

String

An opaque token defining the modification time stamp of Optional the feed and the sort order. Do not construct this token. Retrieve this token from the updatesToken property of the Feed Element Page response body. The updatedSince parameter doesn’t return feed elements that are created in the same second as the request.

Response body Feed Element Page

Files Feed Items Returns all feed items posted with files by people or groups that the context user follows. Resource /chatter/feeds/files/me/feed-items

or /chatter/feeds/files/userId/feed-items

Note: userId must be the ID of the context user or the alias me. Available versions 23.0–31.0 Important: In version 32.0 and later, use Files Feed Elements. Requires Chatter Yes

288

31.0

Chatter REST API Developer Guide

Feeds Resources

HTTP methods GET, HEAD Request parameters Parameter Name

Type

Description

Required Available or Version Optional

density

String

The density of the feed. One of these values:

Optional

29.0–31.0

A generated token that indicates the view of feed elements Optional in the feed.

23.0–31.0

• AllUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations. • FewerUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations, but hides some system-generated updates from records. The default value is AllUpdates. page

String

Page tokens are returned as part of the response body, in one of the URL parameters, such as nextPageURL, for example: "nextPageUrl": "/services/data/v41.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-elements ?page=2011-03-30T17:34:50Z, 0D5D0000000DSv4KAG"

pageSize

Integer

Specifies the number of items per page. Valid values are Optional between 1 and 100. If you don't specify a size, the default is 25.

23.0–31.0

q

String

One or more keywords to search for in the body and comments of feed elements in this feed.

Optional

28.0–31.0

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

Integer

Maximum number of comments to include per feed item. Optional The default value is 3. The maximum value is 25.

29.0–31.0

sort

String

Specifies the order of feed items in the feed.

23.0–31.0

• CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds.

289

Optional

Chatter REST API Developer Guide

Parameter Name

Feeds Resources

Type

Description

Required Available or Version Optional

• CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc. updatedSince

String

An opaque token defining the modification time stamp of Optional the feed and the sort order.

30.0–31.0

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

Response body Feed Item Page

Files 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 /chatter/feeds/files/me/feed-items/flat

or /chatter/feeds/files/userId/feed-items/flat

Note: userId must be the ID of the context user or the alias me. Available since version 25.0–26.0 Requires Chatter Yes HTTP methods GET or HEAD

290

Chatter REST API Developer Guide

Feeds Resources

Request parameters Parameter Name

Type

Description

numFeedItems

Integer

Specifies the number of feed items returned. Valid values are from 0 through 100. Default value is 25. Because feed items can 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.

recentCommentCount

Integer

Specifies the number of recent comments returned. Valid values are from 0 through 25. Default value is 3.

sort

String. One of the following:

Sorts the returned feed either by created date in ascending order, or by last modified date, also in ascending order. The default is LastModifiedDateDesc

• CreatedDateDesc • LastModifiedDateDesc

Response body Flat Feed SEE ALSO: Feeds and Feed Elements

Filter Feed Resources The filter feed is the news feed filtered to contain feed elements whose parent is a specified object type. Available resources are: Resource

Description

/chatter/feeds/filter/userId

A collection of feed directory objects that contain information about filter feeds available to the context user. Each object contains a URL for the filter feed, a URL for feed items or feed elements in the filter feed, and a label describing the object used to filter the feed.

/chatter/feeds/filter/userId/idPrefix

A feed object that contains information about a specific filter feed available to the context user.

291

Chatter REST API Developer Guide

Feeds Resources

Resource

Description

/chatter/feeds/filter/userId/idPrefix /feed-elements

Feed elements from the context user’s news feed whose parent has the specified key prefix, such as the feed elements from all the groups the context user is a member of.

List of Filter Feed URLs A collection of feed directory objects that contain information about filter feeds available to the context user. Each object contains a URL for the filter feed, a URL for feed items or feed elements in the filter feed, and a label describing the object used to filter the feed. Each URL contains the first three characters of the filter object, which is called a key prefix and specifies the object type. Use this resource to return a list of the possible key prefix filter feeds that the context user can apply to their news feed. See Filter Feed Items and Filter Feed Elements. Note: The collection of feed directory objects never contains User (005) and Group (0F9) object types. However, you can use those object types to filter the feed. Resource /chatter/feeds/filter/userId /connect/communities/communityId/chatter/feeds/filter/userId

userId must be the ID of the context user or the alias me.

Available since version 23.0 Requires Chatter Yes HTTP methods GET or HEAD Response body Feed Directory If the response body is empty, the user isn’t following any records.

Specific Filter Feed URL A feed object that contains information about a specific filter feed available to the context user. The keyPrefix in the resource URL is the first three characters of the object ID and indicates the object type. Resource /chatter/feeds/filter/userId/keyPrefix /connect/communities/communityId/chatter/feeds/filter/userId/keyPrefix

userId must be the ID of the context user or the alias me.

Available since version 23.0 Requires Chatter Yes

292

Chatter REST API Developer Guide

Feeds Resources

HTTP methods GET or HEAD Request parameters Parameter Name

Type

Description

sort

String

Specifies the order of feed items in the feed. • CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

Response body Feed Example response body This request returns the URL for a filter feed items resource that’s filtered by the User object (key prefix 005). GET /chatter/feeds/filter/me/005

Filter Feed Items Feed items from the context user’s news feed whose parent has the specified key prefix, such as the feed items from all the groups the context user is a member of. The key prefix specifies the object type and is the first three characters of an object ID. To filter by feed items with a User parent object, use the key prefix 005. To filter by feed items with a Group parent object, use the key prefix 0F9. To filter by feed items with a parent object that the context user is following (for example, Account), use the List of Filter Feed URLs resource to return the parent objects.

293

Chatter REST API Developer Guide

Feeds Resources

Suppose the context user is a member of five groups. The following resource returns all of the feed items posted to all five of those groups: /chatter/feeds/filter/me/0F9/feed-items

Contrast that with a request to the Record Feed Items resource, which returns all of the feed items posted to a particular group: /chatter/feeds/record/0F9XXXXXXXXX/feed-items

The filter feed returns only the feed items that are visible to the context user. In the first example, the resource doesn’t return the feed items for groups the context user is not a member of. In the second example, if the group is public, even if the context user is not a member, the resource returns all the group’s feed items. Resource /chatter/feeds/filter/me/keyPrefix/feed-items

or /chatter/feeds/filter/userId/keyPrefix/feed-items

userId must be the ID of the context user or the alias me.

Available versions 23.0–31.0 Important: In version 32.0 and later, use Filter Feed Elements. Requires Chatter Yes HTTP methods GET or HEAD Request parameters Parameter Name

Type

Description

Required Available or Version Optional

density

String

The density of the feed. One of these values:

Optional

• AllUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations. • FewerUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations, but hides some system-generated updates from records. The default value is AllUpdates.

294

29.0–31.0

Chatter REST API Developer Guide

Feeds Resources

Parameter Name

Type

Description

Required Available or Version Optional

page

String

A generated token that indicates the view of feed elements Optional in the feed.

23.0–31.0

Page tokens are returned as part of the response body, in one of the URL parameters, such as nextPageURL, for example: "nextPageUrl": "/services/data/v41.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-elements ?page=2011-03-30T17:34:50Z, 0D5D0000000DSv4KAG"

pageSize

Integer

Specifies the number of items per page. Valid values are Optional between 1 and 100. If you don't specify a size, the default is 25.

23.0–31.0

q

String

One or more keywords to search for in the body and comments of feed elements in this feed.

Optional

28.0–31.0

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

Integer

Maximum number of comments to include per feed item. Optional The default value is 3. The maximum value is 25.

29.0–31.0

sort

String

Specifies the order of feed items in the feed.

23.0–31.0

• CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

295

Optional

Chatter REST API Developer Guide

Feeds Resources

Parameter Name

Type

Description

Required Available or Version Optional

updatedSince

String

An opaque token defining the modification time stamp of Optional the feed and the sort order.

30.0–31.0

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

Response body Feed Item Page Example This request gets all the feed items whose parent is the User object and that the context user can see. GET https://instance_name/services/data/v41.0/chatter/feeds/filter/me/005/feed-items

Filter 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 /chatter/feeds/filter/me/feed-items/flat

or /chatter/feeds/filter/userId/feed-items/flat

Note: userId must be the ID of the context user or the alias me. Available since version 25.0–26.0 Requires Chatter Yes HTTP methods GET or HEAD Request parameters Parameter Name

Type

Description

numFeedItems

Integer

Specifies the number of feed items returned. Valid values are from 0 through 100. Default value is 25. Because feed items can include comments, specifying 25 flat feed items may actually return more. For example, if each feed item has one

296

Chatter REST API Developer Guide

Parameter Name

Feeds Resources

Type

Description 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.

recentCommentCount

Integer

Specifies the number of recent comments returned. Valid values are from 0 through 25. Default value is 3.

sort

String. One of the following:

Sorts the returned feed either by created date in ascending order, or by last modified date, also in ascending order. The default is LastModifiedDateDesc

• CreatedDateDesc • LastModifiedDateDesc

Response body Flat Feed

Filter Feed Elements Feed elements from the context user’s news feed whose parent has the specified key prefix, such as the feed elements from all the groups the context user is a member of. The key prefix specifies the object type and is the first three characters of an object ID. To filter by feed elements with a User parent object, use the key prefix 005. To filter by feed elements with a Group parent object, use the key prefix 0F9. To filter by feed elements with a parent object that the context user is following (for example, Account), use the List of Filter Feed URLs resource to return the parent objects. Suppose the context user is a member of five groups. The following resource returns all of the feed elements for all five of those groups: /chatter/feeds/filter/me/0F9/feed-elements

The filter feed returns only the feed elements that are visible to the context user. In this example, the resource doesn’t return the feed elements for groups the context user is not a member of. Resource /chatter/feeds/filter/userId/keyPrefix/feed-elements /connect/communities/communityId/chatter/feeds/filter/userId/keyPrefix/feed-elements

userId must be the ID of the context user or the alias me.

Available version 31.0

297

Chatter REST API Developer Guide

Feeds Resources

Requires Chatter Yes HTTP methods GET Request parameters for GET Parameter Name

Type

Description

Required or Optional

density

String

• AllUpdates—Displays all updates Optional from people and records the user follows and groups the user is a member of. Also displays custom recommendations.

Available Version 31.0

• FewerUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations, but hides some system-generated updates from records. elementsPer Bundle

Integer

The maximum number of feed elements per bundle. The default and maximum value is 10.

Optional

31.0

Note: Bundled posts contain feed-tracked changes. In Salesforce for Android and Salesforce for iOS, bundled posts are in record feeds only. page

String

The page token to use to view the page. Optional Page tokens are returned as part of the response class, for example, currentPageToken or nextPageToken. If you pass in null, the first page is returned.

31.0

pageSize

Integer

Specifies the number of feed elements per Optional page. Valid values are from 1 through 100. If you pass in null, the default size is 25.

31.0

q

String

One or more keywords to search for in the Optional feed elements visible to the context user. The search string can contain wildcards and must contain at least two characters that aren’t wildcards. See Wildcards.

31.0

298

Chatter REST API Developer Guide

Parameter Name

Type

recentComment Integer Count

sort

String

Feeds Resources

Description

Required or Optional

Available Version

The maximum number of comments to Optional return with each feed element. The default value is 3.

31.0

Specifies the order of feed items in the feed.

Optional

31.0

An opaque token defining the modification Optional time stamp of the feed and the sort order.

31.0

• CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. If you pass in null, the default value CreatedDateDesc is used. updatedSince

String

The updatedSince parameter doesn’t return feed elements that are created in the same second as the request.

Response body for GET Feed Element Page

Groups Feed Resources A feed containing all feed elements from all groups the context user either owns or is a member of. Available resources are:

299

Chatter REST API Developer Guide

Feeds Resources

Resource

Description

/chatter/feeds/groups/me

Returns a URL to the feed elements for all the groups the context user is a member of.

/chatter/feeds/groups/me/feed-elements

Returns all feed elements for all groups the context user either owns or is a member of.

Groups Feed URL Returns a URL to the feed elements for all the groups the context user is a member of. Resource /chatter/feeds/groups/userId /connect/communities/communityId/chatter/feeds/groups/userId

Note: userId must be the ID of the context user or the alias me. Available since version 23.0 Requires Chatter Yes HTTP methods GET Request parameters Parameter Name

Type

Description

sort

String

Specifies the order of feed items in the feed. • CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available

300

Chatter REST API Developer Guide

Feeds Resources

Parameter Name

Type

Description only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

Response body Feed

Groups Feed Elements Returns all feed elements for all groups the context user either owns or is a member of. To get the feed elements for a specific group, use the record feed resource (/chatter/feeds/record/recordId/feed-elements) and substitute the group ID for the recordId. Resource /chatter/feeds/groups/userId/feed-elements /connect/communities/communityId/chatter/feeds/groups/userId/feed-elements

Note: userId must be the ID of the context user or the alias me. Available since version 31.0 Requires Chatter Yes HTTP methods GET, HEAD Request parameters Parameter Name

Type

Description

Required Available or Version Optional

density

String

The density of the feed. One of these values:

Optional

• AllUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations. • FewerUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations, but hides some system-generated updates from records. The default value is AllUpdates.

301

31.0

Chatter REST API Developer Guide

Parameter Name

Feeds Resources

Type

elementsPerBundle Integer

page

String

Description

Required Available or Version Optional

Maximum number of feed elements to include in a bundle. Optional The value must be an integer from 0 through 10. The default value is 3.

31.0

A generated token that indicates the view of feed elements Optional in the feed.

31.0

Page tokens are returned as part of the response body in one of the URL parameters, such as nextPageURL: "nextPageUrl": "/services/data/v41.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-elements ?page=2011-03-30T17:34:50Z, 0D5D0000000DSv4KAG"

pageSize

Integer

Specifies the number of elements per page. Valid values are Optional from 1 through 100. If you don't specify a size, the default is 25.

31.0

q

String

One or more keywords to search for in the body and comments of feed elements in this feed.

Optional

31.0

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

Integer

Maximum number of comments to include per feed element. The default value is 3. The maximum value is 25.

Optional

31.0

sort

String

Specifies the order of feed items in the feed.

Optional

31.0

• CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds.

302

Chatter REST API Developer Guide

Parameter Name

Feeds Resources

Type

Description

Required Available or Version Optional

The default value is CreatedDateDesc. updatedSince

String

An opaque token defining the modification time stamp of Optional the feed and the sort order.

31.0

Do not construct this token. Retrieve this token from the updatesToken property of the Feed Element Page response body. The updatedSince parameter doesn’t return feed elements that are created in the same second as the request.

Response body Feed Element Page

Groups Feed Items Returns all feed items for all groups the context user either owns or is a member of. To get the feed items for a specific group, use the record feed resource (/chatter/feeds/record/recordId/feed-items) and substitute the group ID for the recordId. Resource /chatter/feeds/groups/me/feed-items

or /chatter/feeds/groups/userId/feed-items

Note: userId must be the ID of the context user or the alias me. Available versions 23.0–31.0 Important: In version 32.0 and later, use Groups Feed Elements. Requires Chatter Yes HTTP methods GET, HEAD

303

Chatter REST API Developer Guide

Feeds Resources

Request parameters Parameter Name

Type

Description

Required Available or Version Optional

density

String

The density of the feed. One of these values:

Optional

29.0–31.0

A generated token that indicates the view of feed elements Optional in the feed.

23.0–31.0

• AllUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations. • FewerUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations, but hides some system-generated updates from records. The default value is AllUpdates. page

String

Page tokens are returned as part of the response body, in one of the URL parameters, such as nextPageURL, for example: "nextPageUrl": "/services/data/v41.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-elements ?page=2011-03-30T17:34:50Z, 0D5D0000000DSv4KAG"

pageSize

Integer

Specifies the number of items per page. Valid values are Optional between 1 and 100. If you don't specify a size, the default is 25.

23.0–31.0

q

String

One or more keywords to search for in the body and comments of feed elements in this feed.

Optional

28.0–31.0

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

Integer

Maximum number of comments to include per feed item. Optional The default value is 3. The maximum value is 25.

29.0–31.0

sort

String

Specifies the order of feed items in the feed.

23.0–31.0

• CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date.

304

Optional

Chatter REST API Developer Guide

Parameter Name

Feeds Resources

Type

Description

Required Available or Version Optional

• LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc. updatedSince

String

An opaque token defining the modification time stamp of Optional the feed and the sort order.

30.0–31.0

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

Response body Feed Item Page

Groups 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 /chatter/feeds/groups/me/feed-items/flat

or /chatter/feeds/groups/userId/feed-items/flat

Note: userId must be the ID of the context user or the alias me. Available since version 25.0–26.0 Requires Chatter Yes HTTP methods GET or HEAD

305

Chatter REST API Developer Guide

Feeds Resources

Request parameters Parameter Name

Type

Description

numFeedItems

Integer

Specifies the number of feed items returned. Valid values are from 0 through 100. Default value is 25. Because feed items can 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.

recentCommentCount

Integer

Specifies the number of recent comments returned. Valid values are from 0 through 25. Default value is 3.

sort

String. One of the following:

Sorts the returned feed either by created date in ascending order, or by last modified date, also in ascending order. The default is LastModifiedDateDesc

• CreatedDateDesc • LastModifiedDateDesc

Response body Flat Feed SEE ALSO: Groups Resources Record Feed Resource Feeds and Feed Elements

Landing Feed Resource Get information about the landing feed for internal communities and a page of feed elements. Resource /chatter/feeds/landing

Available since version 40.0 Requires Chatter Yes

306

Chatter REST API Developer Guide

Feeds Resources

HTTP methods GET, HEAD Request parameters Parameter Name

Type

Description

pageSize

Integer

Specifies the number of feed elements per page. Valid values are from 1 through 100. If you pass in 0, feed elements aren’t returned with the feed.

recentCommentCount

Integer

The maximum number of comments to return with each feed element. The default value is 3.

sort

String

Specifies the order of feed items in the feed. • CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. For the landing feed, the service determines the sort order and any sort value you specify is ignored.

Response body Feed

Mute Feed Resources A feed containing feed elements that the context user muted.

307

Chatter REST API Developer Guide

Feeds Resources

To mute an item, use PATCH with the Feed Elements Capability, Mute resource and the isMutedByMe parameter. For example: /chatter/feed-elements/0D5D0000000Ir6zKAC/capabilities/mute?isMutedByMe=true

Available resources are: Resource

Description

/chatter/feeds/mute/me

Returns the URL for the mute feed for the context user.

/chatter/feeds/mute/me/feed-elements

Returns all feed elements that the context user muted.

Mute Feed URL Returns the URL for the mute feed for the context user. Resource /chatter/feeds/mute/userId /connect/communities/communityId/chatter/feeds/mute/userId

Note: userId must be the ID of the context user or the alias me. Available since version 35.0 Requires Chatter Yes HTTP methods GET, HEAD Request parameter Parameter Name

Type

Description

sort

String

Specifies the order of feed items in the feed. • CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when

308

Chatter REST API Developer Guide

Parameter Name

Feeds Resources

Type

Description the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

Response body Feed

Mute Feed Elements Returns all feed elements that the context user muted. Resource /chatter/feeds/mute/userId/feed-elements /connect/communities/communityId/chatter/feeds/mute/userId/feed-elements

Note: userId must be the ID of the context user or the alias me. Available since version 35.0 Requires Chatter Yes HTTP methods GET, HEAD Request parameters for GET Parameter Name

Type

Description

Required Available or Version Optional

density

String

The density of the feed. One of these values:

Optional

• AllUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations. • FewerUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations, but hides some system-generated updates from records.

309

31.0

Chatter REST API Developer Guide

Parameter Name

Type

Feeds Resources

Description

Required Available or Version Optional

The default value is AllUpdates. elementsPerBundle Integer

Maximum number of feed elements to include in a bundle. The value must be an integer between 0 and 10. The default value is 3.

Optional

31.0

Optional

31.0

Note: Bundled posts contain feed-tracked changes. In Salesforce for Android and Salesforce for iOS, bundled posts are in record feeds only. page

String

A generated token that indicates the view of feed elements in the feed. Page tokens are returned as part of the response body, in one of the URL parameters, such as nextPageURL, for example: "nextPageUrl": "/services/data/v41.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-elements ?page=2011-03-30T17:34:50Z, 0D5D0000000DSv4KAG"

pageSize

Integer

Specifies the number of elements per page. Valid values Optional are between 1 and 100. If you don't specify a size, the default is 25.

31.0

q

String

One or more keywords to search for in the body and comments of feed elements in this feed.

Optional

31.0

Maximum number of comments to include per feed Optional element. The default value is 3. The maximum value is 25.

31.0

Specifies the order of feed items in the feed.

31.0

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

sort

String

• CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date.

310

Optional

Chatter REST API Developer Guide

Parameter Name

Type

Feeds Resources

Description

Required Available or Version Optional

• LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

Response body Feed Element Page

News Feed Resources A feed containing feed elements of interest to the context user. You can post feed items to the news feed. Note: To match the feed displayed in the Chatter UI, the composition of this feed may change between releases. Available resources are: Resource

Description

/chatter/feeds/news/me

Returns a URL to the feed elements for all feeds for the context user.

/chatter/feeds/news/me/is-modified

Returns information about whether the news feed has been updated or changed since the specified time and date.

/chatter/feeds/news/me/feed-elements

All feed elements from all groups the context user either owns or is a member of, as well as all files, records, and users the context user follows. Use this resource to get information about feed elements and to post feed elements.

News Feed URL Returns a URL to the feed elements for all feeds for the context user. Resource /chatter/feeds/news/userId /connect/communities/communityId/chatter/feeds/news/userId

Note: userId must be the ID of the context user or the alias me.

311

Chatter REST API Developer Guide

Feeds Resources

Available since version 23.0 Requires Chatter Yes HTTP methods GET or HEAD Request parameter Parameter Name

Type

Description

sort

String

Specifies the order of feed items in the feed. • CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

Response body Feed Example response body { "feedElementPostUrl": "/services/data/v41.0/chatter/feed-elements", "feedElementsUrl": "/services/data/v41.0/chatter/feeds/news/005xx000001Sv1mAAB/feed-elements" }

312

Chatter REST API Developer Guide

Feeds Resources

News Feed Is-Modified Important: This feature is available through a Feed Polling pilot program. This pilot program is closed and not accepting new participants. Returns information about whether the news feed has been updated or changed since the specified time and date. Tip: If you are working with remote organizations as an ISV, use the /connect/organization on page 176 resource and the feedPolling property of the Feature response body to shape your polling strategy. If feedPolling is not enabled, be conservative in how often you poll for new content. Use the Is-Modified resource to poll the news feed 1. Use either of the following resources to get the latest elements from a news feed or to get information about the feed: /chatter/feeds/news/me/feed-elements, /chatter/feeds/news/me. The response bodies for both resources contain the isModifiedUrl property. This property contains the URL to the Is-Modified resource, which includes a since request parameter that defines the last modified date of the feed. If the sort order of the request to the news feed changes, the news feed is modified. 2. Issue a GET request to the URL in the isModifiedUrl property. The Feed Modified Info response contains the following properties: • isModified—a boolean indicating whether the feed has been updated since the last time you checked. Conditions under which this property is true depend on the sort order of the original request to the news feed. For example, if the feed is sorted by posts (CreatedDateDesc) and a comment was added, isModified is false. • nextPollUrl—a string containing the URL of the Is-Modified resource. This property contains a URL only if isModified is false. If isModified is true, nextPollUrl is null. 3. If the isModified property is true, issue a GET request to the News Feed Elements resource to refresh the news feed. 4. If the isModified property is false, issue a GET request to the URL in the nextPollUrl property. This request also returns a Feed Modified Info response body that contains the isModified and nextPollUrl properties. Note: We don’t recommend exceeding one poll per minute. Resource /chatter/feeds/news/userId/is-modified /connect/communities/communityId/chatter/feeds/news/userId/is-modified

Note: userId must be the ID of the context user or the alias me. Available since version 26.0 Requires Chatter Yes HTTP methods GET or HEAD

313

Chatter REST API Developer Guide

Feeds Resources

Request parameter Parameter Name

Type

Description

Required or Optional

since

String

An opaque token containing information about the Required modification time stamp of the feed and the sort order.

Available Since 23.0

Do not construct this token. Retrieve this token from the isModifiedToken property of the Feed Item Page or Feed Modified Info response body.

Response body Feed Modified Info

News Feed Elements All feed elements from all groups the context user either owns or is a member of, as well as all files, records, and users the context user follows. Use this resource to get information about feed elements and to post feed elements. For information about posting a feed element, see Feed Elements, Post and Search. Resource /chatter/feeds/news/userId/feed-elements /connect/communities/communityId/chatter/feeds/news/userId/feed-elements

Note: userId must be the ID of the context user or the alias me. Available since version 31.0 Requires Chatter Yes HTTP methods GET, HEAD Request parameters for GET Parameter Name

Type

Description

Required Available or Version Optional

density

String

The density of the feed. One of these values:

Optional

• AllUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations. • FewerUpdates—Displays all updates from people and records the user follows and groups the user is a

314

31.0

Chatter REST API Developer Guide

Parameter Name

Feeds Resources

Type

Description

Required Available or Version Optional

member of. Also displays custom recommendations, but hides some system-generated updates from records. The default value is AllUpdates. elementsPerBundle Integer

Maximum number of feed elements to include in a bundle. Optional The value must be an integer from 0 through 10. The default value is 3.

31.0

Note: Bundled posts contain feed-tracked changes. In Salesforce for Android and Salesforce for iOS, bundled posts are in record feeds only. filter

String

Specifies a filter value for a feed. • AllQuestions—Feed elements that are questions. • AuthoredBy—Feed elements authored by the user profile owner. This value is valid only for the UserProfile feed. • CommunityScoped—Feed elements that are scoped to communities. Currently, these feed elements have a User or a Group parent record. However, other parent record types could be scoped to communities in the future. Feed elements that are always visible in all communities are filtered out. This value is valid only for the UserProfile feed. • QuestionsWithCandidateAnswers—Feed elements that are questions that have candidate answers associated with them. This value is valid only for users with the Access Einstein-Generated Answers permission. • QuestionsWithCandidateAnswers ReviewedPublished—Feed elements that are questions that have candidate answers that have been reviewed or published. This value is valid only for users with the Access Einstein-Generated Answers permission. • Read—Feed elements that are older than 30 days or are marked as read for the context user. Includes existing feed elements when the context user joined the group. This value is valid only for the Record feed of a group. • SolvedQuestions—Feed elements that are questions and that have a best answer. • UnansweredQuestions—Feed elements that are questions and that don’t have any answers. • UnansweredQuestionsWithCandidate Answers—Feed elements that are questions that

315

Optional

32.0

Chatter REST API Developer Guide

Parameter Name

Feeds Resources

Type

Description

Required Available or Version Optional

don’t have answers but have candidate answers associated with them. This value is valid only for users with the Access Einstein-Generated Answers permission. • Unread—Feed elements that are created in the past 30 days and aren’t marked as read for the context user. This value is valid only for the Record feed of a group. • UnsolvedQuestions—Feed elements that are questions and that don’t have a best answer. page

String

A generated token that indicates the view of feed elements Optional in the feed.

31.0

Page tokens are returned as part of the response body, in one of the URL parameters, such as nextPageURL: "nextPageUrl": "/services/data/v41.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-elements ?page=2011-03-30T17:34:50Z, 0D5D0000000DSv4KAG"

pageSize

Integer

Specifies the number of elements per page. Valid values are Optional from 1 through 100. If you don't specify a size, the default is 25.

31.0

q

String

One or more keywords to search for in the body and comments of feed elements in this feed.

Optional

31.0

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

Integer

Maximum number of comments to include per feed element. The default value is 3. The maximum value is 25.

Optional

31.0

sort

String

Specifies the order of feed items in the feed.

Optional

31.0

• CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the

316

Chatter REST API Developer Guide

Parameter Name

Feeds Resources

Type

Description

Required Available or Version Optional

ConnectApi.FeedFilter is UnansweredQuestions.

• Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc. updatedSince

String

An opaque token defining the modification time stamp of Optional the feed and the sort order.

31.0

Do not construct this token. Retrieve this token from the updatesToken property of the Feed Element Page response body. The updatedSince parameter doesn’t return feed elements that are created in the same second as the request.

Response body for GET Feed Element Page

News Feed Items All feed items from all groups the context user either owns or is a member of, as well as all files, records, and users the context user follows. Use this resource to get information about the feed items and to post feed items, including attaching files, posting links, polls, and questions, and sharing posts. For information about posting a feed item, see Using POST, PATCH, or PUT for Input on page 11. Resource /chatter/feeds/news/userId/feed-items

Note: userId must be the ID of the context user or the alias me. Available versions 23.0–31.0 Important: In version 32.0 and later, use News Feed Elements. Requires Chatter Yes HTTP methods GET, POST, HEAD

317

Chatter REST API Developer Guide

Feeds Resources

Request parameters for GET Parameter Name

Type

Description

Required Available or Version Optional

density

String

The density of the feed. One of these values:

Optional

29.0–31.0

A generated token that indicates the view of feed items Optional in the feed. Page tokens are returned as part of the response body, in one of the URL parameters, such as nextPageURL:

23.0–31.0

• AllUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations. • FewerUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations, but hides some system-generated updates from records. The default value is AllUpdates. page

String

"nextPageUrl": "/services/data/v41.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-items ?page=2011-03-30T17:34:50Z, 0D5D0000000DSv4KAG"

pageSize

Integer

Specifies the number of items per page. Valid values Optional are from 1 through 100. If you don't specify a size, the default is 25.

23.0–31.0

q

String

One or more keywords to search for in the body and comments of feed items in this feed.

Optional

28.0–31.0

Maximum number of comments to include per feed Optional item. The default value is 3. The maximum value is 25.

29.0–31.0

Specifies the order of feed items in the feed.

23.0–31.0

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

String

• CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds.

318

Optional

Chatter REST API Developer Guide

Parameter Name

Type

Feeds Resources

Description

Required Available or Version Optional

• CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc. updatedSince String

An opaque token defining the modification time stamp Optional 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.

Request body for POST Root XML tag

JSON The following example attaches a poll to a feed item: { "body":{ "messageSegments":[ { "type":"Text", "text":"When should we meet for release planning?" } ] }, "capabilities":{ "poll":{ "choices":[ "Monday", "Tuesday" ] } }, "feedElementType":"FeedItem", "subjectId":"me" }

319

30.0–31.0

Chatter REST API Developer Guide

Feeds Resources

Properties Name

Type

Description

Required or Optional

attachment

Depends on type.

You can specify only one of these Optional values in the attachment parameter. Values are:

Available Version

• Attachment Input: Canvas App (v29.0–31.0) • Attachment Input: Existing Content (v23.0–31.0) • Attachment Input: Feed Poll (v26.0–31.0) • Attachment Input: Link (v23.0–31.0) • Attachment Input: New File Upload (v23.0–31.0) Important: As of API version 32.0, use the capabilities property. body

Message Body Input

Description of message body. Feed item and comment bodies have a 10,000 character limit. Because this limit can change, we recommend that clients make a describeSObjects() call on the FeedItem or FeedComment object. To determine the maximum number of allowed characters, look at the length of the Body or CommentBody field. The body can contain up to 25 mentions. If you specify originalFeedElementId

to share a feed item, use the body property to add the first comment to the feed item. To edit this property in a feed item, make a PATCH request to /chatter/feed-elements /feedElementId. Editing feed

posts is supported in version 34.0 and later.

320

Required unless the 23.0 feed item has a content capability or a link capability

Chatter REST API Developer Guide

Feeds Resources

Name

Type

Description

Required or Optional

Available Version

capabilities

Feed Element Capabilities Input

The capabilities that define the behavior of this feed element.

Optional

31.0

isBookmarked ByCurrentUser

Boolean

Specifies whether to bookmark the Optional new feed item for the user (true) or not (false). The default value is false.

24.0–31.0

Important: As of API version 32.0, use the capabilities.bookmarks. isBookmarkedByCurrentUser

property. feedElementType String

The type of feed element this input Required represents.

31.0

The only valid value is FeedItem. originalFeed ElementId

String

To share a feed element, specify its Optional 18-character ID.

31.0–38.0

Note: You can’t share a post and upload a file in the same request body. Important: In API version 39.0 and later, use the capabilities.feedEntity Share.feedEntityId

property. originalFeedItemId String

To share a feed item, specify its 18-character ID.

Optional

24.0–31.0

Important: In API version 32.0–38.0, use the originalFeedElementId

property. In API version 39.0 and later, use the capabilities.feedEntity Share.feedEntityId

property. subjectId

String

The ID of the parent this feed Required element is being posted to. This value can be the ID of a user, group, or record, or the string me to indicate the context user.

321

31.0

Chatter REST API Developer Guide

Feeds Resources

Name

Type

Description

Required or Optional

visibility

String

Who can see the post. Valid values Optional are:

Available Version 26.0

• 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, group, or direct message, the visibility of the feed item must be AllUsers.

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 Available or Version Optional

attachmentType

String

The attachment type. Must contain the value ExistingContent.

Required

27.0–31.0

contentDocumentId

String

18-character ID of an existing file.

Required

23.0–31.0

isBookmarked ByCurrentUser

Boolean Specifies whether to bookmark the new feed item for the Optional user (true) or not (false). The default value is false.

26.0–31.0

text

String

23.0–31.0

Text of the feed item.

322

Optional

Chatter REST API Developer Guide

Feeds Resources

Parameter Name

Type

Description

Required Available or Version Optional

visibility

String

Who can see the post. Valid values are:

Optional

26.0–31.0

Required or Optional

Available Version

• 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, group, or direct message, the visibility of the feed item must be AllUsers.

Parameters for attaching a new file Parameter Name

Type

Description

attachmentType

String

The attachment type. Must contain the value NewFile. Required

27.0–31.0

desc

String

Description of file being posted.

Optional

23.0–26.0

Attention: Don’t use this parameter as of version 27.0. Use description instead. description

String

Description of file being posted.

Optional

27.0–31.0

fileName

String

File name of the file being posted.

Required

23.0–24.0

isBookmarked ByCurrentUser

Boolean Specifies whether to bookmark the new feed item for the Optional user (true) or not (false). The default value is false.

26.0–31.0

text

String

Text of the feed item.

Optional

23.0–31.0

title

String

File name of a file to be uploaded and posted.

Required

24.0–31.0

Attention: Don’t use this parameter as of version 24.0. Use title instead.

323

Chatter REST API Developer Guide

Feeds Resources

Parameter Name

Type

Description

Required or Optional

Available Version

visibility

String

Who can see the post. Valid values are:

Optional

26.0–31.0

• 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, group, or direct message, the visibility of the feed item must be AllUsers.

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–31.0

isBookmarked ByCurrentUser

Boolean

Specifies whether to bookmark the new feed item Optional for the user (true) or not (false). The default value is false.

26.0–31.0

text

String

Text of the feed item.

Optional

23.0–31.0

url

String

URL of the link.

Required

23.0–31.0

urlName

String

Name of the URL.

Optional

23.0–31.0

visibility

String

Who can see the post. Valid values are:

Optional

26.0–31.0

• 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:

324

Chatter REST API Developer Guide

Parameter Name

Feeds Resources

Type

Description

Required or Optional

Available Version

• 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, group, or direct message, the visibility of the feed item must be AllUsers.

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–31.0

isBookmarked ByCurrentUser

Boolean

Specifies whether to bookmark the new feed item Optional for the user (true) or not (false). The default value is false.

26.0–31.0

pollChoice1 through pollChoice10

String

The choices used to create a feed item with a poll. Required Specify 2–10 poll choices for each poll.

26.0–31.0

text

String

Text of the feed item.

Required

23.0–31.0

visibility

String

Who can see the post. Valid values are:

Optional

26.0–31.0

• 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.

325

Chatter REST API Developer Guide

Parameter Name

Feeds Resources

Type

Description

Required or Optional

Available Version

Required or Optional

Available Version

If the parent of the feed item is a user, group, or direct message, the visibility of the feed item must be AllUsers.

Parameters for sharing a post Parameter Name

Type

Description

isBookmarked ByCurrentUser

Boolean

Specifies whether to bookmark the new feed item Optional for the user (true) or not (false). The default value is false.

26.0–31.0

originalFeedItemId

String

The 18-character ID of the feed item you want to share.

Required

24.0–31.0

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

String

A comment on the shared feed item.

Optional

28.0–31.0

visibility

String

Who can see the post. Valid values are:

Optional

26.0–31.0

• 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, group, or direct message, the visibility of the feed item must be AllUsers.

Parameters for posting text only

326

Chatter REST API Developer Guide

Feeds Resources

Parameter Name

Type

Description

Required or Optional

Available Version

isBookmarked ByCurrentUser

Boolean

Specifies whether to bookmark the new feed item Optional for the user (true) or not (false). The default value is false.

26.0–31.0

text

String

Text of the feed item. The maximum number of characters is 1000.

Required

23.0–31.0

visibility

String

Who can see the post. Valid values are:

Optional

26.0–31.0

Required or Optional

Available Version

• 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, group, or direct message, the visibility of the feed item must be AllUsers.

Parameters for posting a canvas app Parameter Name

Type

Description

attachmentType

String

The attachment type. Must contain the value Canvas. Required

29.0–31.0

description

String

Description of the canvas app

Optional

29.0–31.0

developerName

String

The developer name (API name) of the canvas app

Required

29.0–31.0

height

String

The height of the canvas app in pixels. Default height is Optional 200 pixels.

29.0–31.0

isBookmarked ByCurrentUser

Boolean Specifies whether to bookmark the new feed item for the Optional user (true) or not (false). The default value is false.

29.0–31.0

namespacePrefix

String

29.0–31.0

The namespace prefix of the Developer Edition organization in which the canvas app was created.

327

Optional

Chatter REST API Developer Guide

Feeds Resources

Parameter Name

Type

Description

Required or Optional

parameters

String

Parameters passed to the canvas app in JSON format. The Optional JSON must be URL-encoded:

Available Version 29.0–31.0

parameters={'isUpdated'='true';}"

text

String

Text of the feed item

Optional

29.0–31.0

thumbnailUrl

String

The URL to a thumbnail image for the canvas app. Maximum dimensions are 120x120 pixels.

Optional

29.0–31.0

title

String

The title of the link to the canvas app

Optional

29.0–31.0

visibility

String

Who can see the post. Valid values are:

Optional

29.0–31.0

• 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, group, or direct message, the visibility of the feed item must be AllUsers.

Response body for GET Feed Item Page Response body for POST Feed Item Example of file post This example updates a news feed with a post that has a new file attachment. curl https://instance_name/services/data/v31.0/chatter/feeds/news/me/feed-items --form "feedItemFileUpload=@Desktop/textFile.txt" --form "title=Sample" --form "description=Just a Text File" --form "text=Please review" --form "attachmentType=NewFile" --header 'Authorization: Bearer 00DD0000000Jhd2!AQIAQBgn42jbvCW2SX8JaRO2_JjX1fNKXWBrjYQPXODtDyaT6gT4DJVs4Ki7s6GoxvO8a.Z7gTHKkfqjW6S1.ujlD413PYpF'

328

Chatter REST API Developer Guide

Feeds Resources

This Java example updates a news feed with a file post. import java.io.File; import org.apache.commons.httpclient.*; import org.apache.commons.httpclient.methods.PostMethod; import org.apache.commons.httpclient.methods.multipart.*; ... String oauthToken = "00Dx0000000X42V!AQgAQClp6UqGWNJUf4d3LQkVCysBIS6a"; String url = "https://instance_name/services/data/v31.0/chatter/" + "feeds/user-profile/me/feed-items"; String text = "I love posting files to Chatter!"; File contentFile = getFile(); String description = "This is a test file that I'm posting."; String title = "contentFile"; Part[] parts = { new StringPart("description", description), new StringPart("title", fileName), new StringPart("text", text), new FilePart("feedItemFileUpload", contentFile), }; final PostMethod postMethod = new PostMethod(url); try { postMethod.setRequestEntity(new MultipartRequestEntity(parts, postMethod.getParams())); postMethod.setRequestHeader("Authorization", "Bearer " + oauthToken); postMethod.setRequestHeader("Content-type", "multipart/form-data") postMethod.addRequestHeader("X-PrettyPrint", "1"); HttpClient httpClient = new HttpClient(); httpClient.getParams().setSoTimeout(60000); int returnCode = httpClient.executeMethod(postMethod); System.out.println(postMethod.getResponseBodyAsString()); assertTrue("Expected return code of: " + HttpStatus.SC_CREATED, returnCode == HttpStatus.SC_CREATED); } finally { postMethod.releaseConnection(); }

Example of a link post This request creates a link post using the request parameters: /chatter/feeds/news/me/feed-items?text=Did+you+see+this?&url=http://www.chatter.com

This request body creates a link in a feed item post: { "body" : { "messageSegments" : [ {

329

Chatter REST API Developer Guide

Feeds Resources

"type": "Link", "url" : "http://www.chatter.com" }, { "type": "Text", "text" : "Is everyone following this?" } ] } }

This request body includes a link as an attachment to a feed item post: { "body" : { "messageSegments" : [ { "type": "Text", "text" : "Is everyone following this?" } ] }, "attachment" :{ "url" : "http://www.chatter.com", "urlName" : "The Future of Social Enterprise" } }

News 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 /chatter/feeds/news/me/feed-items/flat

or /chatter/feeds/news/userId/feed-items/flat

Note: userId must be the ID of the context user or the alias me. Available since version 25.0–26.0 Important: As of API version 32.0, use /chatter/feeds/news/userId/feed-elements. Requires Chatter Yes HTTP methods GET or HEAD

330

Chatter REST API Developer Guide

Feeds Resources

Request parameters Parameter Name

Type

Description

numFeedItems

Integer

Specifies the number of feed items returned. Valid values are from 0 through 100. Default value is 25. Because feed items can 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.

recentCommentCount

Integer

Specifies the number of recent comments returned. Valid values are from 0 through 25. Default value is 3.

sort

String. One of the following:

Sorts the returned feed either by created date in ascending order, or by last modified date, also in ascending order. The default is LastModifiedDateDesc

• CreatedDateDesc • LastModifiedDateDesc

Response body Flat Feed SEE ALSO: Feeds and Feed Elements

Pending Review Feed Resources The feed containing feed elements and comments that are pending review. Available resources are: Resource

Description

/chatter/feeds/pending-review

Get the URL to the pending review feed and a page of feed elements.

/chatter/feeds/pending-review/feed-elements Get all the feed elements and comments that are pending review.

331

Chatter REST API Developer Guide

Feeds Resources

Pending Review Feed URL Get the URL to the pending review feed and a page of feed elements. Resource /chatter/feeds/pending-review /connect/communities/communityId/chatter/feeds/pending-review

Available since version 39.0 Requires Chatter Yes HTTP methods GET, HEAD Request parameters Parameter Name

Type

Description

pageSize

Integer

Specifies the number of feed elements per page. Valid values are from 1 through 100. If you pass in 0, feed elements aren’t returned with the feed.

recentCommentCount

Integer

The maximum number of comments to return with each feed element. The default value is 3.

sort

String

Specifies the order of feed items in the feed. • CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds.

332

Chatter REST API Developer Guide

Parameter Name

Feeds Resources

Type

Description The default value is CreatedDateDesc.

Response body Feed

Pending Review Feed Elements Get all the feed elements and comments that are pending review. Resource /chatter/feeds/pending-review/feed-elements /connect/communities/communityId/chatter/feeds/pending-review/feed-elements

Available since release 39.0 Requires Chatter Yes HTTP methods GET, HEAD GET parameters Parameter Name Type

page

String

Description

Required Available or Version Optional

A generated token that indicates the view of feed Optional elements in the feed. Page tokens are returned as part of the response body, in one of the URL parameters, such as nextPageURL. For example:

39.0

"nextPageUrl": "/services/data/v41.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-elements ?page=2011-03-30T17:34:50Z, 0D5D0000000DSv4KAG"

pageSize

Integer

Specifies the number of elements per page. Valid values Optional are from 1 to 100. If you don't specify a size, the default is 25.

333

39.0

Chatter REST API Developer Guide

Parameter Name Type

q

String

Feeds Resources

Description

Required Available or Version Optional

One or more keywords to search for in the body and comments of feed elements in this feed.

Optional

39.0

Optional

39.0

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

String

Specifies the order of feed items in the feed. • CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

Response body for GET Feed Element Page If a feed element has comments, the Comment Page response body contains a value in the total property to indicate the number of published comments. However the comments property contains a collection of comments that are pending review.

People Feed Resources All feed elements posted by all of the people the context user follows. Available resources are: Resource

Description

/chatter/feeds/people/me

Returns a URL to the feed elements for all the people the context user is following.

/chatter/feeds/people/me/feed-elements

Returns all the feed elements from all the people the context user follows.

334

Chatter REST API Developer Guide

Feeds Resources

People Feed URL Returns a URL to the feed elements for all the people the context user is following. Resource /chatter/feeds/people/userId /connect/communities/communityId/chatter/feeds/people/userId

Note: userId must be the ID of the context user or the alias me. Available since version 23.0 Requires Chatter Yes HTTP methods GET, HEAD Request parameters Parameter Name

Type

Description

sort

String

Specifies the order of feed items in the feed. • CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

Response body Feed

335

Chatter REST API Developer Guide

Feeds Resources

People Feed Elements Returns all the feed elements from all the people the context user follows. Resource /chatter/feeds/people/userId/feed-elements /connect/communities/communityId/chatter/feeds/people/userId/feed-elements

Note: userId must be the ID of the context user or the alias me. Available since version 31.0 Requires Chatter Yes HTTP methods GET, HEAD Request parameters Parameter Name

Type

Description

Required Available or Version Optional

density

String

The density of the feed. One of these values:

Optional

31.0

Maximum number of feed elements to include in a bundle. Optional The value must be an integer from 0 through 10. The default value is 3.

31.0

A generated token that indicates the view of feed elements Optional in the feed.

31.0

• AllUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations. • FewerUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations, but hides some system-generated updates from records. The default value is AllUpdates. elementsPerBundle Integer

page

String

Page tokens are returned as part of the response body in one of the URL parameters, such as nextPageURL: "nextPageUrl": "/services/data/v41.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-elements ?page=2011-03-30T17:34:50Z, 0D5D0000000DSv4KAG"

336

Chatter REST API Developer Guide

Feeds Resources

Parameter Name

Type

Description

Required Available or Version Optional

pageSize

Integer

Specifies the number of elements per page. Valid values are Optional from 1 through 100. If you don't specify a size, the default is 25.

31.0

q

String

One or more keywords to search for in the body and comments of feed elements in this feed.

Optional

31.0

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

Integer

Maximum number of comments to include per feed element. The default value is 3. The maximum value is 25.

Optional

31.0

sort

String

Specifies the order of feed items in the feed.

Optional

31.0

An opaque token defining the modification time stamp of Optional the feed and the sort order.

31.0

• CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc. updatedSince

String

Do not construct this token. Retrieve this token from the updatesToken property of the Feed Element Page response body. The updatedSince parameter doesn’t return feed elements that are created in the same second as the request.

Response body Feed Element Page

337

Chatter REST API Developer Guide

Feeds Resources

People Feed Items Returns all the feed items from all the people the context user follows. Resource /chatter/feeds/people/me/feed-items

or /chatter/feeds/people/userId/feed-items

Note: userId must be the ID of the context user or the alias me. Available versions 23.0–31.0 Important: In version 32.0 and later, use People Feed Elements. Requires Chatter Yes HTTP methods GET, HEAD Request parameters Parameter Name

Type

Description

Required Available or Version Optional

density

String

The density of the feed. One of these values:

Optional

29.0–31.0

A generated token that indicates the view of feed elements Optional in the feed.

23.0–31.0

• AllUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations. • FewerUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations, but hides some system-generated updates from records. The default value is AllUpdates. page

String

Page tokens are returned as part of the response body, in one of the URL parameters, such as nextPageURL, for example: "nextPageUrl": "/services/data/v41.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-elements ?page=2011-03-30T17:34:50Z, 0D5D0000000DSv4KAG"

338

Chatter REST API Developer Guide

Feeds Resources

Parameter Name

Type

Description

Required Available or Version Optional

pageSize

Integer

Specifies the number of items per page. Valid values are Optional between 1 and 100. If you don't specify a size, the default is 25.

23.0–31.0

q

String

One or more keywords to search for in the body and comments of feed elements in this feed.

Optional

28.0–31.0

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

Integer

Maximum number of comments to include per feed item. Optional The default value is 3. The maximum value is 25.

29.0–31.0

sort

String

Specifies the order of feed items in the feed.

Optional

23.0–31.0

An opaque token defining the modification time stamp of Optional the feed and the sort order.

30.0–31.0

• CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc. updatedSince

String

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

Response body Feed Item Page

People Feed Items Flat This resource is deprecated as of version 26.0.

339

Chatter REST API Developer Guide

Feeds Resources

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 /chatter/feeds/people/me/feed-items/flat

or /chatter/feeds/people/userId/feed-items/flat

Note: userId must be the ID of the context user or the alias me. Available since version 25.0–26.0 Requires Chatter Yes HTTP methods GET or HEAD Request parameters Parameter Name

Type

Description

numFeedItems

Integer

Specifies the number of feed items returned. Valid values are from 0 through 100. Default value is 25. Because feed items can 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.

recentCommentCount

Integer

Specifies the number of recent comments returned. Valid values are from 0 through 25. Default value is 3.

sort

String. One of the following:

Sorts the returned feed either by created date in ascending order, or by last modified date, also in ascending order. The default is LastModifiedDateDesc

• CreatedDateDesc • LastModifiedDateDesc

340

Chatter REST API Developer Guide

Feeds Resources

Response body Flat Feed SEE ALSO: Feeds and Feed Elements

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. You can get another user’s record feed. Available resources are: Resource

Description

/chatter/feeds/record/recordId

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

/chatter/feeds/record/recordId/feed-elements Returns the feed elements for all the records the context user is following, or all the feed elements of the specified recordId.

Use this resource to search a feed or to get the feed elements for a specific feed, including another user’s feed. To use this resource to get the feed elements for a group, specify the group ID as the recordId. /chatter/feeds/record/recordId/ pinned-feed-elements (Beta)

Get pinned feed elements from a group feed. Pin or unpin a feed element to a group feed.

Record Feed URL Returns a URL to the feed elements for all the records the context user is following, or a URL to all the feed elements of the specified recordId. Use this resource to get a group feed. Resource /chatter/feeds/record/recordId /connect/communities/communityId/chatter/feeds/record/recordId

Note: If recordId is a user ID, it must be the same as the context user or the alias me. Available since version 23.0 Requires Chatter Yes HTTP methods GET, HEAD

341

Chatter REST API Developer Guide

Feeds Resources

Request parameters Parameter Name

Type

Description

sort

String

Specifies the order of feed items in the feed. • CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

Response body Feed

Record Feed Elements Returns the feed elements for all the records the context user is following, or all the feed elements of the specified recordId. Use this resource to search a feed or to get the feed elements for a specific feed, including another user’s feed. To use this resource to get the feed elements for a group, specify the group ID as the recordId. Resource /chatter/feeds/record/recordId/feed-elements /connect/communities/communityId/chatter/feeds/record/recordId/feed-elements

Note: If recordId is a user ID, it must be the same as the context user or the alias me. Available since version 23.0

342

Chatter REST API Developer Guide

Feeds Resources

Requires Chatter Yes HTTP methods GET, HEAD Request parameters for GET Parameter Name

Type

customFilter String

Description

Required Available or Version Optional

Custom filter that applies only to the case feed. See Optional customFeedFilter in the Metadata API Developer Guide for supported values.

40.0

You can specify customFilter or filter. You can’t specify both. density

String

The density of the feed. One of these values:

Optional

31.0

Maximum number of feed elements to include in a Optional bundle. The value must be an integer from 0 through 10. The default value is 3.

31.0

• AllUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations. • FewerUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations, but hides some system-generated updates from records. The default value is AllUpdates. elementsPerBundle Integer

Note: Bundled posts contain feed-tracked changes. In Salesforce for Android and Salesforce for iOS, bundled posts are in record feeds only. filter

String

Specifies a filter value for a feed. • AllQuestions—Feed elements that are questions. • AuthoredBy—Feed elements authored by the user profile owner. This value is valid only for the UserProfile feed. • CommunityScoped—Feed elements that are scoped to communities. Currently, these feed elements have a User or a Group parent record. However, other parent record types could be scoped to communities in the future. Feed elements

343

Optional

32.0

Chatter REST API Developer Guide

Parameter Name

Type

Feeds Resources

Description

that are always visible in all communities are filtered out. This value is valid only for the UserProfile feed. • QuestionsWithCandidateAnswers—Feed elements that are questions that have candidate answers associated with them. This value is valid only for users with the Access Einstein-Generated Answers permission. • QuestionsWithCandidateAnswers ReviewedPublished—Feed elements that are questions that have candidate answers that have been reviewed or published. This value is valid only for users with the Access Einstein-Generated Answers permission. • Read—Feed elements that are older than 30 days or are marked as read for the context user. Includes existing feed elements when the context user joined the group. This value is valid only for the Record feed of a group. • SolvedQuestions—Feed elements that are questions and that have a best answer. • UnansweredQuestions—Feed elements that are questions and that don’t have any answers. • UnansweredQuestionsWithCandidate Answers—Feed elements that are questions that don’t have answers but have candidate answers associated with them. This value is valid only for users with the Access Einstein-Generated Answers permission. • Unread—Feed elements that are created in the past 30 days and aren’t marked as read for the context user. This value is valid only for the Record feed of a group. • UnsolvedQuestions—Feed elements that are questions and that don’t have a best answer. Note: The filter parameter doesn’t work for group feeds. You can specify customFilter or filter. You can’t specify both.

344

Required Available or Version Optional

Chatter REST API Developer Guide

Feeds Resources

Parameter Name

Type

Description

Required Available or Version Optional

page

String

A generated token that indicates the view of feed elements in the feed.

Optional

31.0

Page tokens are returned as part of the response body, in one of the URL parameters, such as nextPageURL, for example: "nextPageUrl": "/services/data/v41.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-elements ?page=2011-03-30T17:34:50Z, 0D5D0000000DSv4KAG"

pageSize

Integer

Specifies the number of elements per page. Valid values Optional are between 1 and 100. If you don't specify a size, the default is 25.

31.0

q

String

One or more keywords to search for in the body and comments of feed elements in this feed.

Optional

31.0

recentComment Integer Count

Maximum number of comments to include per feed Optional element. The default value is 3. The maximum value is 25.

31.0

showInternal Boolean Only

Specifies whether to show only feed elements from internal (non-community) users (true), or not (false). The default value is false.

Optional

31.0

Specifies the order of feed items in the feed.

Optional

31.0

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

sort

String

• CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions.

345

Chatter REST API Developer Guide

Parameter Name

Type

Feeds Resources

Description

Required Available or Version Optional

• Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc. updatedSince String

An opaque token defining the modification time stamp Optional of the feed and the sort order.

31.0

Do not construct this token. Retrieve this token from the updatesToken property of the Feed Element Page response body. The updatedSince parameter doesn’t return feed elements that are created in the same second as the request.

Response body for GET Feed Element Page

Record Feed Items Returns the feed items for all the records the context 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. Note: You cannot post a feed item to a Record Feed if the record is of type ContentDocument. Resource /chatter/feeds/record/me/feed-items

or /chatter/feeds/record/recordId/feed-items

Note: If recordId is a user ID, it must be the same as the context user or the alias me. Available versions 23.0–31.0 Important: In version 32.0 and later, use Record Feed Elements. Requires Chatter Yes HTTP methods GET, POST, HEAD

346

Chatter REST API Developer Guide

Feeds Resources

Request parameters for GET Parameter Name

Type

Description

Required Available or Version Optional

density

String

The density of the feed. One of these values:

Optional

29.0–31.0

A generated token that indicates the view of feed items Optional in the feed. Page tokens are returned as part of the response body, in one of the URL parameters, such as nextPageURL, for example:

23.0–31.0

• AllUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations. • FewerUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations, but hides some system-generated updates from records. The default value is AllUpdates. page

String

"nextPageUrl": "/services/data/v41.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-items ?page=2011-03-30T17:34:50Z, 0D5D0000000DSv4KAG"

pageSize

Integer

Specifies the number of items per page. Valid values Optional are from 1 through 100. If you don't specify a size, the default is 25.

23.0–31.0

q

String

One or more keywords to search for in the body and comments of feed items in this feed.

Optional

28.0–31.0

recentComment Integer Count

Maximum number of comments to include per feed Optional item. The default value is 3. The maximum value is 25.

29.0–31.0

showInternal Boolean Only

Specifies whether to show only feed items from internal Optional (non-community) users (true), or not (false). The default value is false.

30.0–31.0

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

347

Chatter REST API Developer Guide

Feeds Resources

Parameter Name

Type

Description

Required Available or Version Optional

sort

String

Specifies the order of feed items in the feed.

Optional

23.0–31.0

An opaque token defining the modification time stamp Optional of the feed and the sort order.

30.0–31.0

• CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc. updatedSince String

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

Request body for POST Root XML tag

JSON The following example attaches a poll to a feed item: { "body":{ "messageSegments":[ { "type":"Text", "text":"When should we meet for release planning?" } ] }, "capabilities":{ "poll":{ "choices":[ "Monday",

348

Chatter REST API Developer Guide

Feeds Resources

"Tuesday" ] } }, "feedElementType":"FeedItem", "subjectId":"me" }

Properties Name

Type

Description

Required or Optional

attachment

Depends on type.

You can specify only one of these Optional values in the attachment parameter. Values are:

Available Version

• Attachment Input: Canvas App (v29.0–31.0) • Attachment Input: Existing Content (v23.0–31.0) • Attachment Input: Feed Poll (v26.0–31.0) • Attachment Input: Link (v23.0–31.0) • Attachment Input: New File Upload (v23.0–31.0) Important: As of API version 32.0, use the capabilities property. body

Message Body Input

Description of message body. Feed item and comment bodies have a 10,000 character limit. Because this limit can change, we recommend that clients make a describeSObjects() call on the FeedItem or FeedComment object. To determine the maximum number of allowed characters, look at the length of the Body or CommentBody field. The body can contain up to 25 mentions. If you specify originalFeedElementId to share a feed item, use the body

property to add the first comment to the feed item.

349

Required unless the 23.0 feed item has a content capability or a link capability

Chatter REST API Developer Guide

Name

Feeds Resources

Type

Description

Required or Optional

Available Version

Optional

31.0

To edit this property in a feed item, make a PATCH request to /chatter/feed-elements /feedElementId. Editing feed

posts is supported in version 34.0 and later. capabilities

Feed Element Capabilities Input

The capabilities that define the behavior of this feed element.

isBookmarked ByCurrentUser

Boolean

Specifies whether to bookmark the Optional new feed item for the user (true) or not (false). The default value is false.

24.0–31.0

Important: As of API version 32.0, use the capabilities.bookmarks. isBookmarkedByCurrentUser

property. feedElementType String

The type of feed element this input Required represents.

31.0

The only valid value is FeedItem. originalFeed ElementId

String

To share a feed element, specify its Optional 18-character ID.

31.0–38.0

Note: You can’t share a post and upload a file in the same request body. Important: In API version 39.0 and later, use the capabilities.feedEntity Share.feedEntityId

property. originalFeedItemId String

To share a feed item, specify its 18-character ID. Important: In API version 32.0–38.0, use the originalFeedElementId

property. In API version 39.0 and later, use the capabilities.feedEntity

350

Optional

24.0–31.0

Chatter REST API Developer Guide

Name

Feeds Resources

Type

Description

Required or Optional

Available Version

Share.feedEntityId

property. subjectId

String

The ID of the parent this feed Required element is being posted to. This value can be the ID of a user, group, or record, or the string me to indicate the context user.

31.0

visibility

String

Who can see the post. Valid values Optional are:

26.0

• 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, group, or direct message, the visibility of the feed item must be AllUsers.

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

351

Chatter REST API Developer Guide

Feeds Resources

Parameter Name

Type

Description

Required Available or Version Optional

attachmentType

String

The attachment type. Must contain the value ExistingContent.

Required

27.0–31.0

contentDocumentId

String

18-character ID of an existing file.

Required

23.0–31.0

isBookmarked ByCurrentUser

Boolean Specifies whether to bookmark the new feed item for the Optional user (true) or not (false). The default value is false.

26.0–31.0

text

String

Text of the feed item.

Optional

23.0–31.0

visibility

String

Who can see the post. Valid values are:

Optional

26.0–31.0

Required or Optional

Available Version

• 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, group, or direct message, the visibility of the feed item must be AllUsers.

Parameters for attaching a new file Parameter Name

Type

Description

attachmentType

String

The attachment type. Must contain the value NewFile. Required

27.0–31.0

desc

String

Description of file being posted.

Optional

23.0–26.0

Attention: Don’t use this parameter as of version 27.0. Use description instead. description

String

Description of file being posted.

Optional

27.0–31.0

fileName

String

File name of the file being posted.

Required

23.0–24.0

Attention: Don’t use this parameter as of version 24.0. Use title instead.

352

Chatter REST API Developer Guide

Feeds Resources

Parameter Name

Type

Description

Required or Optional

Available Version

isBookmarked ByCurrentUser

Boolean Specifies whether to bookmark the new feed item for the Optional user (true) or not (false). The default value is false.

26.0–31.0

text

String

Text of the feed item.

Optional

23.0–31.0

title

String

File name of a file to be uploaded and posted.

Required

24.0–31.0

visibility

String

Who can see the post. Valid values are:

Optional

26.0–31.0

• 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, group, or direct message, the visibility of the feed item must be AllUsers.

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–31.0

isBookmarked ByCurrentUser

Boolean

Specifies whether to bookmark the new feed item Optional for the user (true) or not (false). The default value is false.

26.0–31.0

text

String

Text of the feed item.

Optional

23.0–31.0

url

String

URL of the link.

Required

23.0–31.0

urlName

String

Name of the URL.

Optional

23.0–31.0

353

Chatter REST API Developer Guide

Feeds Resources

Parameter Name

Type

Description

Required or Optional

Available Version

visibility

String

Who can see the post. Valid values are:

Optional

26.0–31.0

• 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, group, or direct message, the visibility of the feed item must be AllUsers.

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–31.0

isBookmarked ByCurrentUser

Boolean

Specifies whether to bookmark the new feed item Optional for the user (true) or not (false). The default value is false.

26.0–31.0

pollChoice1 through pollChoice10

String

The choices used to create a feed item with a poll. Required Specify 2–10 poll choices for each poll.

26.0–31.0

text

String

Text of the feed item.

Required

23.0–31.0

visibility

String

Who can see the post. Valid values are:

Optional

26.0–31.0

• 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.

354

Chatter REST API Developer Guide

Parameter Name

Feeds Resources

Type

Description

Required or Optional

Available Version

Required or Optional

Available Version

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, group, or direct message, the visibility of the feed item must be AllUsers.

Parameters for sharing a post Parameter Name

Type

Description

isBookmarked ByCurrentUser

Boolean

Specifies whether to bookmark the new feed item Optional for the user (true) or not (false). The default value is false.

26.0–31.0

originalFeedItemId

String

The 18-character ID of the feed item you want to share.

Required

24.0–31.0

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

String

A comment on the shared feed item.

Optional

28.0–31.0

visibility

String

Who can see the post. Valid values are:

Optional

26.0–31.0

• 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.

355

Chatter REST API Developer Guide

Parameter Name

Feeds Resources

Type

Description

Required or Optional

Available Version

Required or Optional

Available Version

• 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, group, or direct message, the visibility of the feed item must be AllUsers.

Parameters for posting text only Parameter Name

Type

Description

isBookmarked ByCurrentUser

Boolean

Specifies whether to bookmark the new feed item Optional for the user (true) or not (false). The default value is false.

26.0–31.0

text

String

Text of the feed item. The maximum number of characters is 1000.

Required

23.0–31.0

visibility

String

Who can see the post. Valid values are:

Optional

26.0–31.0

• 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, group, or direct message, the visibility of the feed item must be AllUsers.

Parameters for posting a canvas app

356

Chatter REST API Developer Guide

Feeds Resources

Parameter Name

Type

Description

Required or Optional

Available Version

attachmentType

String

The attachment type. Must contain the value Canvas. Required

29.0–31.0

description

String

Description of the canvas app

Optional

29.0–31.0

developerName

String

The developer name (API name) of the canvas app

Required

29.0–31.0

height

String

The height of the canvas app in pixels. Default height is Optional 200 pixels.

29.0–31.0

isBookmarked ByCurrentUser

Boolean Specifies whether to bookmark the new feed item for the Optional user (true) or not (false). The default value is false.

29.0–31.0

namespacePrefix

String

The namespace prefix of the Developer Edition organization in which the canvas app was created.

Optional

29.0–31.0

parameters

String

Parameters passed to the canvas app in JSON format. The Optional JSON must be URL-encoded:

29.0–31.0

parameters={'isUpdated'='true';}"

text

String

Text of the feed item

Optional

29.0–31.0

thumbnailUrl

String

The URL to a thumbnail image for the canvas app. Maximum dimensions are 120x120 pixels.

Optional

29.0–31.0

title

String

The title of the link to the canvas app

Optional

29.0–31.0

visibility

String

Who can see the post. Valid values are:

Optional

29.0–31.0

• 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, group, or direct message, the visibility of the feed item must be AllUsers.

Response body for GET Feed Item Page

357

Chatter REST API Developer Guide

Feeds Resources

Response body for POST Feed Item Example for GET This request searches for feed items that contain the string track: /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.

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 /chatter/feeds/record/me/feed-items/flat

or /chatter/feeds/record/userId/feed-items/flat

Note: userId must be the ID of the context user or the alias me. Available since version 25.0–26.0 Requires Chatter Yes HTTP methods GET or HEAD Request parameters Parameter Name

Type

Description

numFeedItems

Integer

Specifies the number of feed items returned. Valid values are from 0 through 100. Default value is 25. Because feed items can 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.

358

Chatter REST API Developer Guide

Feeds Resources

Parameter Name

Type

Description

recentCommentCount

Integer

Specifies the number of recent comments returned. Valid values are from 0 through 25. Default value is 3.

sort

String. One of the following:

Sorts the returned feed either by created date in ascending order, or by last modified date, also in ascending order. The default is LastModifiedDateDesc

• CreatedDateDesc • LastModifiedDateDesc

Response body Flat Feed IN THIS SECTION: Record Pinned Feed Elements (Beta) Get pinned feed elements from a group feed. Pin or unpin a feed element to a group feed. SEE ALSO: Records Resources Feeds and Feed Elements Get a Record Feed Get Another User’s Feed

Record Pinned Feed Elements (Beta) Get pinned feed elements from a group feed. Pin or unpin a feed element to a group feed. Note: This release contains a beta version of pinned posts, which means it’s a high-quality feature with known limitations. Post pinning isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features. You can provide feedback and suggestions for pinned posts in the Trailblazer Community. Resource /chatter/feeds/record/recordId/pinned-feed-elements /connect/communities/communityId/chatter/feeds/record/recordId/pinned-feed-elements

Note: The recordId must be a group ID. Available version 41.0 Requires Chatter Yes HTTP methods GET, PATCH

359

Chatter REST API Developer Guide

Feeds Resources

Response body for GET Pinned Feed Element Collection (Beta) Request body for PATCH Root XML tag

JSON example { "entityId":"0D5B000000TW7uh", "isPinned": "true" }

Properties Name

Type

Description

Required or Optional

Available Version

entityId

String

ID of the entity to pin or unpin. In version Required 41.0, entityId must be a feed item ID, and only one feed item can be pinned per feed.

41.0

isPinned

Boolean

Specifies whether to pin (true) or unpin Required (false) the entity.

41.0

Response body for PATCH Pin Capability (Beta)

Streams Feed Resources The feed of a stream. Available resources are: Resource

Description

/chatter/feeds/streams/streamId

Get the URL to the streams feed.

/chatter/feeds/streams/streamId/feed-elements Get all feed elements from any combination of up to 25 people,

groups, records, and topics that the context user subscribes to in the stream.

Streams Feed URL Get the URL to the streams feed. Resource /chatter/feeds/streams/streamId /connect/communities/communityId/chatter/feeds/streams/streamId

360

Chatter REST API Developer Guide

Feeds Resources

Available since version 39.0 Requires Chatter Yes HTTP methods GET, HEAD Request parameters Parameter Name

Type

Description

sort

String

Specifies the order of feed items in the feed. • CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

Response body Feed

Streams Feed Elements Get all feed elements from any combination of up to 25 people, groups, records, and topics that the context user subscribes to in the stream. Resource /chatter/feeds/streams/streamId/feed-elements /connect/communities/communityId/chatter/feeds/streams/streamId/feed-elements

361

Chatter REST API Developer Guide

Feeds Resources

Available since version 39.0 Requires Chatter Yes HTTP methods GET, HEAD Request parameters Parameter Name

Type

Description

Required Available or Version Optional

density

String

The density of the feed. One of these values:

Optional

31.0

Maximum number of feed elements to include in a bundle. Optional The value must be an integer from 0 through 10. The default value is 3.

31.0

A generated token that indicates the view of feed elements Optional in the feed.

31.0

• AllUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations. • FewerUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations, but hides some system-generated updates from records. The default value is AllUpdates. elementsPerBundle Integer

page

String

Page tokens are returned as part of the response body in one of the URL parameters, such as nextPageURL: "nextPageUrl": "/services/data/v41.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-elements ?page=2011-03-30T17:34:50Z, 0D5D0000000DSv4KAG"

pageSize

Integer

Specifies the number of elements per page. Valid values are Optional from 1 through 100. If you don't specify a size, the default is 25.

31.0

recentComment Count

Integer

Maximum number of comments to include per feed element. The default value is 3. The maximum value is 25.

Optional

31.0

sort

String

Specifies the order of feed items in the feed.

Optional

31.0

• CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for

362

Chatter REST API Developer Guide

Parameter Name

Feeds Resources

Type

Description

Required Available or Version Optional

DirectMessageModeration, Moderation,

and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc. updatedSince

String

An opaque token defining the modification time stamp of Optional the feed and the sort order.

31.0

Do not construct this token. Retrieve this token from the updatesToken property of the Feed Element Page response body. The updatedSince parameter doesn’t return feed elements that are created in the same second as the request.

Response body Feed Element Page

To Feed Resources A feed containing all @mentions of the context user and posts others have made to the context user's feed. Available resources are: Resource

Description

/chatter/feeds/to/me

Returns a URL to the feed elements for the feed of the context user.

/chatter/feeds/to/me/feed-elements

Returns the feed elements for all @mentions of the context user, and all posts made to the user's feed.

To Feed URL Returns a URL to the feed elements for the feed of the context user.

363

Chatter REST API Developer Guide

Feeds Resources

Resource /chatter/feeds/to/userId /connect/communities/communityId/chatter/feeds/to/userId

Note: userId must be the ID of the context user or the alias me. Available since version 23.0 Requires Chatter Yes HTTP methods GET, HEAD Request parameters Parameter Name

Type

Description

sort

String

Specifies the order of feed items in the feed. • CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

Response body Feed

364

Chatter REST API Developer Guide

Feeds Resources

To Feed Elements Returns the feed elements for all @mentions of the context user, and all posts made to the user's feed. The To Feed includes posts that mention you and posts that other users make to your wall. Your own posts are included only if they have a comment. The comment can be from you or from another user. Resource /chatter/feeds/to/userId/feed-elements /connect/communities/communityId/chatter/feeds/to/userId/feed-elements

Note: userId must be the ID of the context user or the alias me. Available since version 31.0 Requires Chatter Yes HTTP methods GET, HEAD Request parameters Parameter Name

Type

Description

Required Available or Version Optional

density

String

The density of the feed. One of these values:

Optional

31.0

Maximum number of feed elements to include in a Optional bundle. The value must be an integer from 0 through 10. The default value is 3.

31.0

• AllUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations. • FewerUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations, but hides some system-generated updates from records. The default value is AllUpdates. elementsPerBundle Integer

Note: Bundled posts contain feed-tracked changes. In Salesforce for Android and Salesforce for iOS, bundled posts are in record feeds only. page

String

A generated token that indicates the view of feed Optional elements in the feed.Page tokens are returned as part

365

31.0

Chatter REST API Developer Guide

Parameter Name

Type

Feeds Resources

Description

Required Available or Version Optional

of the response body, in one of the URL parameters, such as nextPageURL, for example: "nextPageUrl": "/services/data/v41.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-elements ?page=2011-03-30T17:34:50Z, 0D5D0000000DSv4KAG"

pageSize

Integer

The number of feed elements per page. Valid values are between 1 and 100. The default size is 25.

Optional

31.0

q

String

One or more keywords to search for in the body and comments of feed elements in this feed.

Optional

31.0

Maximum number of comments to include per feed Optional element. The default value is 3. The maximum value is 25.

31.0

Specifies the order of feed items in the feed.

31.0

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

sort

String

• CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

Response body for GET Feed Element Page

366

Optional

Chatter REST API Developer Guide

Feeds Resources

To Feed Items Returns the feed items for all @mentions of the context user, and all posts made to the user's feed. The To Feed includes posts that mention you and posts that other users make to your wall. Your own posts are included only if they have a comment. The comment can be from you or from another user. Resource /chatter/feeds/to/me/feed-items

OR /chatter/feeds/to/userId/feed-items

Note: userId must be the ID of the context user or the alias me. Available versions 23.0–31.0 Important: In version 32.0 and later, use To Feed Elements. Requires Chatter Yes HTTP methods GET, HEAD Request parameters Parameter Name

Type

Description

Required Available or Version Optional

density

String

The density of the feed. One of these values:

Optional

29.0–31.0

A generated token that indicates the view of feed items Optional in the feed. Page tokens are returned as part of the response body, in one of the URL parameters, such as nextPageURL, for example:

23.0–31.0

• AllUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations. • FewerUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations, but hides some system-generated updates from records. The default value is AllUpdates. page

String

"nextPageUrl": "/services/data/v41.0/ chatter/feeds/news/ 005D0000001GLowIAN

367

Chatter REST API Developer Guide

Parameter Name

Type

Feeds Resources

Description

Required Available or Version Optional

/feed-items ?page=2011-03-30T17:34:50Z, 0D5D0000000DSv4KAG"

pageSize

Integer

Specifies the number of items per page. Valid values Optional are from 1 through 100. If you don't specify a size, the default is 25.

23.0–31.0

q

String

One or more keywords to search for in the body and comments of feed items in this feed.

Optional

28.0–31.0

Maximum number of comments to include per feed Optional item. The default value is 3. The maximum value is 25.

29.0–31.0

Specifies the order of feed items in the feed.

23.0–31.0

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

String

Optional

• CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

Response body for GET Feed Item Page

To 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.

368

Chatter REST API Developer Guide

Feeds Resources

Resource /chatter/feeds/to/me/feed-items/flat

or /chatter/feeds/to/userId/feed-items/flat

Note: userId must be the ID of the context user or the alias me. Available since version 25.0–26.0 Requires Chatter Yes HTTP methods GET or HEAD Request parameters Parameter Name

Type

Description

numFeedItems

Integer

Specifies the number of feed items returned. Valid values are from 0 through 100. Default value is 25. Because feed items can 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.

recentCommentCount

Integer

Specifies the number of recent comments returned. Valid values are from 0 through 25. Default value is 3.

sort

String. One of the following:

Sorts the returned feed either by created date in ascending order, or by last modified date, also in ascending order. The default is LastModifiedDateDesc

• CreatedDateDesc • LastModifiedDateDesc

Response body Flat Feed SEE ALSO: Feeds and Feed Elements

369

Chatter REST API Developer Guide

Feeds Resources

Topics Feed Resources The feed of the specified topic. Available resources are: Resource

Description

/chatter/feeds/topics/topicId

Returns a URL to the feed items for the specified topic.

/chatter/feeds/topics/topicId/feed-elements Returns the feed elements for all @mentions of the context user,

and all posts made to the user's feed. /chatter/feeds/topics/topicId/pinned-feed-elements Get pinned feed elements from a topic feed. Pin or unpin a feed

element to a topic feed.

(Beta)

Topics Feed URL Returns a URL to the feed items for the specified topic. Resource /chatter/feeds/topics/topicId /connect/communities/communityId/chatter/feeds/topics/topicId

Available since version 28.0 Requires Chatter Yes HTTP methods GET or HEAD Request parameters Parameter Name

Type

Description

sort

String

Specifies the order of feed items in the feed. • CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when

370

Chatter REST API Developer Guide

Parameter Name

Feeds Resources

Type

Description the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

Response body Feed

Topics Feed Elements Returns all feed elements for the specified topic. Resource /chatter/feeds/topics/topicId/feed-elements /connect/communities/communityId/chatter/feeds/topics/topicId/feed-elements

Available since version 31.0 Requires Chatter Yes HTTP methods GET, HEAD Request parameters Parameter Name

Type

Description

Required Available or Version Optional

filter

String

Specifies a filter value for a feed.

Optional

• AllQuestions—Feed elements that are questions. • AuthoredBy—Feed elements authored by the user profile owner. This value is valid only for the UserProfile feed. • CommunityScoped—Feed elements that are scoped to communities. Currently, these feed elements have a User or a Group parent record. However, other parent record types could be scoped to communities in the future. Feed elements that are always visible in all communities are filtered

371

32.0

Chatter REST API Developer Guide

Parameter Name

Type

Feeds Resources

Description

Required Available or Version Optional

out. This value is valid only for the UserProfile feed. • QuestionsWithCandidateAnswers—Feed elements that are questions that have candidate answers associated with them. This value is valid only for users with the Access Einstein-Generated Answers permission. • QuestionsWithCandidateAnswers ReviewedPublished—Feed elements that are questions that have candidate answers that have been reviewed or published. This value is valid only for users with the Access Einstein-Generated Answers permission. • Read—Feed elements that are older than 30 days or are marked as read for the context user. Includes existing feed elements when the context user joined the group. This value is valid only for the Record feed of a group. • SolvedQuestions—Feed elements that are questions and that have a best answer. • UnansweredQuestions—Feed elements that are questions and that don’t have any answers. • UnansweredQuestionsWithCandidate Answers—Feed elements that are questions that don’t have answers but have candidate answers associated with them. This value is valid only for users with the Access Einstein-Generated Answers permission. • Unread—Feed elements that are created in the past 30 days and aren’t marked as read for the context user. This value is valid only for the Record feed of a group. • UnsolvedQuestions—Feed elements that are questions and that don’t have a best answer. page

String

A generated token that indicates the view of feed Optional elements in the feed. Page tokens are returned as part of the response body, in one of the URL parameters, such as nextPageURL.

31.0

pageSize

Integer

Specifies the number of feed elements per page. Valid Optional values are between 1 and 100. The default value is 25.

31.0

372

Chatter REST API Developer Guide

Feeds Resources

Parameter Name

Type

Description

Required Available or Version Optional

sort

String

Specifies the order of feed items in the feed.

Optional

• CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

Response body Feed Element Page

Topics Feed Items Returns all feed items for the specified topic. To post a topic, use the Feed-Items Topics resource. Resource /chatter/feeds/topics/topicId/feed-items

Available versions 28.0–31.0 Important: In version 32.0 and later, use Topics Feed Elements. Requires Chatter Yes HTTP methods GET or HEAD

373

31.0

Chatter REST API Developer Guide

Feeds Resources

Request parameters Parameter Name

Type

Description

page

String

A generated token that indicates the view of feed items Optional in the feed. Page tokens are returned as part of the response body, in one of the URL parameters, such as nextPageURL.

28.0–31.0

pageSize

Integer

Specifies the number of items per page. Valid values Optional are from 1 through 100. If you don't specify a size, the default is 25.

28.0–31.0

sort

String

Specifies the order of feed items in the feed.

28.0–31.0

• CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

Response body Feed Item Page IN THIS SECTION: Topics Pinned Feed Elements (Beta) Get pinned feed elements from a topic feed. Pin or unpin a feed element to a topic feed. SEE ALSO: Feeds and Feed Elements

Topics Pinned Feed Elements (Beta) Get pinned feed elements from a topic feed. Pin or unpin a feed element to a topic feed.

374

Required Available or Version Optional

Optional

Chatter REST API Developer Guide

Feeds Resources

Note: This release contains a beta version of pinned posts, which means it’s a high-quality feature with known limitations. Post pinning isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features. You can provide feedback and suggestions for pinned posts in the Trailblazer Community. Resource /chatter/feeds/topics/topicId/pinned-feed-elements /connect/communities/communityId/chatter/feeds/topics/topicId/pinned-feed-elements

Available version 41.0 Requires Chatter Yes HTTP methods GET, PATCH Response body for GET Pinned Feed Element Collection (Beta) Request body for PATCH Root XML tag

JSON example { "entityId":"0D5B000000TW7uh", "isPinned": "true" }

Properties Name

Type

Description

Required or Optional

entityId

String

ID of the entity to pin or unpin. In version Required 41.0, entityId must be a feed item ID, and only one feed item can be pinned per feed.

41.0

isPinned

Boolean

Specifies whether to pin (true) or unpin Required (false) the entity.

41.0

Response body for PATCH Pin Capability (Beta)

375

Available Version

Chatter REST API Developer Guide

Feeds Resources

User Profile Feed Resources Contains feed elements created when a user changes records that can be tracked in a feed, feed elements whose parent is the user, and feed elements that mention the user. This feed is different than the news feed, which returns more feed items, including group updates. You can post feed items to the user-profile feed. You can get another user’s user profile feed. Note: To match the feed displayed in the Chatter UI, the composition of this feed may change between releases. Available resources are: Resource

Description

/chatter/feeds/user-profile/me

Returns a URL to the feed elements for the user profile feed.

/chatter/feeds/user-profile/me/feed-elements Returns feed elements created when a user changes records that

can be tracked in a feed, feed elements whose parent is the user, and feed elements that mention the user. This feed is different than the news feed, which returns more feed items, including group updates. You can post feed items to the user-profile feed. You can get another user’s user profile feed.

User Profile Feed URL Returns a URL to the feed elements for the user profile feed. Resource /chatter/feeds/user-profile/userId /connect/communities/communityId/chatter/feeds/user-profile/userId

Response body Feed

User Profile Feed Elements Returns feed elements created when a user changes records that can be tracked in a feed, feed elements whose parent is the user, and feed elements that mention the user. This feed is different than the news feed, which returns more feed items, including group updates. You can post feed items to the user-profile feed. You can get another user’s user profile feed. Resource /chatter/feeds/user-profile/userId/feed-elements /connect/communities/communityId/chatter/feeds/user-profile/userId/feed-elements

Available since version 31.0 Requires Chatter Yes HTTP methods GET, HEAD

376

Chatter REST API Developer Guide

Feeds Resources

Request parameters for GET Parameter Name

Type

Description

Required Available or Version Optional

density

String

The density of the feed. One of these values:

Optional

31.0

Maximum number of feed elements to include in a Optional bundle. The value must be an integer from 0 through 10. The default value is 3.

31.0

• AllUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations. • FewerUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations, but hides some system-generated updates from records. The default value is AllUpdates. elementsPerBundle Integer

Note: Bundled posts contain feed-tracked changes. In Salesforce for Android and Salesforce for iOS, bundled posts are in record feeds only. filter

String

Valid values are CommunityScoped and AuthoredBy.

Optional

34.0

page

String

A generated token that indicates the view of feed Optional elements in the feed. Page tokens are returned as part of the response body, in one of the URL parameters, such as nextPageURL:

31.0

"nextPageUrl": "/services/data/v41.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-elements ?page=2011-03-30T17:34:50Z, 0D5D0000000DSv4KAG"

pageSize

Integer

Specifies the number of feed elements per page. Valid Optional values are from 1 through 100. The default value is 25.

31.0

q

String

One or more keywords to search for in the body and comments of feed elements in this feed.

31.0

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

377

Optional

Chatter REST API Developer Guide

Parameter Name

Type

recentComment Integer Count

sort

String

Feeds Resources

Description

Required Available or Version Optional

Maximum number of comments to include per feed Optional element. The default value is 3. The maximum value is 25.

31.0

Specifies the order of feed items in the feed.

31.0

Optional

• CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

Response body for GET Feed Element Page

User Profile Feed Items Returns the feed items for all actions on all records that can be tracked in a feed. You can also use this resource to post a new feed item. For information about posting a feed item, see Using POST, PATCH, or PUT for Input. In API versions 23.0 and 24.0, posts to the User Profile Feed Items resource created user status updates; they didn’t create feed items. Therefore, the character limit for the User Profile Feed Items resource for those API versions is still 1000 characters. Resource /chatter/feeds/user-profile/me/feed-items

or /chatter/feeds/user-profile/userId/feed-items

Available versions 23.0–31.0 Important: In version 32.0 and later, use User Profile Feed Elements.

378

Chatter REST API Developer Guide

Feeds Resources

Requires Chatter Yes HTTP methods GET, POST or HEAD Request body for POST Root XML tag

JSON The following example attaches a poll to a feed item: { "body":{ "messageSegments":[ { "type":"Text", "text":"When should we meet for release planning?" } ] }, "capabilities":{ "poll":{ "choices":[ "Monday", "Tuesday" ] } }, "feedElementType":"FeedItem", "subjectId":"me" }

Properties Name

Type

Description

attachment

Depends on type.

You can specify only one of these Optional values in the attachment parameter. Values are: • Attachment Input: Canvas App (v29.0–31.0) • Attachment Input: Existing Content (v23.0–31.0) • Attachment Input: Feed Poll (v26.0–31.0) • Attachment Input: Link (v23.0–31.0) • Attachment Input: New File Upload (v23.0–31.0)

379

Required or Optional

Available Version

Chatter REST API Developer Guide

Name

Feeds Resources

Type

Description

Required or Optional

Available Version

Important: As of API version 32.0, use the capabilities property. body

Message Body Input

Description of message body. Feed item and comment bodies have a 10,000 character limit. Because this limit can change, we recommend that clients make a describeSObjects() call on the FeedItem or FeedComment object. To determine the maximum number of allowed characters, look at the length of the Body or CommentBody field. The body can contain up to 25 mentions.

Required unless the 23.0 feed item has a content capability or a link capability

If you specify originalFeedElementId

to share a feed item, use the body property to add the first comment to the feed item. To edit this property in a feed item, make a PATCH request to /chatter/feed-elements /feedElementId. Editing feed

posts is supported in version 34.0 and later. capabilities

Feed Element Capabilities Input

The capabilities that define the behavior of this feed element.

Optional

isBookmarked ByCurrentUser

Boolean

Specifies whether to bookmark the Optional new feed item for the user (true) or not (false). The default value is false.

31.0 24.0–31.0

Important: As of API version 32.0, use the capabilities.bookmarks. isBookmarkedByCurrentUser

property. feedElementType String

The type of feed element this input Required represents. The only valid value is FeedItem.

380

31.0

Chatter REST API Developer Guide

Feeds Resources

Name

Type

Description

Required or Optional

originalFeed ElementId

String

To share a feed element, specify its Optional 18-character ID.

Available Version 31.0–38.0

Note: You can’t share a post and upload a file in the same request body. Important: In API version 39.0 and later, use the capabilities.feedEntity Share.feedEntityId

property. originalFeedItemId String

To share a feed item, specify its 18-character ID.

Optional

24.0–31.0

Important: In API version 32.0–38.0, use the originalFeedElementId

property. In API version 39.0 and later, use the capabilities.feedEntity Share.feedEntityId

property. subjectId

String

The ID of the parent this feed Required element is being posted to. This value can be the ID of a user, group, or record, or the string me to indicate the context user.

31.0

visibility

String

Who can see the post. Valid values Optional are:

26.0

• 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.

381

Chatter REST API Developer Guide

Name

Feeds Resources

Type

Description

Required or Optional

Available Version

• 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, group, or direct message, the visibility of the feed item must be AllUsers.

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 Available or Version Optional

attachmentType

String

The attachment type. Must contain the value ExistingContent.

Required

27.0–31.0

contentDocumentId

String

18-character ID of an existing file.

Required

23.0–31.0

isBookmarked ByCurrentUser

Boolean Specifies whether to bookmark the new feed item for the Optional user (true) or not (false). The default value is false.

26.0–31.0

text

String

Text of the feed item.

Optional

23.0–31.0

visibility

String

Who can see the post. Valid values are:

Optional

26.0–31.0

• 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, group, or direct message, the visibility of the feed item must be AllUsers.

382

Chatter REST API Developer Guide

Feeds Resources

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–31.0

desc

String

Description of file being posted.

Optional

23.0–26.0

Attention: Don’t use this parameter as of version 27.0. Use description instead. description

String

Description of file being posted.

Optional

27.0–31.0

fileName

String

File name of the file being posted.

Required

23.0–24.0

isBookmarked ByCurrentUser

Boolean Specifies whether to bookmark the new feed item for the Optional user (true) or not (false). The default value is false.

26.0–31.0

text

String

Text of the feed item.

Optional

23.0–31.0

title

String

File name of a file to be uploaded and posted.

Required

24.0–31.0

visibility

String

Who can see the post. Valid values are:

Optional

26.0–31.0

Attention: Don’t use this parameter as of version 24.0. Use title instead.

• 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, group, or direct message, the visibility of the feed item must be AllUsers.

Parameters for posting a link

383

Chatter REST API Developer Guide

Feeds Resources

Parameter Name

Type

Description

Required or Optional

Available Version

attachmentType

String

The attachment type. Must contain the value Link.

Required

27.0–31.0

isBookmarked ByCurrentUser

Boolean

Specifies whether to bookmark the new feed item Optional for the user (true) or not (false). The default value is false.

26.0–31.0

text

String

Text of the feed item.

Optional

23.0–31.0

url

String

URL of the link.

Required

23.0–31.0

urlName

String

Name of the URL.

Optional

23.0–31.0

visibility

String

Who can see the post. Valid values are:

Optional

26.0–31.0

• 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, group, or direct message, the visibility of the feed item must be AllUsers.

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–31.0

isBookmarked ByCurrentUser

Boolean

Specifies whether to bookmark the new feed item Optional for the user (true) or not (false). The default value is false.

26.0–31.0

384

Chatter REST API Developer Guide

Feeds Resources

Parameter Name

Type

Description

Required or Optional

Available Version

pollChoice1 through pollChoice10

String

The choices used to create a feed item with a poll. Required Specify 2–10 poll choices for each poll.

26.0–31.0

text

String

Text of the feed item.

Required

23.0–31.0

visibility

String

Who can see the post. Valid values are:

Optional

26.0–31.0

Required or Optional

Available Version

• 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, group, or direct message, the visibility of the feed item must be AllUsers.

Parameters for sharing a post Parameter Name

Type

Description

isBookmarked ByCurrentUser

Boolean

Specifies whether to bookmark the new feed item Optional for the user (true) or not (false). The default value is false.

26.0–31.0

originalFeedItemId

String

The 18-character ID of the feed item you want to share.

Required

24.0–31.0

Optional

28.0–31.0

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

String

A comment on the shared feed item.

385

Chatter REST API Developer Guide

Feeds Resources

Parameter Name

Type

Description

Required or Optional

Available Version

visibility

String

Who can see the post. Valid values are:

Optional

26.0–31.0

Required or Optional

Available Version

• 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, group, or direct message, the visibility of the feed item must be AllUsers.

Parameters for posting text only Parameter Name

Type

Description

isBookmarked ByCurrentUser

Boolean

Specifies whether to bookmark the new feed item Optional for the user (true) or not (false). The default value is false.

26.0–31.0

text

String

Text of the feed item. The maximum number of characters is 1000.

Required

23.0–31.0

visibility

String

Who can see the post. Valid values are:

Optional

26.0–31.0

• 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:

386

Chatter REST API Developer Guide

Parameter Name

Feeds Resources

Type

Description

Required or Optional

Available Version

Required or Optional

Available Version

• 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, group, or direct message, the visibility of the feed item must be AllUsers.

Parameters for posting a canvas app Parameter Name

Type

Description

attachmentType

String

The attachment type. Must contain the value Canvas. Required

29.0–31.0

description

String

Description of the canvas app

Optional

29.0–31.0

developerName

String

The developer name (API name) of the canvas app

Required

29.0–31.0

height

String

The height of the canvas app in pixels. Default height is Optional 200 pixels.

29.0–31.0

isBookmarked ByCurrentUser

Boolean Specifies whether to bookmark the new feed item for the Optional user (true) or not (false). The default value is false.

29.0–31.0

namespacePrefix

String

The namespace prefix of the Developer Edition organization in which the canvas app was created.

Optional

29.0–31.0

parameters

String

Parameters passed to the canvas app in JSON format. The Optional JSON must be URL-encoded:

29.0–31.0

parameters={'isUpdated'='true';}"

text

String

Text of the feed item

Optional

29.0–31.0

thumbnailUrl

String

The URL to a thumbnail image for the canvas app. Maximum dimensions are 120x120 pixels.

Optional

29.0–31.0

title

String

The title of the link to the canvas app

Optional

29.0–31.0

visibility

String

Who can see the post. Valid values are:

Optional

29.0–31.0

• InternalUsers—If communities is enabled, only members of the default, internal community can see the feed item.

387

Chatter REST API Developer Guide

Parameter Name

Feeds Resources

Type

Description

Required or Optional

Available Version

• 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, group, or direct message, the visibility of the feed item must be AllUsers.

Request parameters for GET or HEAD Parameter Name

Type

Description

Required Available or Version Optional

density

String

The density of the feed. One of these values:

Optional

29.0–31.0

A generated token that indicates the view of feed items Optional in the feed. Page tokens are returned as part of the response body, in one of the URL parameters, such as nextPageURL, for example:

23.0–31.0

• AllUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations. • FewerUpdates—Displays all updates from people and records the user follows and groups the user is a member of. Also displays custom recommendations, but hides some system-generated updates from records. The default value is AllUpdates. page

String

"nextPageUrl": "/services/data/v41.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-items ?page=2011-03-30T17:34:50Z, 0D5D0000000DSv4KAG"

388

Chatter REST API Developer Guide

Feeds Resources

Parameter Name

Type

Description

Required Available or Version Optional

pageSize

Integer

Specifies the number of items per page. Valid values Optional are from 1 through 100. If you don't specify a size, the default is 25.

23.0–31.0

q

String

One or more keywords to search for in the body and comments of feed items in this feed.

Optional

28.0–31.0

Maximum number of comments to include per feed Optional item. The default value is 3. The maximum value is 25.

29.0–31.0

Specifies the order of feed items in the feed.

23.0–31.0

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

String

Optional

• CreatedDateAsc—Sorts by oldest creation date. This sort order is available only for DirectMessageModeration, Moderation, and PendingReview feeds. • CreatedDateDesc—Sorts by most recent creation date. • LastModifiedDateDesc—Sorts by most recent activity. • MostViewed—Sorts by most viewed content. This sort order is available only for Home feeds when the ConnectApi.FeedFilter is UnansweredQuestions. • Relevance—Sorts by most relevant content. This sort order is available only for Company, Home, and Topics feeds. The default value is CreatedDateDesc.

Response body for GET Feed Item Page Response body for POST Feed Item

User-Profile 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.

389

Chatter REST API Developer Guide

Feeds Resources

Resource /chatter/feeds/user-profile/me/feed-items/flat

or /chatter/feeds/user-profile/userId/feed-items/flat

Available since version 25.0–26.0 Requires Chatter Yes HTTP methods GET or HEAD Request parameters Parameter Name

Type

Description

numFeedItems

Integer

Specifies the number of feed items returned. Valid values are from 0 through 100. Default value is 25. Because feed items can 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.

recentCommentCount

Integer

Specifies the number of recent comments returned. Valid values are from 0 through 25. Default value is 3.

sort

String. One of the following:

Sorts the returned feed either by created date in ascending order, or by last modified date, also in ascending order. The default is LastModifiedDateDesc

• CreatedDateDesc • LastModifiedDateDesc

Response body Flat Feed SEE ALSO: Feeds and Feed Elements Get Another User’s Feed

390

Chatter REST API Developer Guide

Files Connect Repository Resources

Files Connect Repository Resources A Files Connect repository is an external content repository that’s connected to Salesforce. Use these resources to get a list of repositories, to get information about a repository or a repository file, and to get the content of a repository file. Also use these resources to get information about the files and folders in a repository folder. Use these resources to get a repository’s directory entries, permissions, and permission types. Also use these resources to update a repository’s permissions. Available resources: Resource

Description

/connect/content-hub/repositories

Get a list of Files Connect repositories.

/connect/content-hub/repositories/repositoryId Get information about a Files Connect repository. /connect/content-hub/repositories/repositoryId Get the user and group directory entries of a repository. /directory-entries /connect/content-hub/repositories/repositoryId Get information about or update a Files Connect repository file. /files/repositoryFileId /connect/content-hub/repositories/repositoryId Get the content of the repository file from the external system. The content is streamed as the body of the response. /files/repositoryFileId/content /connect/content-hub/repositories/repositoryId Get information about a repository file's supported previews. /files/repositoryFileId/previews /connect/content-hub/repositories/repositoryId Get a repository file preview or a specific page in a preview. /files/repositoryFileId/previews/formatType /connect/content-hub/repositories/repositoryId Get information about a repository folder. /folders/repositoryFolderId /connect/content-hub/repositories/repositoryId Returns item types that are allowed to be created in the repository /folders/repositoryFolderId/allowed-item-types folder. /connect/content-hub/repositories/repositoryId Get information about the files and folders in a repository folder. Create a file in a repository folder. /folders/repositoryFolderId/items /connect/content-hub/repositories/repositoryId Returns information about an item type associated with a repository. /item-types /connect/content-hub/repositories/repositoryId Get or update the permissions of a repository file. /items/repositoryItemId/permissions /connect/content-hub/repositories/repositoryId Get the permission types of a repository file. /items/repositoryItemId/permissions/types /connect/content-hub/items/repositoryItemId Get Files Connect repository information for a repository file. /repository

Use these files resources to work with references to repository files:

391

Chatter REST API Developer Guide

Files Connect Repository Resources

Resource

Description

/connect/files/fileId

Get information about or update the version of an existing reference.

/connect/files/fileId/content

Get the content of the reference. The content is streamed as the body of the response.

/connect/files/users/me

Create a reference.

Files Connect Repository List Get a list of Files Connect repositories. Resource /connect/content-hub/repositories /connect/communities/communityId/content-hub/repositories

Available version 32.0 The communities resource is available in version 35.0 and later. Requires Chatter No HTTP methods GET Request parameters for GET Parameter Name

Type

Description

Required or Optional

Available Version

canBrowseOnly Boolean

Retrieves only repositories that support browsing.

Optional

32.0

canSearchOnly Boolean

Retrieves only repositories that support searching.

Optional

32.0

page

Integer

An integer specifying a page of items. The Optional default value is 0, which returns the first page.

32.0

pageSize

Integer

Specifies the number of items per page. Optional Valid values are between 1 and 100. If you pass in null, the default is 25.

32.0

Response body for GET Files Connect Repository Collection

392

Chatter REST API Developer Guide

Files Connect Repository Resources

Files Connect Repository Get information about a Files Connect repository. Resource /connect/content-hub/repositories/repositoryId /connect/communities/communityId/content-hub/repositories/repositoryId

Available version 32.0 The communities resource is available in version 35.0 and later. Requires Chatter No HTTP methods GET, HEAD Response body Files Connect Repository

Files Connect Repository Directory Entries Get the user and group directory entries of a repository. Resource /connect/content-hub/repositories/repositoryId/directory-entries /connect/communities/communityId/content-hub/repositories/repositoryId/directory-entries

Available version 35.0 Requires Chatter No HTTP methods GET, HEAD Response body for GET Repository Directory Entry Collection

Files Connect Repository File Get information about or update a Files Connect repository file. Resource /connect/content-hub/repositories/repositoryId/files/repositoryFileId /connect/communities/communityId/content-hub/repositories/repositoryId/files/repositoryFileId

Available version 32.0

393

Chatter REST API Developer Guide

Files Connect Repository Resources

The communities resource is available in version 35.0 and later. Requires Chatter No HTTP methods GET, HEAD, PATCH PATCH is supported in version 35.0 and later. Request parameters for GET Name

Type

includeExternal Boolean FilePermissions Info

Description

Required or Optional

Available Version

Specifies whether to include permission information, such as whether the file is shared and what are the available permission types.

Optional

36.0

Managing external file permissions is supported for Google Drive, SharePoint Online, and OneDrive for Business.

Request body for PATCH Root XML tag

JSON example { "itemTypeId" : "file", "fields" : [ { "name" : "name", "value" : "Content Hub Simple Create Specs" }, { "name" : "description", "value" : "Document explaining the various connect api endpoints required for simple create" }] }

Properties Name

Type

Description

Required or Optional

fields

Files Connect Field List of fields for the item to be created. Value Input[]

394

Available Version

Required to create 35.0 a SharePoint file in a repository because the file

Chatter REST API Developer Guide

Name

Files Connect Repository Resources

Type

Description

Required or Optional

Available Version

name is required; otherwise optional itemTypeId

String

ID of the item type.

Required to create 35.0 a file in a repository

Response body for GET and PATCH Repository File Detail

Files Connect Repository File Content Get the content of the repository file from the external system. The content is streamed as the body of the response. Resource /connect/content-hub/repositories/repositoryId/files/repositoryFileId/content /connect/communities/communityId/content-hub/repositories/repositoryId/files/repositoryFileId/content

Available version 32.0 The communities resource is available in version 35.0 and later. Requires Chatter No HTTP methods GET, HEAD Response body Binary stream of the file content.

Files Connect Repository File Previews Get information about a repository file's supported previews. File previews are supported only for Google Drive. Resource /connect/content-hub/repositories/repositoryId/files/repositoryFileId/previews /connect/communities/communityId/content-hub/repositories/repositoryId/files/repositoryFileId/previews

Available version 36.0 Requires Chatter No HTTP methods GET, HEAD

395

Chatter REST API Developer Guide

Files Connect Repository Resources

Response body for GET File Preview Collection

Files Connect Repository File Preview Get a repository file preview or a specific page in a preview. File previews are supported only for Google Drive. Resource /connect/content-hub/repositories/repositoryId/files/repositoryFileId/previews/formatType /connect/communities/communityId/content-hub/repositories/repositoryId/files/repositoryFileId/previews/formatType

Supported values for previewFormat: • pdf—Preview format is PDF. PDF previews are available for files of type DOC, DOCX, PPT, PPTX, TEXT, XLS, and XLSX. If you need a PDF preview for files of type PDF, call the download version using the File Content resource. • svg—Preview format is SVG. SVG files are generated on demand. Alternatively, you can generate an SVG preview by making a PATCH request to /connect/files/fileId/previews. • thumbnail—Preview format is 240 x 180 PNG. • big-thumbnail—Preview format is 720 x 480 PNG. • tiny-thumbnail—Preview format is 120 x 90 PNG. Available version 36.0 Requires Chatter No HTTP methods GET, HEAD Request parameters for GET Parameter Name

Type

Description

Required or Optional

Available Version

endPageNumber Integer

The ending page number in the range of Optional file preview URLs.

36.0

startPageNumber Integer

The starting page number in the range of Optional file preview URLs.

36.0

Response body for GET File Preview

396

Chatter REST API Developer Guide

Files Connect Repository Resources

Files Connect Repository Folder Get information about a repository folder. Resource /connect/content-hub/repositories/repositoryId/folders/repositoryFolderId /connect/communities/communityId/content-hub/repositories/repositoryId/folders/repositoryFolderId

Available version 38.0 Requires Chatter No HTTP methods GET, HEAD Response body for GET Repository Folder Detail

Files Connect Repository Folder Allowed Item Types Returns item types that are allowed to be created in the repository folder. To get information about a specific item type, make a GET request to /connect/content-hub/repositories/repositoryId/item-types/repositoryItemTypeId.

Resource /connect/content-hub/repositories/repositoryId/folders/repositoryFolderId/allowed-item-types /connect/communities/communityId/content-hub/repositories/repositoryId/folders/repositoryFolderId/allowed-item-types

Available version 35.0 Requires Chatter No HTTP methods GET, HEAD Request parameters for GET Parameter Name

Type

Description

Required or Optional

Available Version

filter

String

Specifies the item types. Values are:

Optional

35.0

• Any—Includes files and folders. • FilesOnly—Includes files only. • FoldersOnly—Includes folders only. In version 35.0, specify FilesOnly.

397

Chatter REST API Developer Guide

Files Connect Repository Resources

Response body for GET Files Connect Allowed Item Type Collection

Files Connect Repository Folder Items Get information about the files and folders in a repository folder. Create a file in a repository folder. To upload a file, send it in a multipart/form-data request. You can include metadata for the file in the multipart/form-data request as a JSON or XML request body. For information about how to create the multipart/form-data message, see Uploading Binary Files. Resource /connect/content-hub/repositories/repositoryId/folders/repositoryFolderId/items /connect/communities/communityId/content-hub/repositories/repositoryId/folders/repositoryFolderId/items

Available version 32.0 The communities resource is available in version 35.0 and later. Requires Chatter No HTTP methods GET, HEAD, POST POST is supported in version 35.0 and later. Request parameters for GET Parameter Name

Type

Description

Required or Optional

Available Version

page

Integer

An integer specifying a page of items. The Optional default value is 0, which returns the first page.

32.0

pageSize

Integer

Specifies the number of items per page. Optional Valid values are between 1 and 100. If you pass in null, the default is 25.

32.0

Response body for GET Repository Folder Items Collection Request body for POST Uploads to repositories are limited to 75 MB. Before you create an item in a repository folder, check to see which item types you’re allowed to create. Make a GET request to /connect/content-hub/repositories/repositoryId/folders/repositoryFolderId/allowed-item-types.

Root XML tag

398

Chatter REST API Developer Guide

Files Connect Repository Resources

JSON example { "itemTypeId" : "file", "fields" : [ { "name" : "name", "value" : "Content Hub Simple Create Specs" }, { "name" : "description", "value" : "Document explaining the various connect api endpoints required for simple create" }] }

Properties Name

Type

Description

Required or Optional

fields

Files Connect Field List of fields for the item to be created. Value Input[]

Required to create 35.0 a SharePoint file in a repository because the file name is required; otherwise optional

itemTypeId

String

Required to create 35.0 a file in a repository

ID of the item type.

Available Version

Response body for POST Repository Folder Item Example POST request This example creates a file and uploads it to an external repository. The example shows the body parts in a multipart/form-data request. The first body part is a Files Connect Item Input request body. The second is the content of the file. For more information, see Uploading Binary Files. POST /services/data/v41.0/connect/content-hub/repositories/0XCxx000000002CGAQ/ folders/folder:0Bz0nXuFg43SiflFNdFNIaUJrY2hQaHVIVHMxYVpHd2ZHeXphTW83TElzcE84RUJ2Q3Q4Rm8/items Authorization: OAuth 00DD0000000Jhd2!AQIAQC.lh4qTQcBhOPm4TZom5IaOOZLVPVK4wI_rPYJvmE8r2VW8XA. OZ7S29JEM_7Ctq1lst2dzoV.owisJc0KacUbDxyae User-Agent: Jakarta Commons-HttpClient/3.0.1 Host: instance_name Content-Length: 489 Content-Type: multipart/form-data; boundary=a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq Accept: application/json --a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq Content-Type: application/json

399

Chatter REST API Developer Guide

Files Connect Repository Resources

Content-Disposition: form-data; name="json" { "itemTypeId" : "file", "fields" : [ { "name" : "name", "value" : "Items Sharepoint 012.png" }, { "name" : "description", "value" : "This is a test file" }] } --a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq Content-Disposition: form-data; name="fileData"; filename="items_Sharepoint_012.png" Content-Type: image/png ...PNG... --a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq--

Files Connect Repository Item Type Returns information about an item type associated with a repository. Resource /connect/content-hub/repositories/repositoryId/item-types/repositoryItemTypeId /connect/communities/communityId/content-hub/repositories/repositoryId/item-types/repositoryItemTypeId

Available version 35.0 Requires Chatter No HTTP methods GET, HEAD Response body for GET Files Connect Item Type Detail

Files Connect Repository Permissions Get or update the permissions of a repository file. Managing external file permissions is supported for Google Drive, SharePoint Online, and OneDrive for Business. Resource /connect/content-hub/repositories/repositoryId/items/repositoryItemId/permissions /connect/communities/communityId/content-hub/repositories/repositoryId/items/repositoryItemId/permissions

400

Chatter REST API Developer Guide

Files Connect Repository Resources

The repositoryItemId must be a file ID. Available version 35.0 Requires Chatter No HTTP methods GET, HEAD, PATCH Response body for GET Files Connect Permission Collection Request body for PATCH Root XML tag

JSON example { "permissionsToApply": [ { "directoryEntryId" : "permissionTypesIds" } ], "permissionsToRemove": [ { "directoryEntryId" : "permissionTypesIds" } ] }

"Anyone", : ["CanView"]

"AnyoneInMyDomain", : ["CanDelete","CanEdit"]

Properties Name

Type

Description

Required or Optional

Available Version

permissions ToApply

Files Connect Permission Input[]

List of permissions to apply to the file.

Required if

35.0

permissions ToRemove isn’t

specified permissions ToRemove

Files Connect Permission Input[]

List of permissions to remove from the file.

Required if permissions ToApply isn’t

specified

Response body for PATCH Files Connect Permission Collection

401

35.0

Chatter REST API Developer Guide

Files Resources

Files Connect Repository Permission Types Get the permission types of a repository file. Managing external file permissions is supported for Google Drive, SharePoint Online, and OneDrive for Business. Resource /connect/content-hub/repositories/repositoryId/items/repositoryItemId/permissions/types /connect/communities/communityId/content-hub/repositories/repositoryId/items/repositoryItemId/permissions/types

The repositoryItemId must be a file ID. Available version 35.0 Requires Chatter No HTTP methods GET, HEAD Response body for GET Repository Permission Type Collection

Files Connect Repository for a File Get Files Connect repository information for a repository file. Resource /connect/content-hub/items/repositoryItemId/repository /connect/communities/communityId/content-hub/items/repositoryItemId/repository

Available version 38.0 Requires Chatter No HTTP methods GET Response body for GET Files Connect Repository

Files Resources Information about files, including content, rendered version, and sharing. Available resources are: Resource

Description

/connect/files/fileId

Get information about a specified file, including references to external files. Upload a new version of an existing file, including

402

Chatter REST API Developer Guide

Resource

Files Resources

Description references to external files. Rename a file, move a file to a different folder, and delete a file.

/connect/files/fileId/asset

Create an asset file.

/connect/file-assets/assetId

Get information about an asset file.

/connect/files/fileId/content

Returns the content of the file, including references to external files. The content is streamed as the body of the response.

/connect/files/fileId/file-shares

Returns information about the objects with which the specified file has been shared. Objects can be users, groups, or records. Can also be used to share the specified file with users.

/connect/files/fileId/file-shares/link

A description of a file shared as a link. Create, access, and delete a file’s share link.

/connect/files/fileId/image

Get information about a file image.

/connect/files/fileId/previews

Get information about a file's supported previews and generate a file preview.

/connect/files/fileId/previews/previewFormat Get a file preview or a specific page in a preview. /connect/files/fileId/rendition

A rendition of the file. A rendition is a binary preview of the file. The format of the binary depends on the format specified in the request.

/connect/files/batch/fileIds

Information about a list of files, specified by file IDs. Get information about a list of files and delete a list of files.

File Information Get information about a specified file, including references to external files. Upload a new version of an existing file, including references to external files. Rename a file, move a file to a different folder, and delete a file. To upload a new version of an existing file, make a POST request. Upload the new version as a binary part in a multipart/form-data request. See Uploading Binary Files on page 11. To upload a new file to the Files home, use /connect/files/users/me. Resource /connect/files/fileId /connect/communities/communityId/files/fileId

Available since version 36.0 In versions 24.0–35.0, use /chatter/files/fileId and /connect/communities/communityId/chatter/files/fileId, which require Chatter.

Requires Chatter No

403

Chatter REST API Developer Guide

Files Resources

HTTP methods GET, POST, PATCH, and DELETE Note: POST, PATCH, and DELETE available since version 26.0. Request body for POST Uploads to SharePoint 2010 are limited to 3 MB. Root XML tag

JSON { "desc" : "Employee Survey Results", "title" : "emp_surv_results" }

Properties Name

Type

content Date ModifiedDate desc

String

includeExternal Boolean FilePermissions Info

Description

Required or Optional

Available Version

File-specific last modified date that can Optional be used to set a client-side modified date.

32.0

Description of the file to be uploaded.

Optional

24.0

Specifies whether to include permission Optional information, such as whether the file is shared and what are the available permission types, for external files.

35.0

This property can be used with POST requests to /connect/files/users/userId,

but not with POST requests to /connect/files/fileId. isInMyFileSync Boolean

true if the file is synced with Salesforce Optional Files Sync; false otherwise.

31.0

isMajorVersion Boolean

true if the file is a major version; false if the file is a minor version.

Optional

31.0

ID of the containing folder.

Optional

31.0

ID of the external file.

Optional

32.0

Major versions can’t be replaced. parentFolderId String repository FileId

String

This property can be used with POST requests to /connect/files/users/userId,

but not with POST requests to /connect/files/fileId.

404

Chatter REST API Developer Guide

Name

Files Resources

Type

Description

Required or Optional

Available Version

Optional

39.0

ID of the external data source.

Required if

32.0

This property can be used with POST requests to

repositoryFileId

If you specify repositoryFileId, don’t specify repositoryFileUri. repository FileUri

String

URI of the external file, such as https://drive.google.com/file/d/ 0B7a_ei8brT1TMy1CQ0o5NmZQNEE/view.

This property can be used with POST requests to /connect/files/users/userId,

but not with POST requests to /connect/files/fileId.

If you specifyrepositoryFileUri, don’t specify repositoryFileId. repositoryId String

is specified. /connect/files/users/userId, Otherwise, Optional. but not with POST requests to /connect/files/fileId. reuseReference Boolean

Specifies whether to reuse the latest version of a reference you own to an external file rather than creating a duplicate reference.

Optional

36.0

Optional

35.0

Optional

41.0

This property can be used with POST requests to /connect/files/users/userId,

but not with POST requests to /connect/files/fileId. sharingOption String

Sharing option of the file. Values are: • Allowed—Resharing of the file is allowed. • Restricted—Resharing of the file is restricted.

sharingPrivacy String

Specifies the sharing privacy of a file. Values are: • None—File is visible to anyone with record access. • PrivateOnRecords—File is private on records.

405

Chatter REST API Developer Guide

Files Resources

Name

Type

Description

Required or Optional

Available Version

title

String

Title of the file.

Optional

24.0

Request parameters for POST Uploads to SharePoint 2010 are limited to 3 MB. Name

Type

Description

Available Version

desc

String

Description of the file to be uploaded.

26.0

isDataSync

Boolean

Indicates whether an automated client generates the request.

31.0

isInMyFileSync

Boolean

true if the file is synced with Salesforce Files Sync; false

31.0

otherwise. isMajorVersion

Boolean

true if the file is a major version; false if the file is a minor

31.0

version. Major versions can’t be replaced. sharingOption

String

Sharing option of the file. Values are:

35.0

• Allowed—Resharing of the file is allowed. • Restricted—Resharing of the file is restricted. sharingPrivacy

String

Specifies the sharing privacy of a file. Values are:

41.0

• None—File is visible to anyone with record access. • PrivateOnRecords—File is private on records. title

String

Title of the file.

26.0

Request parameters for GET Get information about the specified file. Name

Type

Description

Available Version

versionNumber

Integer

Specify an existing version number for the file. If not specified, the latest version is returned.

23.0

Request parameters for PATCH Update the title or sync state of a file or move a file to a different folder. Name

Type

Description

Available Version

desc

String

A new description for the file

32.0

406

Chatter REST API Developer Guide

Files Resources

Name

Type

Description

Available Version

title

String

A new title for the file

26.0

isInMyFileSync

Boolean

true if the file is synced with Salesforce Files Sync; false

31.0

otherwise. parentFolderId

String

ID of the containing folder

31.0

sharingOption

String

Sharing option of the file. Values are:

35.0

• Allowed—Resharing of the file is allowed. • Restricted—Resharing of the file is restricted. sharingPrivacy

String

Specifies the sharing privacy of a file. Values are: • None—File is visible to anyone with record access. • PrivateOnRecords—File is private on records.

Response body for GET, POST, and PATCH File Detail Response body for DELETE Returns a status code of 204. Example This PATCH request updates the title of a file: /connect/files/069D00000001FHF?title=A+New+Title

Asset File Create an asset file. Resource /connect/files/fileId/asset /connect/communities/communityId/files/fileId/asset

Available version 38.0 Requires Chatter No HTTP methods POST Note: POST doesn’t take a request body and doesn’t require request parameters.

407

41.0

Chatter REST API Developer Guide

Files Resources

Request parameters for POST Parameter Name

Type

Description

Required or Optional

Available Version

shareWith

String

An organization ID, community ID, or Optional content workspace ID with which to share the file.

38.0 only

shareWithIds

String[]

A list of organization IDs, community IDs, Optional or content workspace IDs with which to share the file.

39.0

Response body for POST File Detail

Asset File Information Get information about an asset file. Resource /connect/file-assets/assetId /connect/communities/communityId/file-assets/assetId

Available version 38.0 Requires Chatter No HTTP methods GET Response body for GET File Detail

File Content Returns the content of the file, including references to external files. The content is streamed as the body of the response. Resource /connect/files/fileId/content /connect/communities/communityId/files/fileId/content

Available since version 36.0 In versions 24.0–35.0, use /chatter/files/fileId/content and /connect/communities/communityId/chatter/files/fileId/content, which require Chatter.

408

Chatter REST API Developer Guide

Files Resources

Requires Chatter No HTTP methods GET Request parameters for GET Parameter Name

Type

Description

Required or Optional

Available Version

isDataSync

Boolean

Indicates whether an automated client generates the request.

Optional

31.0

Specify an existing version number for the Optional file. If not specified, the latest version is returned.

24.0

versionNumber Integer

Response body Binary stream of the file content.

File Image Get information about a file image. Resource /connect/files/fileId/image /connect/communities/communityId/files/fileId/image

Available version 39.0 Requires Chatter No HTTP methods GET Response body for GET Image File

File Shares Returns information about the objects with which the specified file has been shared. Objects can be users, groups, or records. Can also be used to share the specified file with users. Resource /connect/files/fileId/file-shares /connect/communities/communityId/files/fileId/file-shares

409

Chatter REST API Developer Guide

Files Resources

Available since version 36.0 In versions 24.0–35.0, use /chatter/files/fileId/file-shares and /connect/communities/communityId/chatter/files/fileId/file-shares, which require Chatter.

Requires Chatter No HTTP methods GET, HEAD, POST POST is available in versions 30.0 and later. Request parameters for GET In versions 30.0 and later, the first share returned in a GET request is the organization record share. In communities, the first share returned is the network record share. Name

Type

Description

Required or Optional Available Since

page

Integer

An integer greater than 0 specifying a page of topics. The default value is zero.

Optional

24.0

pageSize

Integer

Specifies the number of items per page. Valid values are from 1 to 100. The default value is 25.

Optional

24.0

Request body for POST Root XML tag

JSON example { "message": "I shared a document with you.", "shares": [ { "id": "005D0000001Az4l", "sharingType": "V" }, { "id": "005D0000001B2ny", "sharingType": "C" } ] }

Properties Name

Type

Description

message

String

Private message body that’s sent to the recipients. If 30.0 Salesforce Communities is enabled, an email is sent instead of a private message.

shares

Share Input[]

Collection of Share Input request bodies

410

Available Version

30.0

Chatter REST API Developer Guide

Files Resources

Request parameters for POST Parameters for sharing a file with users Name

Type

Description

id(1–9)

String

List of up to 9 user IDs to share this file Required with. This list must match the list of sharing types.

30.0

message

String

Private message body that’s sent to the recipients. If Salesforce Communities is enabled, an email is sent instead of a private message.

Optional

30.0

List of sharing types, either C for Required collaborator or V for viewer. This list must match the list of user IDs.

30.0

sharingType(1–9) String

Required or Optional Available Since

Response body for GET and POST File Shares Page Example for POST This example uses request parameters to share a file with two users. POST /connect/files/069D00000001JDU/file-shares? id1=005D0000001LL8O&id2=005D0000001QdEL&sharingType1=C&sharingType2=V

Here is the same example using a request body. POST /connect/files/069D00000001JDU/file-shares { "shares": [ { "id": "005D0000001LL8O", "sharingType": "C" }, { "id": "005D0000001QdEL", "sharingType": "V" } ] }

Files Shares Link A description of a file shared as a link. Create, access, and delete a file’s share link. Resource /connect/files/fileId/file-shares/link /connect/communities/communityId/files/fileId/file-shares/link

Available since version 36.0 In versions 30.0–35.0, use /chatter/files/fileId/file-shares/link and /connect/communities/communityId/chatter/files/fileId/file-shares/link, which require Chatter.

411

Chatter REST API Developer Guide

Files Resources

Requires Chatter No HTTP methods GET, HEAD, PUT, DELETE Response body for GET or PUT File Share Link Response body for DELETE Returns a status code of 204.

File Previews Get information about a file's supported previews and generate a file preview. Resource /connect/files/fileId/previews /connect/communities/communityId/files/fileId/previews

Available version 36.0 In version 35.0, use /chatter/files/fileId/previews and /connect/communities/communityId/chatter/files/fileId/previews, which require Chatter.

Requires Chatter No HTTP methods GET, HEAD, PATCH Request parameters for GET and PATCH Parameter Name

Type

versionNumber Integer

Description

Required or Optional

Available Version

Version number of the file. Default value is latest version.

Optional

40.0

Response body for GET and PATCH File Preview Collection

File Preview Get a file preview or a specific page in a preview. Resource /connect/files/fileId/previews/previewFormat /connect/communities/communityId/files/fileId/previews/previewFormat

Supported values for previewFormat:

412

Chatter REST API Developer Guide

Files Resources

• pdf—Preview format is PDF. PDF previews are available for files of type DOC, DOCX, PPT, PPTX, TEXT, XLS, and XLSX. If you need a PDF preview for files of type PDF, call the download version using the File Content resource. • svg—Preview format is SVG. SVG files are generated on demand. Alternatively, you can generate an SVG preview by making a PATCH request to /connect/files/fileId/previews. • thumbnail—Preview format is 240 x 180 PNG. • big-thumbnail—Preview format is 720 x 480 PNG. • tiny-thumbnail—Preview format is 120 x 90 PNG. Available version 36.0 In version 35.0, use /chatter/files/fileId/previews/previewFormat and /connect/communities/communityId/chatter/files/fileId/previews/previewFormat, which

require Chatter. Requires Chatter No HTTP methods GET, HEAD Request parameters for GET Parameter Name

Type

Description

Required or Optional

Available Version

endPageNumber Integer

The ending page number in the range of Optional file preview URLs.

35.0

startPageNumber Integer

The starting page number in the range of Optional file preview URLs.

35.0

versionNumber Integer

Version number of the file. Default value is latest version.

40.0

Optional

Response body for GET File Preview

File Rendition A rendition of the file. A rendition is a binary preview of the file. The format of the binary depends on the format specified in the request. Note: For shared files, renditions process asynchronously after upload. For private files, renditions process when the first file preview is requested, and aren’t available immediately after the file is uploaded. Resource /connect/files/fileId/rendition /connect/communities/communityId/files/fileId/rendition

413

Chatter REST API Developer Guide

Files Resources

Available since version 36.0 In versions 24.0–35.0, use /chatter/files/fileId/rendition and /connect/communities/communityId/chatter/files/fileId/rendition, which require Chatter.

Requires Chatter No HTTP methods GET Request parameters Name

Type

Description

page

Integer

Specify a rendition of a specific page. The first page is 0. If you don’t specify a specific page, a rendition of the first page is returned. For a PDF file rendition, the rendition is for the entire document. The only valid value is 0: you can’t get the rendition of a single page.

type

String

Specify the type of rendition to be returned. Default value is THUMB120BY90. Valid values are: • FLASH • PDF • THUMB120BY90 • THUMB240BY180 • THUMB720BY480

Response body Binary stream of the rendition.

File Information, Batch Information about a list of files, specified by file IDs. Get information about a list of files and delete a list of files. The number of file IDs you can specify is limited by the length of the URL. In general, you can specify up to 100 file IDs in a comma-separated list. Resource /connect/files/batch/fileIds /connect/communities/communityId/files/batch/fileIds

414

Chatter REST API Developer Guide

Folders Resources

Available since version 36.0 In versions 26.0–35.0, use /chatter/files/batch/fileIds and /connect/communities/communityId/chatter/files/batch/fileIds, which require Chatter.

Requires Chatter No HTTP methods GET, DELETE Response body Batch Result Item

Folders Resources Information about a folder or the contents of a folder. Modify and delete folders, add items to folders, and sync root folders. Available resources: Resource

Description

/connect/folders/folderId

Get information about the specified folder. Move, rename, and delete a folder. Sync the root folder.

/connect/folders/folderId/items

Get information about the contents of a folder. Add a file to a folder and create a folder. Sync the root folder.

Folder Information Get information about the specified folder. Move, rename, and delete a folder. Sync the root folder. Deleting a folder deletes all the folders within that folder and removes all files from the deleted folders so they are no longer synced. Resource /connect/folders/folderId

Note: You can use root as the folderId. Available since version 36.0 In versions 30.0–35.0, use /chatter/folders/folderId, which requires Chatter. Requires Chatter No HTTP methods GET, HEAD, PATCH, DELETE Request body for PATCH Folder Input Request parameters for PATCH Move a folder

415

Chatter REST API Developer Guide

Folders Resources

Parameter

Type

Description

Required or Optional Available Version

isInMy FileSync

Boolean

true if the folder and all folders in this folder are Optional synced with Salesforce Files Sync; false otherwise.

33.0

Setting isInMyFileSync is valid only for the root folder. Once set to true, isInMyFileSync can’t be set to false. parent FolderId

String

The ID of the new parent folder. If null, the folder is Required removed from its current folder. If the specified ID is root, the folder is moved to the root of the user’s folder hierarchy.

30.0

Rename a folder Parameter

Type

Description

Required or Optional Available Version

isInMy FileSync

Boolean

true if the folder and all folders in this folder are Optional synced with Salesforce Files Sync; false otherwise.

33.0

Setting isInMyFileSync is valid only for the root folder. Once set to true, isInMyFileSync can’t be set to false. name

String

The new name for the folder

Required

30.0

Response body for GET and PATCH Folder

Folder Contents Get information about the contents of a folder. Add a file to a folder and create a folder. Sync the root folder. To create a folder, you can use a request body or request parameters in a POST request. To create a file, you must send it as a body part in a multipart/form-data POST request. You can send the description and title information in a JSON or XML rich input body in a part of the multipart/form-data request. Alternately, you can send the description, title, and type in request parameters. See Uploading Binary Files on page 11. To upload a file to the Files home, use /connect/files/users/me. Resource /connect/folders/folderId/items

Note: You can use root as the folderId. Available since version 36.0 In versions 30.0–35.0, use /chatter/folders/folderId/items, which requires Chatter.

416

Chatter REST API Developer Guide

Folders Resources

Requires Chatter No HTTP methods GET and POST Request parameters for GET Parameter

Type

Description

Required or Optional Available Version

filter

String

Specifies a filter for items within a folder. The value Optional IsInMyFileSync filters out the items that aren’t synced in a folder.

33.0

page

Integer

An integer specifying a page of items. The default value Optional is 0, which returns the first page.

30.0

pageSize

Integer

Specifies the number of items per page. Valid values Optional are from 1 through 100. If you don't specify a size, the default is 25.

30.0

Response body for GET Folder Item Page Request body for POST Folder Item Input Request parameters for POST Add a file to a folder Parameter

Type

Description

Required or Optional Available Version

desc

String

The description of the file

Optional

30.0

isInMy FileSync

Boolean

true if the folder and all folders in this folder are Optional synced with Salesforce Files Sync; false otherwise.

33.0

Setting isInMyFileSync is valid only for the root folder. Once set to true, isInMyFileSync can’t be set to false. sharing Option

String

Sharing option of the file. Values are:

Optional

35.0

Optional

41.0

• Allowed—Resharing of the file is allowed. • Restricted—Resharing of the file is restricted.

sharing Privacy

String

Specifies the sharing privacy of a file. Values are: • None—File is visible to anyone with record access. • PrivateOnRecords—File is private on records.

417

Chatter REST API Developer Guide

Forecasts Resources

Parameter

Type

Description

Required or Optional Available Version

title

String

The title of the file

Optional

30.0

type

String

The item type. To add a file to a folder, the value must Required be File.

30.0

Type

Description

Required or Optional Available Version

The path to the folder

Required

30.0

true if the folder and all folders in this folder are Optional synced with Salesforce Files Sync; false otherwise.

33.0

Create a folder Parameter

folderPath String isInMy FileSync

Boolean

Setting isInMyFileSync is valid only for the root folder. Once set to true, isInMyFileSync can’t be set to false. type

String

The item type. To create a folder, the value must be Folder.

Required

30.0

Response body for POST Folder Item Example for adding a file to a folder { "file" : { "description" : "Yearly Report for Universal Containers Box Division", "title" : "Yearly.txt" }, "type" : "File" }

Example for creating a folder { "folder" : { "path" : "my_documents/my_folder" }, "type" : "Folder" }

Forecasts Resources Get information about forecast users, managers, and the forecast hierarchy.

418

Chatter REST API Developer Guide

Forecasts Resources

Available resources are: Resource

Description

/connect/forecasting/jump-to-user

For Collaborative Forecasts, returns a list of users whose forecasts the context user has access to view. The method compares a search string to available users’ first and last names. This functionality is analagous to using Jump To on the Forecasts page.

/connect/forecasting/manager-ancestors

Get the manager at the top of the forecast hierarchy.

/connect/forecasting/manager-ancestors/forecastingManagerUserRoleId Get the list of managers between the context user and a specified

user. /connect/forecasting/user-access

Indicates whether the context user has access to view a specified user’s forecast.

IN THIS SECTION: Forecasting Jump-To-User For Collaborative Forecasts, returns a list of users whose forecasts the context user has access to view. The method compares a search string to available users’ first and last names. This functionality is analagous to using Jump To on the Forecasts page. Forecasting Manager Ancestors Query Get the manager at the top of the forecast hierarchy. Forecasting Manager Ancestors, Specific User Get the list of managers between the context user and a specified user. Forecasting User Access Indicates whether the context user has access to view a specified user’s forecast.

Forecasting Jump-To-User For Collaborative Forecasts, returns a list of users whose forecasts the context user has access to view. The method compares a search string to available users’ first and last names. This functionality is analagous to using Jump To on the Forecasts page. Requires Collaborative Forecasts. Forecast managers and users with the View All Forecasts permission can access other user’s forecasts. Resource /connect/forecasting/jump-to-user

Available version 36.0 Requires Chatter No HTTP methods GET

419

Chatter REST API Developer Guide

Forecasts Resources

Request parameters for GET Parameter Name

Type

nameStartsWith String

Description

Required or Optional

The first few letters of the user’s name. The Required system compares the string to both the first name and last name of all users the context user has access to and returns any entries that match either.

Available Version 36.0

Response body for GET Forecasting User Collection

Forecasting Manager Ancestors Query Get the manager at the top of the forecast hierarchy. Requires Collaborative Forecasts. If the context user is a forecast manager with the View All Forecasts or View All Data permission, this resource returns the manager at the top of the forecast hierarchy. If the hierarchy does not have a forecast manager assigned to every role with direct reports, this resource returns all managers who do not have a forecast manager above them. For all other users, this resource returns nothing. Resource /connect/forecasting/manager-ancestors

Available version 36.0 Requires Chatter No HTTP methods GET Response body for GET Forecasting Manager Ancestors

Forecasting Manager Ancestors, Specific User Get the list of managers between the context user and a specified user. Requires Collaborative Forecasts. The list of managers returned depends on the permissions of the context user. Context User’s Permissions

List of Managers Returned

Forecast user

Returns the list of managers between the specified user role and the context user.

Any user with View All Forecasts or View All Data

Returns the list of managers between the specified user role and the top of the forecast hierarchy.

420

Chatter REST API Developer Guide

Groups Resources

Resource /connect/forecasting/manager-ancestors/forecastingManagerUserRoleId

Available version 36.0 Requires Chatter No HTTP methods GET Response body for GET Forecasting Manager Ancestors

Forecasting User Access Indicates whether the context user has access to view a specified user’s forecast. Requires Collaborative Forecasts. Resource /connect/forecasting/user-access

Available version 36.0 Requires Chatter No HTTP methods GET Request parameters for GET Parameter Name

Type

Description

Required or Optional

Available Version

user

String

The ID of the user whose forecast the context user is trying to view.

Required

36.0

Response body for GET Forecasting User Access Collection

Groups Resources Information about groups, such as the group's members, photo, and the groups in the organization. Create and delete a group, add members to a group, and change the group photo. Note: The groups resource is not a feed. To view the feed for a group, or post to it, use the record feed resource with a groupId. Available resources:

421

Chatter REST API Developer Guide

Resource

Groups Resources

Description

/chatter/group-membership-requests/requestId Update the status of a request by a user to join a private group or

get information about a request to join a private group. /chatter/group-memberships/membershipId

Access information about a member of a group, remove a member from a group, and update a group member’s role.

/chatter/group-memberships/batch/membershipIds Access information about a list of group members. /chatter/group-records/groupRecordId

Get information about a group record or remove the association between a record and a group.

/chatter/groups/

A list of all the groups in the organization. Get information about groups or create a group.

/chatter/groups/batch/group_list

Returns information about more than one group at the same time.

/chatter/groups/groupId

Information about a group.

/chatter/groups/groupId/announcements

Information about the announcements posted to the specified group. Get information or post an announcement to a group.

/chatter/groups/groupId/banner-photo

Get, create, or delete the banner photo for a group.

/chatter/groups/groupID/files

Returns information about the files posted to the specified group.

/chatter/groups/groupId/members

Members of a specified group. Get the members and add a member to a group. To add a member, the context user must be the group owner or moderator.

/chatter/groups/groupId/members/requests

Request membership in a private group or get the status of requests to a join a private group.

/chatter/groups/groupId/my-settings

Information about the context user’s Chatter settings for the specified group.

/chatter/groups/groupId/photo

The photo for the specified group. Get, post, crop, and delete the photo.

/chatter/groups/groupId/records

Get the list of records associated with a group. Associate a record with a group.

/chatter/groups/groupId/topics

Returns up to five topics most recently used in the specified group.

/chatter/groups/group/groupId/invite

Invite internal and external users to join a group.

SEE ALSO: Groups Feed Resources

List of Groups A list of all the groups in the organization. Get information about groups or create a group.

422

Chatter REST API Developer Guide

Groups Resources

Resource /chatter/groups/ /connect/communities/communityId/chatter/groups/

Available version 23.0 POST available in 29.0 Requires Chatter Yes HTTP methods GET, HEAD, POST Request parameters for GET Parameter Name

Type

Description

Available

archiveStatus

String

Returns the list of groups filtered by the archive status you specify:

29.0

• All—All groups, including groups that are archived and groups that are not archived. • Archived—Only groups that are archived. • NotArchived—Only groups that are not archived. The default value is NotArchived. page

Integer

An integer specifying a page of items. The default value is 0, which returns the first page.

23.0

pageSize

Integer

Specifies the number of items per page. Valid values are from 1 through 250. The default value is 25.

23.0

q

String

Specifies the string to search. For more 23.0 information about wildcards, see Wildcards.

Request body for POST Root XML Tag

JSON { "announcement" : "0D5D0000000K4XT", "canHaveChatterGuests" : "true",

423

Chatter REST API Developer Guide

Groups Resources

"description" : "This group is building a powerful API.", "information" : { "text" : "Read this section before you post to the group.", "title" : "Information" }, "isArchived" : "false", "isAutoArchiveDisabled" : "false", "name" : "Chatter API", "owner" : "00590000000DmPw", "visibility" : "PublicAccess" }

Properties Name

Type

Description

Available Version

announcement

String

An announcement ID.

31.0

An announcement displays in a designated location in the Salesforce UI until 11:59 p.m. on its expiration date, unless it’s deleted or replaced by another announcement. canHaveChatterGuests Boolean

true if this group allows Chatter customers, false otherwise. After this property is set to true, it cannot be set to false.

29.0

29.0

description

String

The “Description” section of the group

information

Group Information Input

The “Information” section of the groupIf 28.0 the group is private, the “Information” section is visible only to members. The “Description” section is visible to everyone.

isArchived

Boolean

true if the group is archived, false otherwise. Defaults to false.

29.0

isAutoArchiveDisabled Boolean

true if automatic archiving is turned off 29.0 for the group, false otherwise. Defaults to false.

isBroadcast

Boolean

true if only group owners and managers 36.0 can create posts in the group, false otherwise. Defaults to false.

name

String

The name of the group

29.0

owner

String

The ID of the group owner. This property is available for PATCH requests only.

29.0

424

Chatter REST API Developer Guide

Groups Resources

Name

Type

Description

Available Version

visibility

String

Specifies the group visibility type. One of the following values:

29.0

• PrivateAccess—Only members of the group can see posts to this group. • PublicAccess—All users within the community can see posts to this group. • Unlisted—Reserved for future use.

Request parameters for POST Parameter Name

Type

Description

Required or Optional

Available

Optional

29.0

The “Description” section of the group

Optional

29.0

informationText String

The text in the “Information” section of the group

Optional

29.0

informationTitle String

The title of the “Information” section of the group

Optional

29.0

canHaveChatterGuests Boolean true if this group allows Chatter customers, false otherwise. After this property is set to true, it cannot be set to false. description

String

name

String

The name of the group

Required

29.0

visibility

String

Specifies the group visibility type. One of the following:

Required

29.0

• PrivateAccess—Only members of the group can see posts to this group. • PublicAccess—All users within the community can see posts to this group. • Unlisted—Reserved for future use.

Response body for GET Group Page Response body for POST Group Detail Example for creating a public group using the request body { "name" : "Chatter API", "visibility" : "PublicAccess" }

425

Chatter REST API Developer Guide

Groups Resources

Example for creating a public group using parameters /services/data/v41.0/chatter/groups?name=Chatter+API&visibility=PublicAccess

SEE ALSO: Create a Group

Group Information Information about a group. Resource /chatter/groups/groupId /connect/communities/communityId/chatter/groups/groupId

Available version 23.0 Requires Chatter Yes HTTP methods GET, DELETE, HEAD, PATCH PATCH is supported in version 28.0 later. DELETE is supported in version 29.0 and later. Request body for PATCH Group Input Root XML Tag

JSON { "announcement" : "0D5D0000000K4XT", "canHaveChatterGuests" : "true", "description" : "This group is building a powerful API.", "information" : { "text" : "Read this section before you post to the group.", "title" : "Information" }, "isArchived" : "false", "isAutoArchiveDisabled" : "false", "name" : "Chatter API", "owner" : "00590000000DmPw", "visibility" : "PublicAccess" }

426

Chatter REST API Developer Guide

Groups Resources

Properties Name

Type

Description

Available Version

announcement

String

An announcement ID.

31.0

An announcement displays in a designated location in the Salesforce UI until 11:59 p.m. on its expiration date, unless it’s deleted or replaced by another announcement. canHaveChatterGuests Boolean

true if this group allows Chatter customers, false otherwise. After this property is set to true, it cannot be set to false.

29.0

29.0

description

String

The “Description” section of the group

information

Group Information Input

The “Information” section of the groupIf 28.0 the group is private, the “Information” section is visible only to members. The “Description” section is visible to everyone.

isArchived

Boolean

true if the group is archived, false otherwise. Defaults to false.

29.0

isAutoArchiveDisabled Boolean

true if automatic archiving is turned off 29.0 for the group, false otherwise. Defaults to false.

isBroadcast

Boolean

true if only group owners and managers 36.0 can create posts in the group, false otherwise. Defaults to false.

name

String

The name of the group

29.0

owner

String

The ID of the group owner. This property is available for PATCH requests only.

29.0

visibility

String

Specifies the group visibility type. One of the following values:

29.0

• PrivateAccess—Only members of the group can see posts to this group. • PublicAccess—All users within the community can see posts to this group. • Unlisted—Reserved for future use.

427

Chatter REST API Developer Guide

Groups Resources

Group Information Input JSON { "text" : "Post questions about the API.", "title" : "API Questions" }

Properties Name

Type

Description

Available Version

text

String

The text in the “Information” section of the 28.0 group. HTML is not supported. The maximum length is 4000 characters (bytes).

title

String

The title in the “Information” section of the 28.0 group. The maximum length is 240 characters (bytes).

Request parameters for PATCH Property

Type Description

Required or Available Optional Version

announcement

String The ID of a feed item to use as an announcement.

Optional

31.0

canHave ChatterGuests

Boolean true if this group allows Chatter customers, false otherwise. Optional After this property is set to true, it cannot be set to false.

29.0

description

String The “Description” section of the group.

Optional

29.0

Optional

28.0

Optional

28.0

An announcement displays in a designated location in the Salesforce UI until 11:59 p.m. on its expiration date, unless it’s deleted or replaced by another announcement.

informationText String The “Information” section of the group. If the group is private,

the “Information” section is visible only to members. The “Description” section is visible to everyone. informationTitle String The title of the “Information” section of the group. isArchived

String true if the group is archived, false otherwise. Defaults to false.

Optional

29.0

isAutoArchive Disabled

Boolean true if automatic archiving is turned off for the group, false Optional otherwise. Defaults to false.

29.0

isBroadcast

Boolean true if only group owners and managers can create posts in Optional the group, false otherwise. Defaults to false.

36.0

name

String The name of the group.

29.0

Optional

428

Chatter REST API Developer Guide

Groups Resources

Property

Type Description

Required or Available Optional Version

owner

String The ID of the group owner. This property is available for PATCH Optional requests only.

29.0

visibility

String Specifies the group visibility type. One of the following values:

29.0

Optional

• PrivateAccess—Only members of the group can see posts to this group. • PublicAccess—All users within the community can see posts to this group. • Unlisted—Reserved for future use.

Response body for GET and PATCH Group Detail Example for PATCH This request body updates the text and title of the “Information” section of a group: { "information" : { "text" : "Post questions about the API to this group. If you have the answer to a question, please post it. This is a private R&D group.", "title" : "API Questions Group" } }

Here is the same example using request parameters: https://instance_name/services/data/41.0/chatter/groups/groupId ?informationText=Post+questions+about+the+API+to+this+group.+If+you+have+the+answer+to+a+question%2C%20 +please+post+it.+This+is+a+private+R%26amp%3Bamp%3BD+group.&informationTitle=API+Questions+Group

The response is a Group Detail response body.

Batch Group Information Returns information about more than one group at the same time. Resource /chatter/groups/batch/group_list /connect/communities/communityId/chatter/groups/batch/group_list

Where group_list is a comma separated list of up to 500 group IDs. Available since version 23.0 Requires Chatter Yes

429

Chatter REST API Developer Guide

Groups Resources

HTTP methods GET or HEAD Response body Batch Results

Group Announcements Information about the announcements posted to the specified group. Get information or post an announcement to a group. Use an announcement to highlight information. Users can discuss, like, and post comments on announcements. Deleting the feed post deletes the announcement. To get information about, update, or delete an announcement, use the Announcements Resources. Resource /chatter/groups/groupID/announcements /connect/communities/communityId/chatter/groups/groupID/announcements

Available since version 31.0 Requires Chatter Yes HTTP methods GET, POST, HEAD Request parameters for GET Parameter Name

Type

Description

Available Since

page

Integer

An integer specifying a page of 31.0 items. The default value is 0, which returns the first page.

pageSize

Integer

Specifies the number of items 31.0 per page. Valid values are from 1 through 100. If you don't specify a size, the default is 25.

Request body for POST Root XML tag

JSON example for creating an announcement {

"body": { "messageSegments": [ { "text": "Please install the updates for all iOS devices.", "type": "Text"

430

Chatter REST API Developer Guide

Groups Resources

} ] }, "parentId": "0F9B0000000004S", "expirationDate": "2016-02-22T00:00:00.000Z" }

JSON example for creating an announcement using an existing feed item { "feedItemId": "0D5D0000000DaZBKA0", "expirationDate": "2016-02-22T00:00:00.000Z" }

Properties Name

Type

Description

Required or Optional

Available Version

body

Message Body Input

Text of the announcement.

Required for creating an announcement if

31.0

feedItemId

isn’t specified Don’t specify for updating an announcement. expirationDate Date

feedItemId

String

The Salesforce UI displays an announcement until 11:59 p.m. on this date unless another announcement is posted first. The Salesforce UI ignores the time value in the expirationDate. However, you can use the time value to create your own display logic in your own UI.

Required for creating an announcement

ID of an AdvancedTextPost feed item that is the body of the announcement.

Required for creating an announcement if body isn’t specified

31.0

Optional for updating an announcement

36.0

Don’t specify for updating an announcement. isArchived

Boolean

Specifies whether the announcement is Optional archived.

36.0

parentId

String

ID of the parent entity for the Required for announcement, that is, a group ID when creating an the announcement appears in a group. announcement if

36.0

431

Chatter REST API Developer Guide

Name

Groups Resources

Type

Description

Required or Optional

Available Version

feedItemId

isn’t specified Don’t specify for updating an announcement. sendEmails

Boolean

Specifies whether the announcement is sent as an email to all group members regardless of their email setting for the group. If Chatter emails aren’t enabled for the organization, announcement emails aren’t sent. Default value is false.

Optional for creating an announcement

36.0

Don’t specify for updating an announcement

Request parameters for POST Parameter Name

Type

Description

Available Since

expirationDate

Date

The Salesforce UI displays an 31.0 announcement until 11:59 p.m. on this date unless another announcement is posted first. The Salesforce UI ignores the time value in the expirationDate. However, you can use the time value to create your own display logic in your own UI.

Response body for GET Announcement Page Response body for POST Announcement

Group Banner Photo Get, create, or delete the banner photo for a group. To use an image from the Files page as a group banner photo, pass the file ID in the fileId property of the request body or in the fileId request parameter. Images uploaded on the Group page don’t have a file ID and can’t be used as the fileId. To upload a binary file as the group banner photo, send it in a multipart/form-data message. For information about how to create the multipart/form-data message, see Uploading Binary Files.

432

Chatter REST API Developer Guide

Groups Resources

Resource /chatter/groups/groupId/banner-photo /connect/communities/communityId/chatter/groups/groupId/banner-photo

Available version 36.0 Requires Chatter Yes HTTP methods GET, HEAD, DELETE, POST Group owners and managers and users with the Manage All Data permission can DELETE and POST group banner photos. Request body for POST Root XML tag

JSON example {

"cropHeight" : "120", "cropWidth" : "240", "fileId" : "069D00000001IOh"

}

Properties Name

Type

Description

Required or Optional

Available Version

cropHeight

Integer

Height of the crop rectangle in pixels.

Optional

36.0

cropWidth

Integer

Width of the crop rectangle in pixels.

Optional

36.0

cropX

Integer

X position of the crop rectangle from the Optional left edge of the image in pixels. Top left is position (0,0).

36.0

cropY

Integer

Y position of the crop rectangle from the Optional top edge of the image in pixels. Top left is position (0,0).

36.0

fileId

String

ID of an existing file. The key prefix must Required to use an 36.0 be 069, and the file size must be less than existing file 8 MB. Note: Images uploaded on the Group page and on the User page don’t have file IDs and therefore can’t be used.

versionNumber Integer

Version number of an existing file. If not Optional provided, the latest version is used.

433

36.0

Chatter REST API Developer Guide

Groups Resources

Request parameters for POST Name

Type

Description

Required or Optional

Available Version

cropHeight

Integer

The length of an edge in pixels of the crop Optional rectangle.

36.0

cropWidth

Integer

The width of an edge in pixels of the crop Optional rectangle.

36.0

cropX

Integer

The position X in pixels from the left edge Optional of the image to start the crop square. Top left is position (0,0).

36.0

cropY

Integer

The position Y in pixels from the top edge Optional of the image to start the crop square. Top left is position (0,0).

36.0

fileId

String

ID of an existing file. The key prefix must Required to use an be 069 and the file size must be less than existing file 8 MB.

36.0

Note: Images uploaded on the Group page and on the User page don’t have file IDs and therefore can’t be used. versionNumber Integer

Version number of an existing file. If not provided, the latest version is used.

Optional

Note: Photos are processed asynchronously and may not be visible right away. Response body for GET and POST Banner Photo Response body for DELETE 204: Successful Delete

Group Files Returns information about the files posted to the specified group. Resource /chatter/groups/groupID/files /connect/communities/communityId/chatter/groups/groupID/files

Available since version 24.0 Requires Chatter Yes

434

36.0

Chatter REST API Developer Guide

Groups Resources

HTTP methods GET or HEAD Request parameters Parameter Name

Type

Description

Available Since

page

Integer

An integer specifying a page of 24.0 items. The default value is 0, which returns the first page.

pageSize

Integer

Specifies the number of items 24.0 per page. Valid values are from 1 through 100. If you don't specify a size, the default is 25.

q

String

A query string to filter the 27.0 results. The string must contain at least two characters, not including wildcards. For information about wildcards, see Wildcards.

Response body File Summary Page

Group Members Members of a specified group. Get the members and add a member to a group. To add a member, the context user must be the group owner or moderator. Resource /chatter/groups/groupId/members /connect/communities/communityId/chatter/groups/groupId/members

Available since version 23.0 Requires Chatter Yes HTTP methods GET, POST Request parameters for GET Parameter Name

Type

Description

page

Integer

An integer specifying a page of 23.0 items. The default value is 0, which returns the first page.

435

Available Version

Chatter REST API Developer Guide

Groups Resources

Parameter Name

Type

Description

Available Version

pageSize

Integer

Specifies the number of items 23.0 per page. Valid values are from 1 through 1000. If you don’t specify a size, the default is 25.

Response body for GET Group Member Page Request body for POST Root XML tag

Properties Name

Type

Description

Available Version

role

String

The role of the member. One 29.0 of these values: • GroupManager • StandardMember

userId

String

The user ID of the member to 23.0 be added to the group.

Request parameter for POST Parameter Name

Type

Description

Available Version

role

String

The role of the member. One of these values:

29.0

• GroupManager • StandardMember userId

String

ID of the user to add to the group.

Response body for POST Group Member Example for adding a member to a group using the request body {"userId": "005D0000001GpHp" }

Example for adding a member to a group using parameters /services/data/v41.0/chatter/groups/0F9D000000006bOKAQ /members?userId=005D0000001GpHp

436

23.0

Chatter REST API Developer Guide

Groups Resources

Note: If the group is private, the response is 403. To request to join the group, send a POST request to the Group Members—Private resource (/chatter/groups/groupId/members/requests). SEE ALSO: Join a Group

Group Members—Private Request membership in a private group or get the status of requests to a join a private group. Note: To request membership in a public group, use the Group Members resource. Resource /chatter/groups/groupId/members/requests /connect/communities/communityId/chatter/groups/groupId/members/requests

Available since version 27.0 Requires Chatter Yes HTTP methods GET, HEAD, and POST Request parameter for GET Parameter Name

Type

Description

Available Since

status

String

Optional. If you include this 27.0 parameter, results are filtered to include those that match the specified status. Valid values: • Accepted • Declined • Pending

Response body for GET or HEAD Group Membership Request Collection Example for getting the requests to join that have been accepted /chatter/groups/0F9D00000000izfKAA/members/requests?status=Accepted

Response body for POST Group Membership Request This table lists HTTP response code descriptions that are unique to this resource. For descriptions of other HTTP response codes, see Status Codes and Error Responses.

437

Chatter REST API Developer Guide

Groups Resources

HTTP Response Code Description 201

One of the following: • Success • User already has a membership request for this group

204

User is already a member of this group.

403

One of the following: • Group is private: INSUFFICIENT_ACCESS_OR_READONLY • User is an external user: INSUFFICIENT_ACCESS

Example for requesting membership in a private group Specify the ID (0F9D00000000lpK) of the group. /chatter/groups/0F9D00000000lpK/members/requests

SEE ALSO: Request to Join a Private Group

Group Membership Requests—Private Update the status of a request by a user to join a private group or get information about a request to join a private group. Resource /chatter/group-membership-requests/requestId /connect/communities/communityId/chatter/group-membership-requests/requestId

Get the requestId by making a POST request to /chatter/groups/groupId/members/requests. Available since version 27.0 Requires Chatter Yes HTTP methods GET, HEAD, and PATCH Request body for PATCH Root XML tag

Properties Name

Type

Description

Available Version

responseMessage

String

Use this property to provide a message to the user if their membership request is declined.

27.0

438

Chatter REST API Developer Guide

Name

Groups Resources

Type

Description

Available Version

The value of this property is used only when the value of the status property is Declined. The maximum length is 756 characters. status

String

Valid values:

27.0

• Accepted • Declined

Request parameters for PATCH Parameter Name

Type

Description

Available Since

responseMessage

String

Use this property to provide a message to the 27.0 user if their membership request is declined. The value of this property is used only when the value of the status property is Declined. The maximum length is 756 characters.

status

String

Valid values:

27.0

• Accepted • Declined

Response body for GET or PATCH Group Membership Request Example for approving a request to join a private group using the request body { "status " : "Accepted" }

Example for approving a request to join a private group using parameters This example updates a request to join a private group from Pending to Accepted. /services/data/v41.0/chatter/group-membership-requests/0I5D000000002fwKAA?status=Accepted

SEE ALSO: Approve or Reject a Request to Join a Private Group

Group Memberships Resources Information about memberships in Chatter groups. Available resources are:

439

Chatter REST API Developer Guide

Groups Resources

Resource

Description

/chatter/group-memberships/membershipId

Access information about a member of a group, remove a member from a group, and update a group member’s role.

/chatter/group-memberships/batch/membershipIds Access information about a list of group members.

Group Memberships Information Access information about a member of a group, remove a member from a group, and update a group member’s role. Membership IDs are returned from the /chatter/groups/groupId/memberships resource. Resource /chatter/group-memberships/membershipId /connect/communities/communityId/chatter/group-memberships/membershipId

Available since version 23.0 Requires Chatter Yes HTTP methods GET, DELETE, HEAD, PATCH PATCH is supported in version 29.0. Request body for PATCH Root XML tag

JSON example { "role" : "GroupManager", "userId" : "005B0000000Ge16" }

Properties Name

Type

Description

Available Version

role

String

The role of the member. One 29.0 of these values: • GroupManager • StandardMember

userId

String

The user ID of the member to 23.0 be added to the group.

Note: To update a group member’s role in a PATCH request, pass only the role property, don’t pass the userId property.

440

Chatter REST API Developer Guide

Groups Resources

Request parameters for PATCH Name

Type

Description

Available Version

role

String

The role of the member. One of 29.0 these values: • GroupManager • StandardMember

Response body for GET or PATCH Group Member

Batch Group Memberships Access information about a list of group members. The members don’t have to belong to the same group. Each membership ID is associated with a specific group. Membership IDs are returned in the response bodies of several groups resources. The following groups resource lists every member of a group in its own Group Member response body. The id property of every Group Member response body contains a membership Id: /chatter/groups/groupId/members

Resource /chatter/group-memberships/batch/membershipIds /connect/communities/communityId/chatter/group-memberships/batch/membershipIds

Where membershipIds is a comma separated list of up to 500 membership IDs. Available since version 27.0 Requires Chatter Yes HTTP methods GET, HEAD Response body for GET or HEAD Batch Results Example for GET This request gets the group membership information for two users: /chatter/group-memberships/batch/0FBD00000003GAPOA2,0FBD00000003GAKOA

This is the Batch Results response body, which contains nested User Summary response bodies: { "hasErrors": true, "results": [ {

441

Chatter REST API Developer Guide

Groups Resources

"result": { "id": "0FBD00000003GAPOA2", "role": "StandardMember", "url": "/services/data/v41.0/chatter/group-memberships/0FBD00000003GAPOA2", "user": { "companyName": "Universal Containers", "firstName": "Gordon", "id": "005D0000001LLO1IAO", "isActive": true, "isInThisCommunity": true, "lastName": "Johnson", "motif": { "color": "1797C0", "largeIconUrl": "/img/icon/profile64.png", "mediumIconUrl": "/img/icon/profile32.png", "smallIconUrl": "/img/icon/profile16.png" }, "mySubscription": { "id": "0E8D0000000T5ZUKA0", "url": "/services/data/v41.0/chatter/subscriptions/0E8D0000000T5ZUKA0" }, "name": "Gordon Johnson", "photo": { "fullEmailPhotoUrl": "https://instance_name/ncsphoto/SqRfG_-PUTY6KtfOp_f0cPhKrC7plNhUw5eOz7Aj1u-oFL0K-ff2oe04ZAmT2MqC", "largePhotoUrl": "https:/instance_name/profilephoto/729D00000000LJL/F", "photoVersionId": "729D00000000LJLIA2", "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000LJL/T", "standardEmailPhotoUrl": "https://instance_name/ncsphoto/SqRfG_-PUTY6KtfOp_f0cPhKrC7plNhUw5eOz7Aj1u-6d5rE2mNaMaBZfGnFX65O", "url": "/services/data/v41.0/chatter/users/005D0000001LLO1IAO/photo" }, "title": "VP Sales", "type": "User", "url": "/services/data/v41.0/chatter/users/005D0000001LLO1IAO", "userType": "Internal" } }, "statusCode": 200 }, { "result": [{ "errorCode": "NOT_FOUND", "message": "The requested resource does not exist" }], "statusCode": 404 }

442

Chatter REST API Developer Guide

Groups Resources

] }

Note that the second group membership wasn’t found. Batch requests return a status code for each subrequest.

Group Photo The photo for the specified group. Get, post, crop, and delete the photo. To use an image from the Files page as a group photo (existing content), pass the file ID in the fileId property of the request body or in the fileId request parameter. Images uploaded on the Group page don’t have a file ID and can’t be used as the fileId. To upload a binary file as a group photo, you must send it in a multipart/form-data message. For information about how to create the multipart/form-data message, see Uploading Binary Files. Resource /chatter/groups/groupId/photo /connect/communities/communityId/chatter/groups/groupId/photo

Available since version 23.0 Requires Chatter Yes HTTP methods GET, POST, DELETE, or HEAD Request body for POST Root XML tag

JSON example {

"cropSize" : "120", "cropX" : "0", "cropY" : "0", "fileId" : "069D00000001IOh"

}

Properties Name

Type

Description

Required or Optional

cropSize

Integer

The length, in pixels, of any edge of Required to crop an uploaded file 29.0 the crop square. or an existing file.

cropX

Integer

The position X, in pixels, from the left Required to crop an uploaded file 29.0 edge of the image to the start of the or an existing file. crop square. Top left is position (0,0).

cropY

Integer

The position Y, in pixels, from the top Required to crop an uploaded file 29.0 edge of the image to the start of the or an existing file. crop square. Top left is position (0,0).

443

Available Version

Chatter REST API Developer Guide

Groups Resources

Name

Type

Description

Required or Optional

fileId

String

18–character ID of an existing file. Required to choose an existing The key prefix must be 069 and the file. file size must be less than 2 GB.

Available Version 25.0

Note: Images uploaded on the Group page and on the User page don’t have file IDs and therefore can’t be used. Integer

versionNumber

Version number of an existing file. If Optional not provided, the latest version is used.

25.0

Request parameters for POST Parameter Name

Type

Description

Required or Optional Available Version

cropSize

Integer

The length, in pixels, of any edge of the crop square.

Required to crop an uploaded file or an existing file.

29.0

cropX

Integer

The position X, in pixels, Required to crop an from the left edge of the uploaded file or an image to the start of the existing file. crop square. Top left is position (0,0).

29.0

cropY

Integer

The position Y, in pixels, Required to crop an from the top edge of the uploaded file or an image to the start of the existing file. crop square. Top left is position (0,0).

29.0

fileId

String

18 character ID of an Required to choose an existing file. The key existing file. prefix must be 069 and the file size must be less than 2 GB.

25.0

Note: Files uploaded on the Group page and on the User Profile page don’t have a file ID and can’t be posted or cropped. Files uploaded on the

444

Chatter REST API Developer Guide

Parameter Name

Groups Resources

Type

Description

Required or Optional Available Version

Files page have a file ID and can be posted and cropped. versionNumber

Integer

Version number of the existing content. If not provided, the latest version is used.

Optional

25.0

Note: Photos are processed asynchronously and may not be visible right away. Response body for GET or HEAD Photo Response body for POST Photo SEE ALSO: Update and Crop a Group Photo

Group Records Get the list of records associated with a group. Associate a record with a group. Resource /chatter/groups/groupID/records /connect/communities/communityId/chatter/groups/groupID/records

Available since version 33.0 Requires Chatter Yes HTTP methods GET, HEAD, POST POST is supported in version 34.0 and later. Request parameters for GET Parameter Name

Type

Description

page

Integer

An integer specifying a page of items. The default 33.0 value is 0, which returns the first page.

445

Available Since

Chatter REST API Developer Guide

Groups Resources

Parameter Name

Type

Description

Available Since

pageSize

Integer

Specifies the number of items per page. Valid 33.0 values are from 1 through 100. If you don't specify a size, the default is 25.

Request body for POST Root XML tag

JSON example {"recordId" : "001D000000Io9cD"}

Properties Name

Type

Description

Required or Optional

Available Version

recordId

String

ID of the record.

Required

34.0

Request parameters for POST Parameter Name

Type

Description

Available Since

recordId

String

ID of the record.

34.0

Response body for GET Group Record Page Response body for POST Group Record

Group Record Get information about a group record or remove the association between a record and a group. Resource /chatter/group-records/groupRecordId /connect/communities/communityId/chatter/group-records/groupRecordId

Available version 34.0 Requires Chatter Yes HTTP methods GET, DELETE, HEAD

446

Chatter REST API Developer Guide

Groups Resources

Response body for GET Group Record Response body for DELETE 204: Successful Delete

Group Settings Information about the context user’s Chatter settings for the specified group. Resource /chatter/groups/groupId/my-settings /connect/communities/communityId/chatter/groups/groupId/my-settings

Available since version 27.0 Requires Chatter Yes HTTP methods GET, HEAD, or PATCH Request body for PATCH Root XML tag

Properties A user’s Chatter settings. Name

Type

Description

emailFrequency

String

The frequency with which a group 27.0 member receives email from a group. Valid values are: • EachPost • DailyDigest • WeeklyDigest • Never In communities, the Email on every post option is disabled once more than 10,000 members choose this setting for the group. All members who had this option selected are automatically switched to Daily digests.

447

Available Version

Chatter REST API Developer Guide

Groups Resources

Request parameter for PATCH Parameter Name

Type

Description

emailFrequency

String

The frequency with which a 27.0 group member receives email from a group. Valid values are: • EachPost • DailyDigest • WeeklyDigest • Never

Response body for GET, HEAD, or PATCH Group Chatter Settings

Group Topics Returns up to five topics most recently used in the specified group. Resource /chatter/groups/groupID/topics /connect/communities/communityId/chatter/groups/groupID/topics

Available since version 28.0 Requires Chatter Yes HTTP methods GET or HEAD Response body Topic Collection

Group Invites Invite internal and external users to join a group. Resource /chatter/groups/group/groupId/invite

Available version 39.0 Requires Chatter Yes HTTP methods POST

448

Available Since

Chatter REST API Developer Guide

Influence Resource

Request body for POST Root XML tag

JSON example { "invitees" : { "emails": [ "[email protected]", "[email protected]" ] }, "message" : "Join this group to participate in the discussion about your favorite feature." }

Properties Name

Type

Description

Required or Optional

Available Version

invitees

String[]

List of email addresses to send the invitation to.

Required

39.0

message

String

Message to include in the invitation.

Optional

39.0

Response body for POST Invite Collection

Influence Resource List of the percentile thresholds used to categorize an organization’s users by their influence in Chatter. Users are ranked based on the number of posts and comments made, and comments and likes received. The percentile associated with a category represents the bottom threshold for that influencer category. For example: 0.25 defines the cutoff for the Active Influencer category, which means it includes users with an influence rank equal to or greater than the 25th percentile (25%) and less than the next highest category threshold.

Influence Thresholds Resource /chatter/influence/thresholds /connect/communities/communityId/chatter/influence/thresholds

Available since version 24.0 Requires Chatter Yes

449

Chatter REST API Developer Guide

Likes Resource

HTTP method GET or HEAD Response body Influence Thresholds Example response body {"thresholds": [ { "name": "Top Influencer", "threshold": "0.8", } { "name": "Active Influencer", "threshold": "0.25", } { "name": "Observer", "threshold": "0.0", } ]}

Likes Resource Information about the specified like. Also used to delete a like. You can find the ID for a specific like from any feed, such as a news feed or a record feed.

Like Resource /chatter/likes/likeId /connect/communities/communityId/chatter/likes/likeId

Available since version 23.0 Requires Chatter Yes HTTP methods GET, DELETE or HEAD Response body for GET or HEAD Like

Managed Topics Resources Managed topics for a community. Get a list of managed topics. Create a managed topic hierarchy. Create, delete, or reorder managed topics in a community. Available resources:

450

Chatter REST API Developer Guide

Managed Topics Resources

Resource

Description

/connect/communities/communityId/ managed-topics

Get all the managed topics for a community. Create a managed topic, create managed topic hierarchies, and reorder managed topics.

/connect/communities/communityId/ managed-topics/managedTopicId

Get information about or delete a managed topic in a community.

Managed Topics Get all the managed topics for a community. Create a managed topic, create managed topic hierarchies, and reorder managed topics. Only community managers (users with the Create and Set Up Communities or Manage Communities permission) can create or reorder managed topics. Resource /connect/communities/communityId/managed-topics

Available version 32.0 Requires Chatter No HTTP methods GET, POST, PATCH, HEAD Request parameters for GET To see all your managed topic hierarchies, make a GET request with the depth parameter set to 3 and the managedTopicType set to Navigational, for example: /connect/communities/communityId/managed-topics?depth=3&managedTopicType=Navigational

Parameter Name

Type

Description

Required or Optional

depth

Integer

Specify an integer 1–3. If you specify 1, the Optional children property of the Managed Topic response body is null. If you specify 2, the children property of the Managed Topic response body contains the direct children managed topics, if any, of the managed topic. If you specify 3, you get the direct children managed topics and their children managed topics if there are any. If depth isn’t specified, it defaults to 1.

35.0

managedTopic Type

String

Type of managed topic.

Optional

32.0

• Featured—Topics that are featured, for example, on the

Required if specifying

451

Available Version

Chatter REST API Developer Guide

Parameter Name

Type

Managed Topics Resources

Description

Required or Optional

community home page, but don’t provide overall navigation.

Available Version

recordId or depth

• Navigational—Topics that display in a navigational menu in the community. A topic can be associated with up to two managed topic types, so a topic can be both a Featured topic and a Navigational topic. recordId

String

ID of the topic associated with the managed topics.

Optional

35.0–37.0

In version 38.0 and later, use recordIds. recordIds

List

List of up to 100 topic IDs associated with Optional the managed topics.

38.0

If you list more than 10 topic IDs, you can’t specify 2 or 3 for depth.

Response body for GET Managed Topic Collection Request body for POST Make POST requests to create managed topics and create topic hierarchies. Root XML tag

JSON example using recordId This example creates a managed topic from an existing standard topic (using the recordId of the standard topic). It also creates a topic hierarchy by assigning a parent topic with the parentId. { "managedTopicType":"Navigational", "parentId": "0mtR000000001KLIAY", "recordId":"0TOD00000000cwk" }

JSON example using name This example creates a new managed topic by name and creates a topic hierarchy by assigning a parent topic with the parentId. { "name":"Child Topic", "managedTopicType":"Navigational", "parentId":"0mtR000000001KLIAY" }

452

Chatter REST API Developer Guide

Managed Topics Resources

Properties Name

Type

managedTopic String Type

Description

Required or Optional

Available Version

Type of managed topic.

Required

32.0

Required for new topics

32.0

• Featured—Topics that are featured, for example, on the community home page, but don’t provide overall navigation. • Navigational—Topics that display in a navigational menu in the community. A topic can be associated with up to two managed topic types, so a topic can be both a Featured topic and a Navigational topic. You can create up to 25 managed topics per managedTopicType. To create a child managed topic, specify Navigational as the managedTopicType and specify a parentId.

name

String

Name of the managed topic.

You must specify either name or recordId. You can’t specify both. parentId

String

ID of the parent managed topic.

Optional

35.0

If you specify a parentId, also specify Navigational as the managedTopicType. You can create up to three levels (parent, direct children, and their children) of managed topics and up to 10 children managed topics per managed topic. recordId

String

ID of the record to become a managed topic. In version 32.0, recordId must be a topic ID.

Required for 32.0 existing topics if the Name property isn’t used You must specify either name or

453

Chatter REST API Developer Guide

Name

Managed Topics Resources

Type

Description

Required or Optional

Available Version

recordId. You can’t specify both.

Request parameters for POST Parameter Name

Type

Description

Required or Optional

Available Version

managedTopic Type

String

Type of managed topic.

Required

32.0

Required for new topics

32.0

• Featured—Topics that are featured, for example, on the community home page, but don’t provide overall navigation. • Navigational—Topics that display in a navigational menu in the community. A topic can be associated with up to two managed topic types, so a topic can be both a Featured topic and a Navigational topic. You can create up to 25 managed topics per managedTopicType. To create a child managed topic, specify Navigational as the managedTopicType and specify a parentId.

name

String

Name of the managed topic.

You must specify either name or recordId. You can’t specify both. parentId

String

ID of the parent managed topic. If you specify a parentId, also specify Navigational as the managedTopicType. You can create up to three levels (parent, direct children, and their children) of managed topics and up to 10 children managed topics per managed topic.

454

Optional

35.0

Chatter REST API Developer Guide

Managed Topics Resources

Parameter Name

Type

Description

Required or Optional

Available Version

recordId

String

ID of the record to become a managed topic.

Required if the Name property isn’t used

32.0

In version 32.0, recordId must be a topic ID.

You must specify either name or recordId. You can’t specify both.

Response body for POST Managed Topic Request body for PATCH Make a PATCH request to reorder parent managed topics or children managed topics with the same parent. Root XML tag

JSON example { "managedTopicPositions" : [ { "managedTopicId" :"0mtD0000000001aIAA", "position" :"0" }, { "managedTopicId" :"0mtD0000000002qIAA", "position" :"2" } ] }

Properties Name

Type

managedTopic Managed Topic Position Input[] Positions

Description

Required or Optional

Collection of managed topic position Required request bodies. This collection can include Featured and Navigational managed topics and doesn’t have to include all managed topics. If you don’t include all managed topics in managedTopicPositions, the managed topics are reordered by respecting the positions indicated in managedTopicPositions. Any managed topics that aren’t included in

455

Available Version 32.0

Chatter REST API Developer Guide

Name

Managed Topics Resources

Type

Description

Required or Optional

Available Version

managedTopicPositions are pushed down to the next available position. See Reorder managed topics example.

Reorder managed topics example If you have these managed topics: Managed Topic

Position

ManagedTopicA

0

ManagedTopicB

1

ManagedTopicC

2

ManagedTopicD

3

ManagedTopicE

4

And you reorder managed topics by including this information in Managed Topic Position Collection Input: Managed Topic

Position

ManagedTopicD

0

ManagedTopicE

2

The result is: Managed Topic

Position

ManagedTopicD

0

ManagedTopicA

1

ManagedTopicE

2

ManagedTopicB

3

ManagedTopicC

4

Response body for PATCH Managed Topic Collection

456

Chatter REST API Developer Guide

Mentions Resources

Managed Topic Get information about or delete a managed topic in a community. Only community managers (users with the Create and Set Up Communities or Manage Communities permission) can delete managed topics. Resource /connect/communities/communityId/managed-topics/managedTopicId

Available version 32.0 Requires Chatter No HTTP methods GET, DELETE, HEAD Request parameters for GET Parameter Name

Type

Description

Required or Optional

depth

Integer

Specify an integer 1–3. If you specify 1, the Optional children property of the Managed Topic response body is null. If you specify 2, the children property of the Managed Topic response body contains the direct children managed topics, if any, of the managed topic. If you specify 3, you get the direct children managed topics and their children managed topics if there are any. If depth isn’t specified, it defaults to 1.

Available Version 35.0

Response body for GET Managed Topic Response body for DELETE 204: Successful Delete

Mentions Resources Information about users and groups that a user can mention in a feed item body or comment body. When a user or group is mentioned, they receive notification. Use the Mentions Completions resource to get a list of mention proposals. Use the Mentions Validations resource to determine which of those proposals are valid for the context user.

457

Chatter REST API Developer Guide

Mentions Resources

IN THIS SECTION: Mentions Completions Information about users and groups to mention in a feed item body or comment body. Use this resource to generate a list of proposed mentions that a user can choose from. A mention is an “@” character followed by a user or group name. When a user or group is mentioned, they receive a notification. Mentions Validations Information about whether the specified mentions are valid for the context user. For example, the context user can’t mention private groups he doesn’t belong to. If such a group were included in the list of mention validations, the hasErrors property of the Mention Validations response body would be true and the group would have a validationStatus of Disallowed in its mention validation.

Mentions Completions Information about users and groups to mention in a feed item body or comment body. Use this resource to generate a list of proposed mentions that a user can choose from. A mention is an “@” character followed by a user or group name. When a user or group is mentioned, they receive a notification. Resource /chatter/mentions/completions /connect/communities/communityId/chatter/mentions/completions

Available since version 29.0 Requires Chatter Yes HTTP methods GET, HEAD Request parameters for GET Parameter Name

Type

Description

Required or Optional Available Since

contextId

String

A feed item ID (for a mention in a comment) or a Optional feed subject ID (for a mention in a feed item) that narrows search results, with more useful results listed first. Use a group ID for groups that allow customers to ensure mention completion results include customers.

29.0

page

Integer

The number of the page you want returned. Numbering starts at 0. If you pass 0 or omit the property, the first page is returned.

29.0

Attempting to page beyond 500 results returns an empty response.

458

Optional

Chatter REST API Developer Guide

Mentions Resources

Parameter Name

Type

Description

Required or Optional Available Since

pageSize

Integer

The number of items per page. Valid values are from 1 through 100. The default size is 25.

Optional

29.0

Attempting to retrieve more than 500 results returns an empty response. q

String

A search term for matching user and group names. Required Searching for a group requires a minimum of 2 characters. Searching for a user doesn’t require a minimum number of characters. This parameter does not support wildcards.

29.0

type

String

The type of mention completion. One of these values:

29.0

Optional

• All—All mention completions, regardless of the type of record to which the mention refers. • Group—Mention completions for groups. • User—Mention completions for users. The default value is All.

Response body for GET Mention Completion Page Example for getting mention completions for a comment Specify the feed item ID in the contextId parameter to request mention completions for a comment on the feed item. /chatter/mentions/completions?contextId=0D5D0000000Hwky&q=g

SEE ALSO: Get a List of @Mention Proposals

Mentions Validations Information about whether the specified mentions are valid for the context user. For example, the context user can’t mention private groups he doesn’t belong to. If such a group were included in the list of mention validations, the hasErrors property of the Mention Validations response body would be true and the group would have a validationStatus of Disallowed in its mention validation. Resource /chatter/mentions/validations /connect/communities/communityId/chatter/mentions/validations

Available since version 29.0

459

Chatter REST API Developer Guide

Motifs Resources

Requires Chatter Yes HTTP methods GET, HEAD Request parameters for GET Parameter Name

Type

Description

Required or Optional Available Since

parentId

String

The feed item parent ID.

Required

29.0

recordIds

String[]

A comma separated list of IDs to be mentioned. The maximum value is 25.

Required

29.0

visibility

String

Specifies the type of users who can see a feed item.

Required

29.0

• AllUsers—Visibility is not limited to internal users. • InternalUsers—Visibility is limited to internal users.

Response body for GET Mention Validation

Usage First make a request to Mentions Completions to get a list of proposed mentions. Pass those proposed mentions to the Mentions Validations resource to determine whether the mentions are valid for the context user. SEE ALSO: Get a List of @Mention Proposals

Motifs Resources Returns URLs for sets of small, medium, and large motif icons. Records have different sets of motif icons depending on the record type. The motif can also include the record type’s base color. Available resources are: Resource

Description

/connect/motifs/idOrPrefix

Returns a set of small, medium, and large motif icons for the specified record. Can also return the base color for the specified record.

/connect/motifs/batch/idOrPrefixList

Returns a set of small, medium, and large motif icons for the specified records. Can also contain the base color for each specified record.

460

Chatter REST API Developer Guide

Motifs Resources

Motifs Resource Returns a set of small, medium, and large motif icons for the specified record. Can also return the base color for the specified record. Specify either an ID or key prefix for idOrPrefix. Resource /connect/motifs/idOrPrefix /connect/communities/communityId/motifs/idOrPrefix

Available since release 27.0 Requires Chatter No HTTP methods GET or HEAD Response body Motif Example of GET Request for user motifs: /connect/motifs/005D0000001LLO1 Response: { "color": "1797C0", "largeIconUrl": "/img/icon/profile64.png", "mediumIconUrl": "/img/icon/profile32.png", "smallIconUrl": "/img/icon/profile16.png" }

Batch Motifs Resource Returns a set of small, medium, and large motif icons for the specified records. Can also contain the base color for each specified record. Specify a comma-separated list of IDs and key prefixes for idOrPrefixList. You can mix IDs and key prefixes in the same request. Resource /connect/motifs/batch/idOrPrefixList /connect/communities/communityId/motifs/batch/idOrPrefixList

Available since release 27.0 Requires Chatter No HTTP methods GET or HEAD Response body Batch Results

461

Chatter REST API Developer Guide

Push Notifications Resource

Example of GET Request for motifs for a user and a file: /connect/motifs/batch/005D0000001LLO1,069D00000001FHF Response: {"results": [ { "result": { "color": "1797C0", "largeIconUrl": "/img/icon/profile64.png", "mediumIconUrl": "/img/icon/profile32.png", "smallIconUrl": "/img/icon/profile16.png" }, "statusCode": 200 }, { "result": { "color": "993333", "largeIconUrl": "/img/content/content64.png", "mediumIconUrl": "/img/content/content32.png", "smallIconUrl": "/img/icon/files16.png" }, "statusCode": 200 } ]}

Push Notifications Resource Send a mobile push notification to connected apps on users’ devices. This resource is only accessible when the session is established with a connected app that is developed in the same organization or installed in the same package as the recipient’s connected app. Resource /connect/notifications/push

Available version 31.0 Requires Chatter No HTTP methods POST Request body for POST Root XML tag

JSON example {

"appName" : "namespace" "userIds" : "payload" :

"TestApp", : "abc", ["005x00000013dPK", "005x00000013dPL"], "{'aps':{'alert':'test', 'badge':0, 'sound':'default'}}"

}

462

Chatter REST API Developer Guide

Question and Answers Suggestions Resource

Properties Name

Type

Description

Required or Optional

Available Version

appName

String

The API name of the connected app that Required the push notification is sent to.

31.0

namespace

String

The namespace of the connected app that the push notification is sent to.

Required if the namespace is set

31.0

payload

String

The push notification payload in JSON format.

Required

31.0

userIds

String[]

The push notification recipient user ids.

Required

31.0

Request parameters for POST Parameter Name

Type

Description

Required or Optional

appName

String

The API name of the connected app that Required the push notification is sent to.

31.0

namespace

String

The namespace of the connected app that Required if the the push notification is sent to. namespace is set

31.0

payload

String

The push notification payload in JSON format.

Required

31.0

userIds

String[]

The push notification recipient user ids.

Required

31.0

Question and Answers Suggestions Resource Get question and answers suggestions. Resource /connect/question-and-answers/suggestions /connect/communities/communityId/question-and-answers/suggestions

Available version 32.0 Requires Chatter No HTTP methods GET

463

Available Version

Chatter REST API Developer Guide

Recommendation Audience Resources

Request parameters for GET Parameter Name

Type

includeArticles Boolean

Description

Required or Optional

Available Version

Specify true to include knowledge Optional articles in the search results. To return only questions, specify false.

32.0

maxResults

Integer

The maximum number of results to return Optional for each type of item. Possible values are 1–10. The default value is 5.

32.0

q

String

Specifies the string to search. The search Required string must contain at least two characters, not including wildcards. See Wildcards. The maximum length is 255 characters.

32.0

subjectId

String

Specify a subject ID to search only Optional questions on that object. If the ID is a topic or a user, the ID is ignored.

32.0

Response body for GET Question and Answers Suggestion Collection

Recommendation Audience Resources Target specific audiences for your custom recommendations. Use these resources to get information about, create, update, and delete recommendation audiences. Community managers (users with the Create and Set Up Communities or Manage Communities permission) can access, create, and delete audiences, definitions, and schedules for community recommendations. Users with the Modify All Data permission can also access, create, and delete recommendation audiences, recommendation definitions, and scheduled recommendations. These recommendations appear by default on the Customer Service (Napili) template. Specifically, on the community home and question detail pages and in the feed in communities in the Salesforce mobile web. They also appear anywhere community managers add recommendations using Community Builder in communities using the Summer ’15 or later version of the Customer Service (Napili) template. Available resources: Resource

Description

/connect/recommendation-audiences

Get a list of recommendation audiences and create a recommendation audience.

/connect/recommendation-audiences/ recommendationAudienceId

Get information about, update, and delete a recommendation audience.

/connect/recommendation-audiences/ recommendationAudienceId/members

Get the members of a recommendation audience.

464

Chatter REST API Developer Guide

Recommendation Audience Resources

IN THIS SECTION: Recommendation Audiences Get a list of recommendation audiences and create a recommendation audience. Recommendation Audience Get information about, update, and delete a recommendation audience. Recommendation Audience Members Get the members of a recommendation audience.

Recommendation Audiences Get a list of recommendation audiences and create a recommendation audience. Community managers (users with the Create and Set Up Communities or Manage Communities permission) can access, create, and delete audiences, definitions, and schedules for community recommendations. Users with the Modify All Data permission can also access, create, and delete recommendation audiences, recommendation definitions, and scheduled recommendations. Resource /connect/recommendation-audiences /connect/communities/communityId/recommendation-audiences

Available version 35.0 Requires Chatter No HTTP methods GET, HEAD, POST Request parameters for GET Parameter Name

Type

Description

Required or Optional

page

Integer

Zero-index page number. If not specified, Optional page zero is used.

35.0

pageSize

Integer

Number of items per page. Default is 25.

35.0

Response body for GET Recommendation Audience Collection Request body for POST Root XML tag

JSON example for creating a recommendation audience { "name" : "Custom App Users" }

465

Optional

Available Version

Chatter REST API Developer Guide

Recommendation Audience Resources

Properties Name

Type

Description

Required or Optional

Available Version

criteria

Custom List Audience Criteria Input

The criteria for the recommendation audience type.

Optional

36.0

or New User Audience Criteria Input

member String OperationType

Important: This property is available only in version 35.0. In version 36.0 and later, use Custom List Audience Criteria Input. The operation to carry out on the audience members. Values are:

If not specified when creating a recommendation audience, the audience criteria type defaults to custom list. Required to update 35.0 only a recommendation audience Don’t use or specify null to create a recommendation audience

• Add—Adds specified members to the audience. • Remove—Removes specified members from the audience. members

User ID Collection Input

Important: This property is available only in version 35.0. In version 36.0 and later, use Custom List Audience Criteria Input. A collection of user IDs. When updating an audience, you can include up to 100 members. An audience can have up to 100,000 members, and each community can have up to 100 audiences.

name

String

The unique name of the recommendation audience.

Required to update 35.0 only a recommendation audience Don’t use or specify null to create a recommendation audience

Optional to update 35.0 a recommendation audience Required to create a recommendation audience

466

Chatter REST API Developer Guide

Recommendation Audience Resources

Request parameters for POST Parameter Name

Type

Description

Required or Optional

name

String

The unique name of the recommendation Required audience.

Available Version 35.0

Response body for POST Recommendation Audience SEE ALSO: Create and Schedule Custom Recommendations with Audiences

Recommendation Audience Get information about, update, and delete a recommendation audience. Community managers (users with the Create and Set Up Communities or Manage Communities permission) can access, create, and delete audiences, definitions, and schedules for community recommendations. Users with the Modify All Data permission can also access, create, and delete recommendation audiences, recommendation definitions, and scheduled recommendations. Resource /connect/recommendation-audiences/recommendationAudienceId /connect/communities/communityId/recommendation-audiences/recommendationAudienceId

Available version 35.0 Requires Chatter No HTTP methods GET, HEAD, DELETE, PATCH Response body for GET Recommendation Audience Request body for PATCH Root XML tag

JSON example for updating a custom list recommendation audience { "criteria" : { "memberOperationType" : "Add", "members" : { "userIds" : [ "005B0000000Ge16", "005D0000001GpHp" ]

467

Chatter REST API Developer Guide

Recommendation Audience Resources

}, "type" : "CustomList" }, "name" : "My Custom List" }

JSON example for updating a new members recommendation audience { "criteria" : { "value" : "30", "type" : "MaxDaysInCommunity" }, "name" : "New Hires" }

Properties Name

Type

Description

Required or Optional

Available Version

criteria

Custom List Audience Criteria Input

The criteria for the recommendation audience type.

Optional

36.0

or New User Audience Criteria Input

member String OperationType

Important: This property is available only in version 35.0. In version 36.0 and later, use Custom List Audience Criteria Input. The operation to carry out on the audience members. Values are:

If not specified when creating a recommendation audience, the audience criteria type defaults to custom list. Required to update 35.0 only a recommendation audience Don’t use or specify null to create a recommendation audience

• Add—Adds specified members to the audience. • Remove—Removes specified members from the audience. members

User ID Collection Input

Important: This property is available only in version 35.0. In version 36.0 and later, use Custom List Audience Criteria Input. A collection of user IDs. When updating an audience, you can include up to 100 members. An audience can have up to 100,000 members, and

468

Required to update 35.0 only a recommendation audience Don’t use or specify null to create a recommendation audience

Chatter REST API Developer Guide

Name

Recommendation Audience Resources

Type

Description

Required or Optional

Available Version

each community can have up to 100 audiences. String

name

The unique name of the recommendation audience.

Optional to update 35.0 a recommendation audience Required to create a recommendation audience

Request parameters for PATCH Parameter Name

Type

Description

Required or Optional

name

String

The unique name of the recommendation Required audience.

Available Version 35.0

Response body for PATCH Recommendation Audience Response body for DELETE 204: Successful Delete SEE ALSO: Create and Schedule Custom Recommendations with Audiences

Recommendation Audience Members Get the members of a recommendation audience. Community managers (users with the Create and Set Up Communities or Manage Communities permission) can access, create, and delete audiences, definitions, and schedules for community recommendations. Users with the Modify All Data permission can also access, create, and delete recommendation audiences, recommendation definitions, and scheduled recommendations. Resource /connect/recommendation-audiences/recommendationAudienceId/members /connect/communities/communityId/recommendation-audiences/recommendationAudienceId/members

Available version 35.0 Requires Chatter No

469

Chatter REST API Developer Guide

Recommendation Definition Resources

HTTP methods GET, HEAD Request parameters for GET Parameter Name

Type

Description

Required or Optional

page

Integer

Zero-index page number. If not specified, Optional page zero is used.

35.0

pageSize

Integer

Number of items per page. Default is 25.

35.0

Optional

Available Version

Response body for GET User Reference Collection

Recommendation Definition Resources Recommendation definitions allow you to create custom recommendations that appear in communities, encouraging users to watch videos, take training and more. Use these resources to get information about, create, modify, and delete recommendation definitions. Also get information about, upload, modify, and delete recommendation definition photos. Community managers (users with the Create and Set Up Communities or Manage Communities permission) can access, create, and delete audiences, definitions, and schedules for community recommendations. Users with the Modify All Data permission can also access, create, and delete recommendation audiences, recommendation definitions, and scheduled recommendations. These recommendations appear by default on the Customer Service (Napili) template. Specifically, on the community home and question detail pages and in the feed in communities in the Salesforce mobile web. They also appear anywhere community managers add recommendations using Community Builder in communities using the Summer ’15 or later version of the Customer Service (Napili) template. Available resources: Resource

Description

/connect/recommendation-definitions

Get a list of recommendation definitions or create a recommendation definition.

/connect/recommendation-definitions/ recommendationDefinitionId

Get information about, modify, or delete a recommendation definition.

/connect/recommendation-definitions/ recommendationDefinitionId/photo

Get information about, upload, modify, or delete the photo for a recommendation definition.

Recommendation Definitions Get a list of recommendation definitions or create a recommendation definition. Community managers (users with the Create and Set Up Communities or Manage Communities permission) can access, create, and delete audiences, definitions, and schedules for community recommendations. Users with the Modify All Data permission can also access, create, and delete recommendation audiences, recommendation definitions, and scheduled recommendations.

470

Chatter REST API Developer Guide

Recommendation Definition Resources

Resource /connect/recommendation-definitions /connect/communities/communityId/recommendation-definitions

Available version 33.0 Requires Chatter No HTTP methods GET, HEAD, POST Request body for POST JSON example { "actionUrl" : "https://www.example.com", "actionUrlName" : "Launch", "explanation" : "Click this link to learn more!", "name" : "Corporate Training Project", "title" : "Want to learn more about Corporate Training Project?"}

Properties Name

Type

Description

actionUrl

String

The URL for acting on the Required recommendation, for example, the URL to join a group.

33.0

The text label for the action URL in the user interface, for example, “Launch.”

Required

34.0

actionUrlName String

Required or Optional

Available Version

explanation

String

The explanation, or body, of the recommendation.

Required

33.0

name

String

The name of the recommendation definition. The name is displayed in Setup.

Required

33.0

title

String

The title of the recommendation definition.

Optional

33.0

Request parameters for POST Parameter Name

Type

Description

Required or Optional

actionUrl

String

The URL for acting on the Required recommendation, for example, the URL to join a group.

471

Available Version 33.0

Chatter REST API Developer Guide

Parameter Name

Type

actionUrlName String

Recommendation Definition Resources

Description

Required or Optional

Available Version

The text label for the action URL in the user Required interface, for example, “Launch.”

34.0

explanation

String

The explanation, or body, of the recommendation.

Required

33.0

name

String

The name of the recommendation Required definition. The name is displayed in Setup.

33.0

title

String

The title of the recommendation definition. Optional

33.0

Response body for POST Recommendation Definition Response body for GET Recommendation Definition Collection SEE ALSO: Create and Schedule Custom Recommendations with Audiences

Recommendation Definition Get information about, modify, or delete a recommendation definition. Community managers (users with the Create and Set Up Communities or Manage Communities permission) can access, create, and delete audiences, definitions, and schedules for community recommendations. Users with the Modify All Data permission can also access, create, and delete recommendation audiences, recommendation definitions, and scheduled recommendations. Resource /connect/recommendation-definitions/recommendationDefinitionId /connect/communities/communityId/recommendation-definitions/recommendationDefinitionId

Available version 33.0 Requires Chatter No HTTP methods GET, HEAD, PATCH, DELETE Request body for PATCH JSON example { "actionUrl" : "https://www.example.com", "actionUrlName" : "Launch", "explanation" : "Click this link to learn more!",

472

Chatter REST API Developer Guide

Recommendation Definition Resources

"name" : "Corporate Training Project", "title" : "Want to learn more about Corporate Training Project?"}

Properties Name

Type

Description

actionUrl

String

The URL for acting on the Optional recommendation, for example, the URL to join a group.

33.0

The text label for the action URL in the user interface, for example, “Launch.”

Optional

34.0

actionUrlName String

Required or Optional

Available Version

explanation

String

The explanation, or body, of the recommendation.

Optional

33.0

name

String

The name of the recommendation definition. The name is displayed in Setup.

Optional

33.0

title

String

The title of the recommendation definition.

Optional

33.0

Request parameters for PATCH Parameter Name

Type

Description

Required or Optional

Available Version

actionUrl

String

The URL for acting on the Optional recommendation, for example, the URL to join a group.

33.0

actionUrlName String

The text label for the action URL in the user Optional interface, for example, “Launch.”

34.0

explanation

String

The explanation, or body, of the recommendation.

Optional

33.0

name

String

The name of the recommendation Optional definition. The name is displayed in Setup.

33.0

title

String

The title of the recommendation definition. Optional

33.0

Response body for GET and PATCH Recommendation Definition Response for DELETE 204: Successful Delete

473

Chatter REST API Developer Guide

Recommendation Definition Resources

Recommendation Definition Photo Get information about, upload, modify, or delete the photo for a recommendation definition. Community managers (users with the Create and Set Up Communities or Manage Communities permission) can access, create, and delete audiences, definitions, and schedules for community recommendations. Users with the Modify All Data permission can also access, create, and delete recommendation audiences, recommendation definitions, and scheduled recommendations. To use an image from the Files page as a recommendation definition photo (existing content), pass the file ID in the fileId property of the request body or in the fileId request parameter. To upload a binary file as a recommendation definition photo, you must send it in a multipart/form-data message. For information about how to create the multipart/form-data message, see Uploading Binary Files. Resource /connect/recommendation-definitions/recommendationDefinitionId/photo

Available version 33.0 Requires Chatter Yes HTTP methods GET, HEAD, PUT, DELETE Request body for PUT Root XML tag

JSON example {

"cropSize" : "120", "cropX" : "0", "cropY" : "0", "fileId" : "069D00000001IOh"

}

Properties Name

Type

Description

Required or Optional

cropSize

Integer

The length, in pixels, of any edge of Required to crop an uploaded file 29.0 the crop square. or an existing file.

cropX

Integer

The position X, in pixels, from the left Required to crop an uploaded file 29.0 edge of the image to the start of the or an existing file. crop square. Top left is position (0,0).

cropY

Integer

The position Y, in pixels, from the top Required to crop an uploaded file 29.0 edge of the image to the start of the or an existing file. crop square. Top left is position (0,0).

474

Available Version

Chatter REST API Developer Guide

Recommendation Definition Resources

Name

Type

Description

Required or Optional

fileId

String

18–character ID of an existing file. Required to choose an existing The key prefix must be 069 and the file. file size must be less than 2 GB.

Available Version 25.0

Note: Images uploaded on the Group page and on the User page don’t have file IDs and therefore can’t be used. versionNumber

Integer

Version number of an existing file. If Optional not provided, the latest version is used.

25.0

Request parameters for PUT Parameter Name

Type

Description

Required or Optional Available Version

cropSize

Integer

The length, in pixels, of any edge of the crop square.

Required to crop an uploaded file or an existing file.

29.0

cropX

Integer

The position X, in pixels, Required to crop an from the left edge of the uploaded file or an image to the start of the existing file. crop square. Top left is position (0,0).

29.0

cropY

Integer

The position Y, in pixels, Required to crop an from the top edge of the uploaded file or an image to the start of the existing file. crop square. Top left is position (0,0).

29.0

fileId

String

18 character ID of an Required to choose an existing file. The key existing file. prefix must be 069 and the file size must be less than 2 GB.

25.0

Note: Files uploaded on the Group page and on the User Profile page don’t have a file ID and can’t be posted or cropped. Files uploaded on the

475

Chatter REST API Developer Guide

Parameter Name

Records Resources

Type

Description

Required or Optional Available Version

Files page have a file ID and can be posted and cropped. versionNumber

Integer

Version number of the existing content. If not provided, the latest version is used.

Optional

25.0

Note: Photos are processed asynchronously and may not be visible right away. Response body for GET and PUT Photo SEE ALSO: Create and Schedule Custom Recommendations with Audiences

Records Resources Get information about the followers of a record. Add and remove topics from records. Available resources are: IN THIS SECTION: Followers on Records Resource Get information about the followers of the specified record. Topics on Records Resource Get information about topics assigned to a record or feed item and add, remove, and replace topics on a record or feed item. Optionally, suggest a list of topics to assign to a record or feed item to improve future topic suggestions. Only users with the Assign Topics permission can remove topics from records or feed items and add existing topics to records or feed items. Only users with the Create Topics permission can add new topics to records or feed items. Administrators must enable topics for objects before users can add topics to records of that object type. SEE ALSO: Record Feed Resource

Followers on Records Resource Get information about the followers of the specified record.

476

Chatter REST API Developer Guide

Records Resources

Resource /chatter/records/recordId/followers /connect/communities/communityId/chatter/records/recordId/followers

As of version 29.0, you can use a topic ID for the recordId. Available since version 23.0 Requires Chatter Yes HTTP methods GET or HEAD Request parameters Parameter Name

Type

Description

page

Integer

An integer specifying a page of items. The default value is 0, which returns the first page.

pageSize

Integer

Specifies the number of items per page. Valid values are between 1 and 1000. If you don't specify a size, the default is 25.

Response body Follower Page

Topics on Records Resource Get information about topics assigned to a record or feed item and add, remove, and replace topics on a record or feed item. Optionally, suggest a list of topics to assign to a record or feed item to improve future topic suggestions. Only users with the Assign Topics permission can remove topics from records or feed items and add existing topics to records or feed items. Only users with the Create Topics permission can add new topics to records or feed items. Administrators must enable topics for objects before users can add topics to records of that object type. Resource /connect/records/recordId/topics /connect/communities/communityId/records/recordId/topics

Available since version 30.0 Requires Chatter No HTTP methods GET, DELETE, POST, PUT PUT is supported in version 35.0 and later.

477

Chatter REST API Developer Guide

Records Resources

Request parameters for DELETE Parameter Name

Type

Description

Required or Optional Available Version

topicId

String

ID of an existing topic

Required

30.0

Response body for DELETE 204: Successful Delete Request body for POST Root XML tag

JSON The following example assigns a topic to a record: { "topicId": "0TOD0000000090r" }

Properties Name

Type

Description

Required or Optional

Available Version

topicId

String

ID of an existing topic.

Required for existing topics if the 30.0 topicName property isn’t used.

topicName

String

Name of a new or existing topic. Required for new topics; 30.0 required for existing topics if the topicId property isn’t used.

Request parameters for POST Parameter Name

Type

Description

Required or Optional Available Version

topicId

String

ID of an existing topic

Required for existing topics if the

30.0

topicName

parameter isn’t used topicName

String

Name of a new or existing topic

Response body for POST Topic

478

Required for new topics; 30.0 required for existing topics if the topicId parameter isn’t used

Chatter REST API Developer Guide

Scheduled Recommendations Resources

Example for POST This example passes the ID of an existing topic in the topidId parameter to associate it with an opportunity record: POST /connect/records/006D000000CtYBc/topics?topicId=0TOD0000000090r

Request body for PUT PUT requests reassign all topics on a record or feed item, that is, replace all assigned topics on a record or feed item with different topics. Optionally, PUT requests can suggest a list of topics to assign to a record or feed item to improve future topic suggestions. Root XML tag

JSON example { "topicNames": ["API", "Chatter REST API", "ConnectApi"] }

Properties Name

Type

Description

Required or Optional

Available Version

topicNames

String[]

A list of up to 10 topic names for a feed item or 100 topic names for a record.

Required

35.0

topicSuggestions String[]

A list of suggested topics to assign to a record or feed item to improve future topic suggestions.

Optional

37.0

Response body for PUT Topic Collection

Scheduled Recommendations Resources Get information about, create, update, or delete scheduled recommendations. Community managers (users with the Create and Set Up Communities or Manage Communities permission) can access, create, and delete audiences, definitions, and schedules for community recommendations. Users with the Modify All Data permission can also access, create, and delete recommendation audiences, recommendation definitions, and scheduled recommendations. Available resources: Resource

Description

/connect/scheduled-recommendations

Get a list of scheduled recommendations or create a scheduled recommendation.

/connect/scheduled-recommendations/ scheduledRecommendationId

Get information about, update, or delete a scheduled recommendation.

Scheduled Recommendations Get a list of scheduled recommendations or create a scheduled recommendation.

479

Chatter REST API Developer Guide

Scheduled Recommendations Resources

Community managers (users with the Create and Set Up Communities or Manage Communities permission) can access, create, and delete audiences, definitions, and schedules for community recommendations. Users with the Modify All Data permission can also access, create, and delete recommendation audiences, recommendation definitions, and scheduled recommendations. Resource /connect/scheduled-recommendations /connect/communities/communityId/scheduled-recommendations

Available version 33.0 Requires Chatter No HTTP methods GET, HEAD, POST Request body for POST Root XML tag

JSON example for creating a new scheduled recommendation { "rank" : "2", "recommendationDefinitionId" : "0RDD00000004CEhOAM"}

Properties Name

Type

Description

Required or Optional

Available Version

channel

String

Specifies a way to tie recommendations together, for example, to display recommendations in specific places in the UI or to show recommendations based on time of day or geographic locations. Values are:

Optional for creating a scheduled recommendation

36.0

• CustomChannel1—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. For example, community managers can use Community Builder to determine where recommendations appear.

DefaultChannel.

• CustomChannel2—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels.

480

If not specified, defaults to Don’t use when updating a scheduled recommendation

Chatter REST API Developer Guide

Name

Scheduled Recommendations Resources

Type

Description

Required or Optional

Available Version

• CustomChannel3—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • CustomChannel4—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • CustomChannel5—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • DefaultChannel—Default recommendation channel. Recommendations appear by default on the Home and Question Detail pages of Customer Service (Napili) and Partner Central communities. They also appear in the feed in communities in the Salesforce mobile web and anywhere community managers add recommendations using Community Builder. Use these channel values; you can’t rename or create other channels. enabled

Boolean

Indicates whether scheduling is enabled. Optional If true, the recommendation is enabled and appears in communities. If false, recommendations in feeds in the Salesforce mobile web aren’t removed, but no new recommendations appear. In Customer Service (Napili) and Partner Central communities, disabled recommendations no longer appear.

34.0

rank

Integer

Relative rank of the scheduled Optional recommendation indicated by ascending whole numbers starting with 1.

33.0

Setting the rank is comparable to an insertion into an ordered list. The scheduled recommendation is inserted into the position specified by the rank.

481

Chatter REST API Developer Guide

Name

Scheduled Recommendations Resources

Type

Description

Required or Optional

Available Version

Optional

35.0

The rank of all the scheduled recommendations after it is pushed down. See Ranking scheduled recommendations example. If the specified rank is larger than the size of the list, the scheduled recommendation is put at the end of the list. The rank of the scheduled recommendation is the size of the list, instead of the one specified. If a rank is not specified, the scheduled recommendation is put at the end of the list. recommendation String AudienceId

ID of the audience for this scheduled recommendation. When updating a scheduled recommendation, specify ALL to remove the association between a recommendation audience and a scheduled recommendation.

recommendation String DefinitionId

ID of the recommendation definition that Required for this scheduled recommendation creating a schedules. scheduled recommendation. You can’t specify a recommendation DefinitionId

when updating an existing scheduled recommendation.

482

33.0

Chatter REST API Developer Guide

Scheduled Recommendations Resources

Request parameters for POST Parameter Name

Type

Description

Required or Optional

Available Version

channel

String

Specifies a way to tie recommendations together, for example, to display recommendations in specific places in the UI or to show recommendations based on time of day or geographic locations. Values are:

Optional

36.0

• CustomChannel1—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. For example, community managers can use Community Builder to determine where recommendations appear. • CustomChannel2—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • CustomChannel3—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • CustomChannel4—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • CustomChannel5—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • DefaultChannel—Default recommendation channel. Recommendations appear by default on the Home and Question Detail pages of Customer Service (Napili) and Partner Central communities. They also appear in the feed in communities in the Salesforce mobile web and anywhere community managers add recommendations using Community Builder.

483

If not specified, defaults to DefaultChannel.

Chatter REST API Developer Guide

Parameter Name

Type

Scheduled Recommendations Resources

Description

Required or Optional

Available Version

Use these channel values; you can’t rename or create other channels. enabled

Boolean

Indicates whether scheduling is enabled. Optional If true, the recommendation is enabled and appears in communities. If false, recommendations in feeds in the Salesforce mobile web aren’t removed, but no new recommendations appear. In Customer Service (Napili) and Partner Central communities, disabled recommendations no longer appear.

34.0

rank

Integer

Relative rank of the scheduled Optional recommendation indicated by ascending whole numbers starting with 1.

33.0

Setting the rank is comparable to an insertion into an ordered list. The scheduled recommendation is inserted into the position specified by the rank. The rank of all the scheduled recommendations after it is pushed down. See Ranking scheduled recommendations example. If the specified rank is larger than the size of the list, the scheduled recommendation is put at the end of the list. The rank of the scheduled recommendation is the size of the list, instead of the one specified. If a rank is not specified, the scheduled recommendation is put at the end of the list. recommendation String AudienceId

ID of the audience for this scheduled recommendation.

Optional

35.0

recommendation String DefinitionId

ID of the recommendation definition that Required this scheduled recommendation schedules.

33.0

Response body for POST Scheduled Recommendation

484

Chatter REST API Developer Guide

Scheduled Recommendations Resources

Response body for GET Scheduled Recommendation Collection SEE ALSO: Create and Schedule Custom Recommendations with Audiences

Scheduled Recommendation Get information about, update, or delete a scheduled recommendation. Community managers (users with the Create and Set Up Communities or Manage Communities permission) can access, create, and delete audiences, definitions, and schedules for community recommendations. Users with the Modify All Data permission can also access, create, and delete recommendation audiences, recommendation definitions, and scheduled recommendations. Resource /connect/scheduled-recommendations/scheduledRecommendationId /connect/communities/communityId/scheduled-recommendations/scheduledRecommendationId

Available version 33.0 Requires Chatter No HTTP methods GET, HEAD, PATCH, DELETE Request body for PATCH Root XML tag

JSON example for updating an existing scheduled recommendation {

"rank" : "2"}

Properties Name

Type

Description

Required or Optional

Available Version

channel

String

Specifies a way to tie recommendations together, for example, to display recommendations in specific places in the UI or to show recommendations based on time of day or geographic locations. Values are:

Optional for creating a scheduled recommendation

36.0

• CustomChannel1—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. For example, community managers can use

DefaultChannel.

485

If not specified, defaults to Don’t use when updating a scheduled recommendation

Chatter REST API Developer Guide

Name

Scheduled Recommendations Resources

Type

Description

Required or Optional

Available Version

Community Builder to determine where recommendations appear. • CustomChannel2—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • CustomChannel3—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • CustomChannel4—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • CustomChannel5—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • DefaultChannel—Default recommendation channel. Recommendations appear by default on the Home and Question Detail pages of Customer Service (Napili) and Partner Central communities. They also appear in the feed in communities in the Salesforce mobile web and anywhere community managers add recommendations using Community Builder. Use these channel values; you can’t rename or create other channels. enabled

Boolean

Indicates whether scheduling is enabled. Optional If true, the recommendation is enabled and appears in communities. If false, recommendations in feeds in the Salesforce mobile web aren’t removed, but no new recommendations appear. In Customer Service (Napili) and Partner Central communities, disabled recommendations no longer appear.

486

34.0

Chatter REST API Developer Guide

Scheduled Recommendations Resources

Name

Type

Description

Required or Optional

rank

Integer

Relative rank of the scheduled Optional recommendation indicated by ascending whole numbers starting with 1.

Available Version 33.0

Setting the rank is comparable to an insertion into an ordered list. The scheduled recommendation is inserted into the position specified by the rank. The rank of all the scheduled recommendations after it is pushed down. See Ranking scheduled recommendations example. If the specified rank is larger than the size of the list, the scheduled recommendation is put at the end of the list. The rank of the scheduled recommendation is the size of the list, instead of the one specified. If a rank is not specified, the scheduled recommendation is put at the end of the list. recommendation String AudienceId

ID of the audience for this scheduled recommendation.

Optional

35.0

When updating a scheduled recommendation, specify ALL to remove the association between a recommendation audience and a scheduled recommendation. recommendation String DefinitionId

ID of the recommendation definition that Required for this scheduled recommendation creating a schedules. scheduled recommendation. You can’t specify a recommendation DefinitionId

when updating an existing scheduled recommendation.

487

33.0

Chatter REST API Developer Guide

Scheduled Recommendations Resources

Request parameters for PATCH Parameter Name

Type

Description

Required or Optional

Available Version

enabled

Boolean

Indicates whether scheduling is enabled. Optional If true, the recommendation is enabled and appears in communities. If false, recommendations in feeds in the Salesforce mobile web aren’t removed, but no new recommendations appear. In Customer Service (Napili) and Partner Central communities, disabled recommendations no longer appear.

34.0

rank

Integer

Relative rank of the scheduled Optional recommendation indicated by ascending whole numbers starting with 1.

33.0

Setting the rank is comparable to an insertion into an ordered list. The scheduled recommendation is inserted into the position specified by the rank. The rank of all the scheduled recommendations after it is pushed down. See Ranking scheduled recommendations example. If the specified rank is larger than the size of the list, the scheduled recommendation is put at the end of the list. The rank of the scheduled recommendation is the size of the list, instead of the one specified. If a rank is not specified, the scheduled recommendation is put at the end of the list. recommendation String AudienceId

ID of the audience for this scheduled recommendation. When updating a scheduled recommendation, specify ALL to remove the association between a recommendation audience and a scheduled recommendation.

Response body for PATCH Scheduled Recommendation

488

Optional

35.0

Chatter REST API Developer Guide

Share Captured Activity Resource

Request parameters for DELETE Parameter Name

Type

deleteDefinition Boolean IfLast

Description

Required or Optional

Available Version

If true and if the DELETE request is for the last scheduled recommendation of a recommendation definition, deletes the recommendation definition. Default is false.

Optional

35.0

Response for DELETE 204: Successful Delete Deleting a scheduled recommendation is comparable to a deletion in an ordered list. All scheduled recommendations after the deleted scheduled recommendation receive a new, higher rank automatically.

Share Captured Activity Resource Share an email or event that was captured by Automated Activity Capture, which is a feature of Sales Cloud Einstein and Inbox. You can share with no one, everyone, or selected groups. Resource /salesforce-inbox/shared-activities/activityId

Available version 39.0 Requires Chatter No HTTP methods PUT Request body for PUT JSON example { "groupsToShareWith":["0F9B00000004EVAKA2", "0F9B00000005YGHKA2", "0F9B00000008RTUKA2",], "sharingType":"MyGroups" }

Properties Name

Type

Description

Required or Optional

Available Version

groupsTo ShareWith

String[]

List of IDs for the groups that you share the activity with. Valid only if sharingType is MyGroups.

Optional

39.0

489

Chatter REST API Developer Guide

Subscriptions Resource

Name

Type

Description

Required or Optional

Available Version

sharingType

String

Type of sharing operation.

Required

39.0

• Everyone—The activity is shared with everyone. • MyGroups—The activity is shared only with a selection of the context user’s groups. • OnlyMe—The activity is private.

Response body for PUT Share Captured Activity Result

Subscriptions Resource Information about the specified subscription. Also used to delete a subscription, for example, to unfollow a record or a topic. A subscription ID is returned as part of the response body for follower and following resources, for example, /records/recordId/followers. In addition, subscriptions IDs are also returned in many summary response bodies, such as group summary or user summary. Resource /chatter/subscriptions/subscriptionId /connect/communities/communityId/chatter/subscriptions/subscriptionId

Available since version 23.0 Requires Chatter Yes HTTP methods GET, DELETE, or HEAD Response body for GET Subscription SEE ALSO: Stop Following a Record

Subscriptions Notifications Member Resource Get information about the frequency with which a user receives subscription notifications. Subscribe or unsubscribe a user from receiving notifications. When users opt to receive notifications for the topics they follow, they get an email when the topic is added to a post that they have access to. When users opt to receive notifications for their streams, they get an email on every post in the stream.

490

Chatter REST API Developer Guide

Subscriptions Notifications Member Resource

Resource /chatter/subscriptions/notification/entityId/members/userId /connect/communities/communityId/chatter/subscriptions/notification/entityId/members/userId

In version 38.0–39.0, entityId must be a topic ID. In version 40.0 and later, entityId must be a topic ID or a Chatter feed stream ID. Available version 38.0 Requires Chatter Yes HTTP methods GET, POST, DELETE Request body for POST Root XML tag

JSON example { "notificationFrequency":"EachPost" }

Properties Name

Type

notification String Frequency

Description

Required or Optional

Specifies the frequency with which a user Required receives email. In version 38.0 and later, EachPost is the only valid value.

Available Version 38.0

Request parameters for POST Parameter Name

Type

Description

Required or Optional

notification Frequency

String

Specifies the frequency with which a user Required receives email. In version 38.0 and later, EachPost is the only valid value.

Response body for GET and POST Notification Member Response body for DELETE 204: Successful Delete

491

Available Version 38.0

Chatter REST API Developer Guide

Topics Resources

Topics Resources List of topics for the organization, list of suggested topics for a specified string of text, feed item, or record, list of trending topics for the organization, information about a specified topic, endorsements for a specific topic, information about the files posted recently to a specified topic, information about the groups recently contributing to a specified topic, knowledgeable people for a specified topic, and list of topics related to a specified topic. Available resources: Resource

Description

/connect/topics

Get information about topics in the organization or create a topic.

/connect/topics/topicId

Information about the specified topic. Get information about a topic, update a topic’s name or description, merge topics, and delete a topic.

/connect/topics/data-category-groups/dataCategoryGroup/ Assign topics to articles and unassign topics from articles in a data category. data-categories/dataCategory/articles /connect/topics/data-category-rules/data-category-groups/ Get, create, and reassign topic and article assignment rules by data dataCategoryGroup/data-categories/dataCategory category. /connect/topics/suggestions

Get a list of topic suggestions for a string of text, feed item, or record.

/connect/topics/trending

List of the top five trending topics for the organization.

/connect/topics/topicId/endorsements

Endorsements on knowledgeable people for the specified topic. Get endorsements for a specified topic and endorse a user for the specified topic.

/connect/topic-endorsements/endorsementId An endorsement. Get information about an endorsement and

remove an endorsement. /connect/topics/topicId/files

Returns information about the five files most recently posted to the specified topic.

/connect/topics/topicId/groups

Returns information about the five groups that most recently contributed to the specified topic.

/connect/topics/topicId/knowledgeable-users People who are knowledgeable about topics. Get a list of

knowledgeable people for the specified topic. /connect/topics/topicId/related-topics

List of five topics most closely related to the specified topic.

/connect/topics/topicId/topic-opt-outs

Topic opt outs. Get a list of topic opt outs for the specified topic. Hide yourself from the Knowledgeable People list for the specified topic.

/connect/topic-opt-outs/topicOptOutId

Topic opt out. After hiding yourself from the Knowledgeable People list, show yourself again.

492

Chatter REST API Developer Guide

Topics Resources

List of Topics Get information about topics in the organization or create a topic. Resource /connect/topics /connect/communities/communityId/topics

Available since version 29.0 In version 28.0, use /chatter/topics. Requires Chatter No HTTP methods GET, POST, or HEAD POST is available in version 36.0 and later. Request parameters for GET Parameter Name

Values

Description

Required or Optional Available Version

exactMatch

Boolean

Use with the q Optional parameter and specify true to find a topic by its exact, case-insensitive name. Specify true and use with the q parameter and the

28.0

fallBackToRenamed Topics parameter set to true to find the

most recent renamed topic match if there isn’t an exact match. Default value is false. fallBackTo RenamedTopics

Boolean

Use with the q parameter and the exactMatch

parameter set to true. If an exact match isn’t found and fallBackToRenamed Topics is set to true, the most recent

renamed topic match is returned. If there are multiple renamed topic matches, only the most

493

Optional

35.0

Chatter REST API Developer Guide

Parameter Name

Topics Resources

Values

Description

Required or Optional Available Version

recent is returned. If there are no renamed topic matches, an empty collection is returned. page

Integer

An integer greater than Optional 0 specifying a page of topics. The default value is zero.

28.0

pageSize

Integer

Specifies the number of Optional items per page. Valid values are from 1 to 100. The default value is 25.

28.0

q

String

A query string to filter the results. The string must contain at least two characters, not including wildcards.

Optional

28.0

sort

String

One of the following values:

Optional

28.0

• popularDesc—Sorts topics by popularity with the most popular first. This value is the default. • alphaAsc—Sorts topics alphabetically.

Response body for GET Topic Collection Example for GET This example requests a list of topics sorted alphabetically: /connect/topics?sort=alphaAsc

Request body for POST Root XML tag

JSON example { "description":"World Wide Web Consortium (W3C) is the main international standards organization for the web.", "name":"W3C" }

494

Chatter REST API Developer Guide

Topics Resources

Properties Parameter Name

Type

Description

Available Since

description

String

Text description of the topic

36.0

name

String

Name of the topic

36.0

Request parameters for POST Parameter Name

Type

Description

Available Since

description

String

Text description of the topic

36.0

name

String

Name of the topic

36.0

Response body for POST Topic

Topic and Article Assignments Assign topics to articles and unassign topics from articles in a data category. Resource /connect/topics/data-category-groups/dataCategoryGroup/data-categories/dataCategory/articles /connect/communities/communityId/topics/data-category-groups/dataCategoryGroup/data-categories/dataCategory/articles

Available version 40.0 Requires Chatter No HTTP methods POST Request body for POST Root XML tag

JSON example { "operation": "AssignTopicsToArticle", "topicNames": ["API", "Chatter REST API", "ConnectApi"] }

495

Chatter REST API Developer Guide

Topics Resources

Properties Name

Type

Description

Required or Optional

operation

String

Specifies the type of operation to perform Required on articles and topics. Values are:

Available Version 40.0

• AssignTopicsToArticle—Assign topics to articles in a data category. • UnassignTopicsFromArticle—Unassign topics from articles in a data category. topicNames

Topic Names Input List of topic names to assign to or unassign from articles.

Required

40.0

Response body for POST Topic Collection

Topic and Article Assignment Rules Get, create, and reassign topic and article assignment rules by data category. Resource /connect/topics/data-category-rules/data-category-groups/dataCategoryGroup/data-categories/dataCategory /connect/communities/communityId/topics/data-category-rules/data-category-groups/dataCategoryGroup/data-categories/dataCategory

Available version 40.0 Requires Chatter No HTTP methods GET, POST, PUT Request body for POST and PUT Use POST to create topic and article assignment rules. Use PUT to reassign topic and article assignment rules by deleting the existing rules and creating new rules. Root XML tag

JSON example { "topicNames": ["API", "Chatter REST API", "ConnectApi"] }

496

Chatter REST API Developer Guide

Topics Resources

Properties Name

Type

Description

Required or Optional

Available Version

topicNames

String[]

A list of up to 10 topic names for a feed item or 100 topic names for a record.

Required

35.0

topicSuggestions String[]

A list of suggested topics to assign to a record or feed item to improve future topic suggestions.

Optional

37.0

Response body for GET, POST, and PUT Topic Collection

Topics Suggestions Get a list of topic suggestions for a string of text, feed item, or record. Resource /connect/topics/suggestions /connect/communities/communityId/topics/suggestions

Available since version 29.0 In version 28.0, use /chatter/topics/suggestions. Requires Chatter No HTTP methods GET or HEAD Request parameters Parameter Name

Values

Description

maxResults

Integer

Maximum number of topic Optional suggestions that get returned. The default is 5. Value must be greater than 0 and less than or equal to 25.

recordId

String

18-character ID of a feed item Required if the text or record from which to extract parameter isn’t used topics. Administrators must enable topics for objects to see topic suggestions for records of that object type. Topics for objects is available in version 30.0.

497

Required or Optional

Chatter REST API Developer Guide

Topics Resources

Parameter Name

Values

Description

Required or Optional

text

String

Text from which to extract topics.

Required if the recordId parameter isn’t used

Response body Topic Suggestion Collection Example for GET This example gets topic suggestions for the text “Working on the planning meeting for our new initiative.” /connect/topics/suggestions?text=Working+on+the+planning+meeting+for+our+new+initiative.

Trending Topics List of the top five trending topics for the organization. The more frequently people add a specific topic to their posts and comments and comment on or like posts with the same topic over a short period of time, the more likely it is to become a trending topic. For example, if your coworkers are attending the upcoming Dreamforce conference and have started discussing it in Chatter, you may see a trending topic for Dreamforce. A trending topic is not solely based on popularity and usually relates to a one-time or infrequent event that has a spike in activity, such as a conference or a project deadline. Note: In API versions earlier than 28.0, topics began with a hashtag (#). Resource /connect/topics/trending /connect/communities/communityId/topics/trending

Available since version 29.0 In versions 24.0–28.0, use /chatter/topics/trending and /connect/communities/communityId/chatter/topics/trending.

Requires Chatter No HTTP methods GET or HEAD Request parameters Parameter Name

Values

Description

maxResults

Integer

Maximum number of trending topics that get returned. The default is 5. Value must be greater than 0 and less than 100.

Response body Topic Collection

498

Chatter REST API Developer Guide

Topics Resources

Example response body (version 28.0 and later) {"currentPageUrl" : "/services/data/v41.0/connect/topics/trending?maxResults=5", "nextPageUrl" : null, "topics" : [ { "createdDate": "2013-01-01T20:43:31.000Z", "id" : "0TOD0000000090qOAA", "description" : "Application Programming Interface", "talkingAbout" : 527, "name" : "API", "url": "/services/data/v41.0/connect/topics/0TOD0000000090qOAA" }, { "createdDate": "2012-11-14T05:24:23.000Z", "id" : "0TOD000000006RxOAI", "description" : "The cloud computing event of the year.", "talkingAbout" : 424, "name" : "Dreamforce", "url": "/services/data/v41.0/connect/topics/0TOD000000006RxOAI" }, { "createdDate": "2013-02-25T10:47:51.000Z", "id" : "0TOD0000000090rOAA", "description" : "All things related to mobile.", "talkingAbout" : 87, "name" : "Mobile", "url": "/services/data/v41.0/connect/topics/0TOD0000000090rOAA" } ]}

Example response body (version 24.0–27.0) {"topics" : [ { "name" : "#API" }, { "name" : "#Dreamforce" }, { "name" : "#Mobile" } ]}

Topic Information about the specified topic. Get information about a topic, update a topic’s name or description, merge topics, and delete a topic. Users with the Edit Topics or Modify All Data permission can edit topic names and descriptions. Users with the Delete Topics or Modify All Data permission can merge and delete topics.

499

Chatter REST API Developer Guide

Topics Resources

Resource /connect/topics/topicId /connect/communities/communityId/topics/topicId

Available since version 29.0 In version 28.0, use /chatter/topics/topicId. Requires Chatter No HTTP methods GET, PATCH, DELETE, and HEAD Request body for PATCH Root XML tag

JSON example { "description":"World Wide Web Consortium (W3C) is the main international standards organization for the web.", "name":"W3C" }

Properties Name

Type

Description

Available Version

description

String

Text description of the topic

28.0

idsToMerge

String[]

List of up to five secondary topic IDs to merge with the primary topic

33.0

If any of these secondary topics are managed topics, they lose their topic type, topic images, and children topics. Their feed items are reassigned to the primary topic. name

String

Name of the topic Use this property to change only the capitalization and spacing of the topic name.

500

28.0

Chatter REST API Developer Guide

Topics Resources

Request parameters for PATCH Parameter Name

Type

Description

Available Since

description

String

Text description of the topic

28.0

idsToMerge

String[]

List of up to five secondary topic IDs to merge with the primary topic

33.0

If any of these secondary topics are managed topics, they lose their topic type, topic images, and children topics. Their feed items are reassigned to the primary topic. name

String

Name of the topic

28.0

Use this property to change only the capitalization and spacing of the topic name.

Response body for GET, HEAD, or PATCH Topic Response body for DELETE 204: Successful Delete Topic deletion is asynchronous. If a topic is requested before the deletion completes, the response is 200: Successful and the isBeingDeleted property of the Topic output is true in version 33.0 and later. If a topic is requested after the deletion completes, the response is 404: Not found. Example for PATCH This example uses request parameters to update the description of a topic: /connect/topics/0TOD000000006RxOAI?description=Edit+requests

This example uses a JSON request body to make the same request: /connect/topics/0TOD000000006RxOAI { "description" : "Edit requests" }

Topics, Endorse People Endorsements on knowledgeable people for the specified topic. Get endorsements for a specified topic and endorse a user for the specified topic. Resource /connect/topics/topicId/endorsements /connect/communities/communityId/topics/topicId/endorsements

Available since version 30.0

501

Chatter REST API Developer Guide

Topics Resources

Requires Chatter Yes HTTP methods GET, HEAD, POST Request parameters for GET Parameter Name

Type

Description

Required or Optional Available Since

endorseeId

String

Specifies the ID of the user who received endorsements.

Optional

31.0

endorserId

String

Specifies the ID of the user who endorsed others.

Optional

31.0

page

Integer

An integer greater than Optional 0 specifying a page of endorsements. The default value is zero.

30.0

pageSize

Integer

Specifies the number of Optional items per page. Valid values are between 1 and 100. The default value is 25.

30.0

Request body for POST Root XML tag

JSON { "userId" : "005B0000000Ge16" }

Properties Name

Type

Description

Required or Optional

Available Version

userId

String

ID of the user to be endorsed for the specified topic.

Required

30.0

502

Chatter REST API Developer Guide

Topics Resources

Request parameters for POST Parameter Name

Type

Description

Available Since

userId

String

ID of the user to endorse

30.0

Response body for GET Topic Endorsement Collection Response body for POST Topic Endorsement

Topic Endorsements An endorsement. Get information about an endorsement and remove an endorsement. Resource /connect/topic-endorsements/endorsementId /connect/communities/communityId/topic-endorsements/endorsementId

Available since version 30.0 Requires Chatter Yes HTTP methods GET, HEAD, DELETE Response body for GET Topic Endorsement Response body for DELETE 204: Successful Delete Example for DELETE When you endorse someone for a topic, an endorsement record is created with the key prefix 0en. To remove an endorsement, delete the endorsement record. DELETE /connect/topic-endorsements/0enD0000000003UIAQ

This is the response: HTTP 204

Topic Files Returns information about the five files most recently posted to the specified topic. Resource /connect/topics/topicId/files /connect/communities/communityId/topics/topicId/files

503

Chatter REST API Developer Guide

Topics Resources

Available since version 29.0 In version 28.0, use /chatter/topics/topicId/files. Requires Chatter No HTTP methods GET or HEAD Response body File Summary Page Example response body This GET request returns information about every file in the specified topic: /connect/topics/0TOD000000009Q2/files

The response is: { "currentPageUrl": null, "files": [{ "checksum": "a65b71bc6a31fa95dd0a9232c9f58c86", "contentSize": 100377, "contentUrl": null, "description": null, "downloadUrl": "/services/data/v41.0/connect/files/069D00000001E32IAE/content?versionNumber=1", "fileExtension": "png", "fileType": "Png", "flashRenditionStatus": "Na", "id": "069D00000001E32IAE", "isInMyFileSync": false, "mimeType": "image/png", "modifiedDate": "2012-07-17T21:47:27.000Z", "motif": { "color": "993333", "largeIconUrl": "/img/content/content64.png", "mediumIconUrl": "/img/content/content32.png", "smallIconUrl": "/img/icon/files16.png" }, "mySubscription": { "id": "0E8D0000000T5JrKAK", "url": "/services/data/v41.0/chatter/subscriptions/0E8D0000000T5JrKAK" }, "name": "Recruitment Poster", "origin": "Chatter", "owner": { "companyName": "SeattleApps", "firstName": "Rene", "id": "005D0000001LFNnIAO", "isActive": true, "lastName": "Holmes", "motif": { "color": "1797C0",

504

Chatter REST API Developer Guide

Topics Resources

"largeIconUrl": "/img/icon/profile64.png", "mediumIconUrl": "/img/icon/profile.png", "smallIconUrl": "/img/icon/profile.png" }, "mySubscription": null, "name": "Rene Holmes", "photo": { "fullEmailPhotoUrl": "https://instance_name/ncsphoto/SqRfG_-PUTY6KtfOp_f0cEw-MQI3xmkJ21oNEOQ-5sZVyX4qlsJTXfOWM77RW7yt", "largePhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/F", "photoVersionId": "729D00000000BDV", "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/T", "standardEmailPhotoUrl": "https://instance_name/ncsphoto/SqRfG_-PUTY6KtfOp_f0cEw-MQI3xmkJ21oNEOQ-5sbktFTIf9vWhFTTALJiaFz_", "url": "/services/data/v41.0/chatter/users/005D0000001LL8OIAW/photo" }, "title": null, "type": "User", "url": "/services/data/v41.0/chatter/users/005D0000001LFNnIAO", "userType": "Internal" }, "parentFolder" : "null", "pdfRenditionStatus": "Na", "renditionUrl": "/services/data/v41.0/connect/files/069D00000001E32IAE/rendition", "thumb120By90RenditionStatus": "Success", "thumb240By180RenditionStatus": "Success", "thumb720By480RenditionStatus": "Success", "title": "Recruitment Poster", "type": "ContentDocument", "url": "/services/data/v41.0/connect/files/069D00000001E32IAE?versionNumber=1", "versionNumber": "1" }], "nextPageUrl": null, "previousPageUrl": null }

Topic Groups Returns information about the five groups that most recently contributed to the specified topic. Resource /connect/topics/topicId/groups /connect/communities/communityId/topics/topicId/groups

Available since version 29.0 In version 28.0, use /chatter/topics/topicId/groups.

505

Chatter REST API Developer Guide

Topics Resources

Requires Chatter Yes HTTP methods GET or HEAD Response body Group Page

Topics, Knowledgeable People List People who are knowledgeable about topics. Get a list of knowledgeable people for the specified topic. Resource /connect/topics/topicId/knowledgeable-users /connect/communities/communityId/topics/topicId/knowledgeable-users

Available since version 30.0 Requires Chatter Yes HTTP methods GET or HEAD Request parameters Parameter Name

Values

Description

page

Integer

An integer greater than Optional 0 specifying a page of topics. The default value is zero.

30.0

pageSize

Integer

Specifies the number of Optional items per page. Valid values are between 1 and 100. The default value is 25.

30.0

Response body Knowledgeable People Collection

Related Topics List of five topics most closely related to the specified topic. Two topics that are assigned to the same feed item at least three times are related.

506

Required or Optional Available Version

Chatter REST API Developer Guide

Topics Resources

Resource /connect/topics/topicId/related-topics /connect/communities/communityId/topics/topicId/related-topics

Available since version 29.0 In version 28.0, use /chatter/topics/topicId/relatedtopics. Requires Chatter No HTTP methods GET or HEAD Response body Topic Collection

Topics, Opt Outs from Knowledgeable People List Topic opt outs. Get a list of topic opt outs for the specified topic. Hide yourself from the Knowledgeable People list for the specified topic. Resource /connect/topics/topicId/topic-opt-outs /connect/communities/communityId/topics/topicId/topic-opt-outs

Available since version 30.0 Requires Chatter Yes HTTP methods GET, HEAD, POST Response body for GET Topic Opt Out Collection Response body for POST Topic Opt Out

Topics, Opt Out from Knowledgeable People List Topic opt out. After hiding yourself from the Knowledgeable People list, show yourself again. Resource /connect/topic-opt-outs/topicOptOutId /connect/communities/communityId/topic-opt-outs/topicOptOutId

Available since version 30.0

507

Chatter REST API Developer Guide

User Profiles Resources

Requires Chatter Yes HTTP methods GET, HEAD, DELETE Response body for GET Topic Opt Out Response body for DELETE 204: Successful Delete Example for DELETE When you opt out of the knowledgeable people list for a topic, a topic opt out record is created with the key prefix 0eb. To show yourself in the knowledgeable people list after you’ve opted out, delete the topic opt out record. DELETE /connect/topic-opt-outs/0ebD0000000003oIAA

This is the response: HTTP 204

User Profiles Resources The user profile data populates the profile page (also called the Chatter profile page). This data includes user information (such as address, manager, and phone number), some user capabilities (permissions), and a set of subtab apps, which are custom tabs on the profile page. Available resources: Resource

Description

/connect/user-profiles/userID

Returns details about a user’s profile.

/connect/user-profiles/userID/banner-photo Get, create, or delete the banner photo for a user. /connect/user-profiles/userID/photo

The user photo. Get, post, and crop the photo.

User Profiles Resource Returns details about a user’s profile. For information about subtab apps, search for “subtab apps” at help.salesforce.com. The capabilities information provides some information about the context user’s capabilities in relation to another user, called the subject user. For example, the capabilities information indicates whether the context user can chat with the subject user and whether the context user can direct message the subject user. Specify the subject user as the userID. Resource /connect/user-profiles/userID /connect/communities/communityId/user-profiles/userID

Available since version 29.0

508

Chatter REST API Developer Guide

User Profiles Resources

Requires Chatter Yes HTTP methods GET or HEAD Parameters Parameter Name

Type

Description

Available Since

userId

String

ID of the user

29.0

communityId

String

ID of the community

29.0

Response body for GET User Profile

User Profiles Banner Photo Get, create, or delete the banner photo for a user. To use an image from the Files page as a user banner photo, pass the file ID in the fileId property of the request body or in the fileId request parameter. Images uploaded on the User Profile page don’t have a file ID and can’t be used as the fileId. To upload a binary file as the user banner photo, send it in a multipart/form-data message. For information about how to create the multipart/form-data message, see Uploading Binary Files. Resource /connect/user-profiles/userId/banner-photo /connect/communities/communityId/user-profiles/userId/banner-photo

Available version 36.0 Requires Chatter No HTTP methods GET, HEAD, POST, DELETE Request body for POST Root XML tag

JSON example {

"cropHeight" : "120", "cropWidth" : "240", "fileId" : "069D00000001IOh"

}

509

Chatter REST API Developer Guide

User Profiles Resources

Properties Name

Type

Description

Required or Optional

Available Version

cropHeight

Integer

Height of the crop rectangle in pixels.

Optional

36.0

cropWidth

Integer

Width of the crop rectangle in pixels.

Optional

36.0

cropX

Integer

X position of the crop rectangle from the Optional left edge of the image in pixels. Top left is position (0,0).

36.0

cropY

Integer

Y position of the crop rectangle from the Optional top edge of the image in pixels. Top left is position (0,0).

36.0

fileId

String

ID of an existing file. The key prefix must Required to use an 36.0 be 069, and the file size must be less than existing file 8 MB. Note: Images uploaded on the Group page and on the User page don’t have file IDs and therefore can’t be used.

versionNumber Integer

Version number of an existing file. If not Optional provided, the latest version is used.

36.0

Request parameters for POST Name

Type

Description

Required or Optional

cropHeight

Integer

The length of an edge in pixels of the crop Optional rectangle.

36.0

cropWidth

Integer

The width of an edge in pixels of the crop Optional rectangle.

36.0

cropX

Integer

The position X in pixels from the left edge Optional of the image to start the crop square. Top left is position (0,0).

36.0

cropY

Integer

The position Y in pixels from the top edge Optional of the image to start the crop square. Top left is position (0,0).

36.0

510

Available Version

Chatter REST API Developer Guide

User Profiles Resources

Name

Type

Description

Required or Optional

fileId

String

ID of an existing file. The key prefix must Required to use an be 069 and the file size must be less than existing file 8 MB.

Available Version 36.0

Note: Images uploaded on the Group page and on the User page don’t have file IDs and therefore can’t be used. versionNumber Integer

Version number of an existing file. If not provided, the latest version is used.

Optional

36.0

Note: Photos are processed asynchronously and may not be visible right away. Response body for GET and POST Banner Photo Response body for DELETE 204: Successful Delete

User Profiles Photo The user profile photo. Get, post, and crop the photo. To use an image from the Files page, pass the file ID in the fileId property of the request body or in the fileId request parameter. Images uploaded on the User page and on the Group page don’t have a file ID and can’t be used as the fileId. To upload a binary file as the user photo, send it in a multipart/form-data message. For information about how to create the multipart/form-data message, see Uploading Binary Files. To display user profile photos in a feed, cache the user photos. Then use the photoVersionId property of the Photo response body to determine when to update a photo. This technique helps you avoid running over limits and may improve mobile client performance. Resource /connect/user-profiles/userID/photo /connect/communities/communityId/user-profiles/userID/photo

Available version 35.0 Requires Chatter No HTTP methods GET, DELETE, or POST Response body for GET Photo

511

Chatter REST API Developer Guide

User Profiles Resources

Request body for POST Name

Type

Description

Required or Optional

Available Version

cropSize

Integer

The length, in pixels, of any edge of the crop square.

Required to crop an uploaded file 35.0 or an existing file.

cropX

Integer

The position X, in pixels, from the left Required to crop an uploaded file 35.0 edge of the image to the start of the or an existing file. crop square. Top left is position (0,0).

cropY

Integer

The position Y, in pixels, from the top Required to crop an uploaded file 35.0 edge of the image to the start of the or an existing file. crop square. Top left is position (0,0).

fileId

String

18–character ID of an existing file. The Required to choose an existing file. 35.0 key prefix must be 069 and the file size must be less than 2 GB. Note: Files uploaded on the Group page and on the User Profile page don’t have a file ID and can’t be posted or cropped. Files uploaded on the Files page have a file ID and can be posted and cropped.

versionNumber

Integer

Version number of an existing file. If not provided, the latest version is used.

Optional

35.0

Request parameters for POST Parameter Name

Type

Description

Required or Optional Available Version

cropSize

Integer

The length, in pixels, of any edge of the crop square.

Required to crop an uploaded file or an existing file.

35.0

cropX

Integer

The position X, in pixels, Required to crop an from the left edge of the uploaded file or an image to the start of the existing file. crop square. Top left is position (0,0).

35.0

cropY

Integer

The position Y, in pixels, Required to crop an from the top edge of the uploaded file or an image to the start of the existing file. crop square. Top left is position (0,0).

35.0

512

Chatter REST API Developer Guide

Users Resources

Parameter Name

Type

Description

Required or Optional Available Version

fileId

String

18 character ID of an Required to choose an existing file. The key existing file. prefix must be 069 and the file size must be less than 2 GB.

35.0

Note: Files uploaded on the Group page and on the User Profile page don’t have a file ID and can’t be posted or cropped. Files uploaded on the Files page have a file ID and can be posted and cropped. versionNumber

Integer

Version number of the existing content. If not provided, the latest version is used.

Optional

35.0

Note: Photos are processed asynchronously and may not be visible right away. Response body for POST Photo SEE ALSO: Update and Crop a User Photo

Users Resources Information about the user, such as who is following the user, the user’s files or recommendations. Also used for posting feed items and updating conversation status. Available resources are: Resource

Description

/chatter/users

Returns information about all users in an organization.

/chatter/users/me

Information about the context or specified user's Chatter profile.

513

Chatter REST API Developer Guide

Users Resources

Resource

Description

/chatter/users/batch/user_list

Returns information about the specified users’ profiles.

/chatter/users/me/conversations

Returns all private conversations for the context user. Also used to search across all conversations.

/chatter/users/me/conversations/conversationId

Returns information about a private conversation for the context user. Also used to search within a conversation and to change the status of a conversation.

/chatter/users/me/conversations/conversationId/mark-read Changes the status of a conversation. /chatter/users/me/conversations/unread-count

Returns the number of conversations that have unread messages for the context or specified user.

/connect/files/users/me

Upload a file, including references to external files, to the Files home or get information about files a user owns. These files don’t include files shared with a user, files a user follows, or general organization files.

/connect/files/users/me/filter/groups

Returns information about files posted to groups that the specified user is a member of.

/connect/files/users/me/filter/shared-with-me

Returns information about files that have been shared with the specified user.

/chatter/users/me/followers

Returns information about the followers for the specified user.

/chatter/users/me/following

Returns a list of people, groups, records, topics, and files that the specified user is following. Also used to follow records.

/chatter/users/me/groups

The groups the specified user is a member of.

/chatter/users/me/knowledgeable-about-topics

Topics that the specified user is knowledgeable about. Get a list of topics for the specified user.

/chatter/users/me/messages

Returns all the messages for all the private conversations for the context user. Also used to search across all messages and post a message.

/chatter/users/me/messages/messageId

Returns the specified Chatter private message.

/chatter/users/me/photo

The user photo. Get, post, and crop the photo.

/chatter/users/me/recommendations

Returns the user, group, file, record, topic, article, custom, and static recommendations for the context user.

/chatter/users/me/recommendations/action

Returns the recommendations for the specified action for the context user.

514

Chatter REST API Developer Guide

Users Resources

Resource

Description

/chatter/users/me/recommendations/action/objectCategory Returns the recommendations for the specified

action and object category for the context user. /chatter/users/me/recommendations/action/idPrefix

Returns the recommendations for the specified action and key prefix for the context user.

/chatter/users/me/recommendations/action/objectID

Returns the recommendation for the specified action and object ID for the context user. Also used to delete a recommendation.

/chatter/users/userId/recommendations/action/objectEnum Returns the static recommendation for the specified

action and object type for the context user. Also used to delete a static recommendation. /connect/communities/communityId /chatter/users/userId/reputation

Returns the specified community user's reputation.

/chatter/users/me/settings

Information about the context user’s global Chatter settings.

/chatter/users/me/status

Returns the most recent user status feed item. Also used to update or delete user status.

/chatter/users/me/topics

Topics recently used by the specified user. Get up to five topics most recently used by the specified user.

User Information Returns information about all users in an organization. Resource /chatter/users /connect/communities/communityId/chatter/users

Available since version 23.0 Requires Chatter Yes HTTP methods GET or HEAD Request parameters Parameter

Type

Description

Available Version

page

Integer

An integer specifying a page of items. The default value is 0, which returns 23.0 the first page.

515

Chatter REST API Developer Guide

Users Resources

Parameter

Type

Description

Available Version

pageSize

Integer

The number of items per page. Valid values are between 1 and 250. The 23.0 default value is 25.

q

String

Specifies the string to search.

23.0

This parameter searches user names, not email addresses, titles, and so on. searchContextId

String

Specify a feed item ID that provides context for the search results.

28.0

Use this parameter for @mention completion. Passing a feed item ID for searchContextId matches users already mentioned in the thread earlier in the returned collection. You can also use the Mentions Completions resource, which is specifically designed for @mention completion. When using this parameter, you can’t query more than 500 results and you can’t use wildcards in the search term.

Response body User Page In versions earlier than 28.0, the user property in the User Page response body can contain a User Summary or a User Detail response body. In version 28.0 and later, it always contains User Detail. The fields that the context user is not allowed to see are set to null.

User Profile Information Information about the context or specified user's Chatter profile. Resource /chatter/users/userId /connect/communities/communityId/chatter/users/userId

Available version 23.0 PATCH available in 29.0 Requires Chatter Yes HTTP methods GET, HEAD, PATCH Response body for GET • User Detail—Versions 26.0 and later. If the user is external, the properties that the User Detail response body shares with the User Summary response body can have non-null values. Other properties are always null. • User Summary—Versions 25.0 and earlier.

516

Chatter REST API Developer Guide

Users Resources

Request body for PATCH Root XML tag

Properties Name

Type

Description

Available Version

aboutMe

String

The aboutMe property of a 29.0 User Detail response body. The maximum length is 1000 characters. This property populates the “About Me” section of the user profile, which is visible to all members of a community or an organization.

JSON example { "aboutMe": "Staff Technical Writer responsible for the Connect API and Connect in Apex documentation." }

Request parameters for PATCH Name

Type

Description

aboutMe

String

The aboutMe property of a 29.0 User Detail response body. The maximum length is 1000 characters. This property populates the “About Me” section of the user profile, which is visible to all members of a community or an organization.

Response body for PATCH User Detail Example for updating the “About Me” section in the user profile using parameters /chatter/users/me?aboutMe=Staff+Technical+Writer+at+Seattle+Apps

SEE ALSO: Get Chatter Activity Statistics for a User Update a User Profile

517

Available Version

Chatter REST API Developer Guide

Users Resources

Batch User Information Returns information about the specified users’ profiles. Resource /chatter/users/batch/user_list /connect/communities/communityId/chatter/users/batch/user_list

Where user_list is a comma separated list of up to 500 user IDs. Available since version 23.0 Requires Chatter Yes HTTP methods GET or HEAD Response body Batch Results SEE ALSO: Get User Information for Multiple Users

User Conversations, General Returns all private conversations for the context user. Also used to search across all conversations. See User Conversations, Specific on page 519 and User Messages, General on page 533. Resource /chatter/users/userId/conversations /connect/communities/communityId/chatter/users/userId/conversations

Note: userId must be the ID of the context user or the alias me. Available since version 23.0 Requires Chatter Yes HTTP methods GET or HEAD Request parameters for GET Parameter Name

Type

Required or Optional Description

page

String

Optional

518

Available Version

A page token that 23.0 indicates where retrieval begins. Get this token from the

Chatter REST API Developer Guide

Parameter Name

Users Resources

Type

Required or Optional Description

Available Version

NextPageUrl

property in the response body. pageSize

Integer

Optional

Specifies the number of 23.0 items per page. Valid values are from 1 through 100. If you don't specify a size, the default is 25.

q

String

Optional

Specifies the string to 24.0 search. The search string must contain at least two characters, not including any wildcards. For more information about wildcards, see Wildcards. This parameter is optional. Note: The query parameter only searches message text bodies, not user names, titles, and so on.

Response body Conversation Summary Collection

User Conversations, Specific Returns information about a private conversation for the context user. Also used to search within a conversation and to change the status of a conversation. Resource /chatter/users/userId/conversations/conversationId /connect/communities/communityId/chatter/users/userId/conversations/conversationId

Note: userId must be the ID of the context user or the alias me. Available since version 23.0 Requires Chatter Yes

519

Chatter REST API Developer Guide

Users Resources

HTTP methods GET, PATCH, or HEAD Request parameter for GET Parameter Name

Type

Required or Optional Description

q

String

Optional

Available Version

Specifies the string to 24.0 search. The search string must contain at least two characters, not including any wildcards. For more information about wildcards, see Wildcards. This parameter is optional. Note: The query parameter only searches message text bodies, not user names, titles, and so on.

Request body for PATCH Root XML tag

Properties Name

Type

Description

Available Version

read

Boolean

Changes the conversation status to unread (false) or read (true).

24.0

Request parameters for PATCH Parameter Name

Type

Description

read

Boolean

Changes the conversation status to unread (false) or read (true).

Response body for GET or HEAD Conversation Detail

520

Chatter REST API Developer Guide

Users Resources

Change Status of Conversations Changes the status of a conversation. Resource /chatter/users/me/conversations/conversationId/mark-read

Available versions 23.0–29.0 Important: In version 30.0 and later, use User Conversations, Specific to change the status of a conversation. Requires Chatter Yes HTTP methods POST or PUT Request body Root XML tag

Properties Name

Type

Description

Available Version

read

Boolean

Changes the conversation status to unread (false) or read (true).

24.0

Request parameters Parameter Name

Type

Description

read

Boolean

Changes the conversation status to unread (false) or read (true).

Get Unread Count for Conversations Returns the number of conversations that have unread messages for the context or specified user. Resource /chatter/users/userId/conversations/unread-count /connect/communities/communityId/chatter/users/userId/conversations/unread-count

Available since version 23.0 HTTP methods GET or HEAD

521

Chatter REST API Developer Guide

Users Resources

Request body Conversation Unread Count

Users Files, General Upload a file, including references to external files, to the Files home or get information about files a user owns. These files don’t include files shared with a user, files a user follows, or general organization files. When you upload a file to the Files home, it is private and available only to the file owner. To upload a file, send it in a multipart/form-data request. You can include the description and title of the file in the multipart/form-data request as a JSON or XML request body. You can also send the information as request parameters. For information about how to create the multipart/form-data message, see Uploading Binary Files. Important: This resource can return a large amount of data and, when it does, takes some time to process. Resource /connect/files/users/userId /connect/communities/communityId/files/users/userId

Available since version 36.0 In versions 24.0–35.0, use /chatter/users/userId/files and /connect/communities/communityId/chatter/users/userId/files, which require Chatter.

Requires Chatter No HTTP methods GET, POST, or HEAD Request body for POST Describes a new file input. To upload a file, provide the binary file in a multipart/form-data body part where name="fileData". See Uploading Binary Files. Root XML tag

JSON { "desc":"Employee Survey Results", "title":"emp_surv_results" }

Properties Name

Type

content Date ModifiedDate desc

String

Description

Required or Optional

Available Version

File-specific last modified date that can Optional be used to set a client-side modified date.

32.0

Description of the file to be uploaded.

24.0

522

Optional

Chatter REST API Developer Guide

Name

Users Resources

Type

includeExternal Boolean FilePermissions Info

Description

Required or Optional

Specifies whether to include permission Optional information, such as whether the file is shared and what are the available permission types, for external files.

Available Version 35.0

This property can be used with POST requests to /connect/files/users/userId,

but not with POST requests to /connect/files/fileId. isInMyFileSync Boolean

true if the file is synced with Salesforce Optional Files Sync; false otherwise.

31.0

isMajorVersion Boolean

true if the file is a major version; false if the file is a minor version.

Optional

31.0

ID of the containing folder.

Optional

31.0

ID of the external file.

Optional

32.0

Optional

39.0

ID of the external data source.

Required if

32.0

This property can be used with POST requests to

repositoryFileId

Major versions can’t be replaced. parentFolderId String repository FileId

String

This property can be used with POST requests to /connect/files/users/userId,

but not with POST requests to /connect/files/fileId.

If you specify repositoryFileId, don’t specify repositoryFileUri. repository FileUri

String

URI of the external file, such as https://drive.google.com/file/d/ 0B7a_ei8brT1TMy1CQ0o5NmZQNEE/view.

This property can be used with POST requests to /connect/files/users/userId,

but not with POST requests to /connect/files/fileId.

If you specifyrepositoryFileUri, don’t specify repositoryFileId. repositoryId String

is specified. /connect/files/users/userId, Otherwise, Optional. but not with POST requests to /connect/files/fileId.

523

Chatter REST API Developer Guide

Name

Users Resources

Type

reuseReference Boolean

Description

Required or Optional

Available Version

Specifies whether to reuse the latest version of a reference you own to an external file rather than creating a duplicate reference.

Optional

36.0

Optional

35.0

Optional

41.0

Optional

24.0

This property can be used with POST requests to /connect/files/users/userId,

but not with POST requests to /connect/files/fileId. sharingOption String

Sharing option of the file. Values are: • Allowed—Resharing of the file is allowed. • Restricted—Resharing of the file is restricted.

sharingPrivacy String

Specifies the sharing privacy of a file. Values are: • None—File is visible to anyone with record access. • PrivateOnRecords—File is private on records.

title

String

Title of the file.

Request parameters for POST Name

Type

Description

Required or Optional

Available version

content ModifiedDate

Date

File-specific last modified date that can be used to set a client-side modified date.

Optional

32.0

desc

String

Description of the file

Optional

24.0

Specifies whether to include permission information, Optional such as whether the file is shared and what are the available permission types, for external files.

35.0

An automated client generates the request.

Optional

31.0

isInMyFileSync Boolean

true if the file is synced with Salesforce Files Sync; Optional false otherwise. The default value is false.

31.0

isMajorVersion Boolean

true if the file is a major version; false if the file Optional

31.0

includeExternal Boolean FilePermissions Info isDataSync

Boolean

is a minor version. Major versions can’t be replaced. The default value is false.

524

Chatter REST API Developer Guide

Users Resources

Name

Type

Description

Required or Optional

Available version

repository FileId

String

ID of the external file.

Optional

32.0

repository FileUri

String

URI of the external file, such as

Optional

39.0

repositoryId

String

Required if

32.0

https://drive.google.com/file/d/ 0B7a_ei8brT1TMy1CQ0o5NmZQNEE/view.

ID of the external data source.

repositoryFileId

is specified. Otherwise, Optional. reuseReference Boolean

Specifies whether to reuse the latest version of a reference you own to an external file rather than creating a duplicate reference.

Optional

36.0

sharingOption String

Sharing option of the file. Values are:

Optional

35.0

Optional

41.0

Optional

24.0

• Allowed—Resharing of the file is allowed. • Restricted—Resharing of the file is restricted. sharingPrivacy String

Specifies the sharing privacy of a file. Values are: • None—File is visible to anyone with record access. • PrivateOnRecords—File is private on records.

title

String

Title of the file

Request parameters for GET Parameter Name

Type

Description

page

Integer

An integer specifying a page of 24.0 items. The default value is 0, which returns the first page.

pageSize

Integer

Specifies the number of items 24.0 per page. Valid values are from 1 through 100. If you don't specify a size, the default is 25.

q

String

A query string to filter the 27.0 results. The string must contain at least two characters, not including wildcards. For

525

Available Since

Chatter REST API Developer Guide

Parameter Name

Users Resources

Type

Description

Available Since

information about wildcards, see Wildcards.

Response body for GET File Summary Page Response body for POST File Summary Example POST request This example creates a file and uploads it to Salesforce. The example shows the body parts in a multipart/form-data request. The first body part is a File Input request body. The second is the content of the file. For more information, see Uploading Binary Files. POST /services/data/v41.0/connect/files/users/me Authorization: OAuth 00DD0000000Jhd2!AQIAQC.lh4qTQcBhOPm4TZom5IaOOZLVPVK4wI_rPYJvmE8r2VW8XA. OZ7S29JEM_7Ctq1lst2dzoV.owisJc0KacUbDxyae User-Agent: Jakarta Commons-HttpClient/3.0.1 Host: instance_name Content-Length: 489 Content-Type: multipart/form-data; boundary=a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq Accept: application/json --a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq Content-Type: application/json; charset=UTF-8 Content-Disposition: form-data; name="json" { "title":"BoatPrices" } --a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq Content-Disposition: form-data; name="fileData"; filename="BoatPrices.txt" Content-Type: application/octet-stream; charset=ISO-8859-1 ...contents of BoatPrices.txt... --a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq--

User Files, Filtered by Group Returns information about files posted to groups that the specified user is a member of. Resource /connect/files/users/userId/filter/groups /connect/communities/communityId/files/users/userId/filter/groups

Available since version 36.0

526

Chatter REST API Developer Guide

Users Resources

In versions 24.0–35.0, use /chatter/users/userId/files/filter/groups and /connect/communities/communityId/chatter/users/userId/files/filter/groups, which require

Chatter. Requires Chatter No HTTP methods GET or HEAD Request parameters Parameter Name

Type

Description

Available Since

page

Integer

An integer specifying a page of 24.0 items. The default value is 0, which returns the first page.

pageSize

Integer

Specifies the number of items 24.0 per page. Valid values are from 1 through 100. If you don't specify a size, the default is 25.

q

String

A query string to filter the 27.0 results. The string must contain at least two characters, not including wildcards. For information about wildcards, see Wildcards.

Response body File Summary Page

User Files, Filtered by Sharing Returns information about files that have been shared with the specified user. Resource /connect/files/users/userId/filter/shared-with-me /connect/communities/communityId/files/users/userId/filter/shared-with-me

Note: The resource can also be accessed with the final keyword as one word, sharedwithme. Available since version 36.0 In versions 24.0–36.0, use /chatter/users/userId/files/filter/shared-with-me and /connect/communities/communityId/chatter/users/userId/files/filter/shared-with-me,

which require Chatter. Requires Chatter No

527

Chatter REST API Developer Guide

Users Resources

HTTP methods GET or HEAD Request parameters Parameter Name

Type

Description

Available Since

page

Integer

An integer specifying a page of 24.0 items. The default value is 0, which returns the first page.

pageSize

Integer

Specifies the number of items 24.0 per page. Valid values are from 1 through 100. If you don't specify a size, the default is 25.

q

String

A query string to filter the 27.0 results. The string must contain at least two characters, not including wildcards. For information about wildcards, see Wildcards.

Response body File Summary Page

User Followers Returns information about the followers for the specified user. Resource /chatter/users/userId/followers /connect/communities/communityId/chatter/users/userId/followers

Available since version 23.0 Requires Chatter Yes HTTP methods GET or HEAD Request parameters Parameter Name

Type

Description

page

Integer

Specifies the page number to return. The default value is 0, which returns the first page.

528

Chatter REST API Developer Guide

Users Resources

Parameter Name

Type

Description

pageSize

Integer

Specifies the number of items per page. Valid values are between 1 and 1000. If you don't specify a size, the default is 25.

Response body Follower Page

Following Returns a list of people, groups, records, topics, and files that the specified user is following. Also used to follow records. Note: You can't use the users resource to add a user to a group. Use the groups resource instead. Resource /chatter/users/userId/following /connect/communities/communityId/chatter/users/userId/following

Available since version 23.0 Following topics is available since version 29.0. Requires Chatter Yes HTTP methods GET, POST, or HEAD Request parameters for GET All parameters are optional. Parameter Name

Type

Description

filterType

String

Specifies the key prefix to filter the type of objects returned. The key prefix is the three-character prefix code in the object ID. Object IDs are prefixed with three-character codes that specify the type of the object. For example, User objects have a prefix of 005 and Group objects have a prefix of 0F9. Use the List of Filter Feed URLs to see the available key prefixes.

page

Integer

Specifies the page number to return. The default value is 0, which returns the first page.

529

Chatter REST API Developer Guide

Users Resources

Parameter Name

Type

Description

pageSize

Integer

Specifies the number of items per page. Valid values are between 1 and 1000. If you don't specify a size, the default is 25.

Response body for GET Following Page Example for getting a list of records a user follows /services/data/v41.0/chatter/users/005D0000001GLowIAB/following?page=1

Request body for POST Root XML tag

Properties Name

Type

Description

Available Version

subjectId

String

The ID of the record you want 23.0 to follow, such as a user ID or Topic IDs are available in 29.0 file ID. Note: Use Group Member Input for adding members to groups.

Request parameter for POST Parameter Name

Type

Description

subjectId

String

The ID of the record you want 23.0 to follow, such as a user ID or Topic IDs are available in 29.0 file ID.

Response body for POST Subscription Example for following a record using the request body { "subjectId" : "001D000000Iyu2p" }

530

Available

Chatter REST API Developer Guide

Users Resources

Example for following a record using parameters /services/data/v41.0/chatter/users/me/following?subjectId=001D000000Iyu2p

SEE ALSO: Follow a Record Get a List of Records a User Follows

User Groups The groups the specified user is a member of. Resource /chatter/users/userId/groups /connect/communities/communityId/chatter/users/userId/groups

Available since version 23.0 Requires Chatter Yes HTTP methods GET, HEAD Request parameters Parameter Name Type

Description

Required or Optional

Available Version

page

Token

A generated token that indicates the view of feed items. Page Optional tokens are returned as part of the response body, in one of the URL parameters, such as nextPageURL.

23.0

pageSize

Integer

Specifies the number of items per page. Valid values are Optional between 1 and 250. If you don’t specify a size, the default is 25.

23.0

q

String

Specifies the string to search. The search string must contain Optional at least two characters, not including wildcards. See Wildcards.

30.0

Response body User Group Page Example This GET request returns information about all groups the context user is a member of whose names or descriptions contain the letters co. /chatter/users/me/groups?q=co

531

Chatter REST API Developer Guide

Users Resources

Topics a User Is Knowledgeable About Topics that the specified user is knowledgeable about. Get a list of topics for the specified user. Resource /chatter/users/userId/knowledgeable-about-topics /connect/communities/communityId/chatter/users/userId/knowledgeable-about-topics

Available since version 30.0 Requires Chatter Yes HTTP methods GET or HEAD Request parameters Parameter Name

Values

Description

Required or Optional Available Version

page

Integer

An integer specifying a page of topics. The default value is 0.

Optional

30.0

pageSize

Integer

Specifies the number of Optional items per page. Valid values are from 1 to 100. The default value is 25.

30.0

Response body Topics People Are Knowledgeable About Collection

Topics a User Is Knowledgeable About: Batch Users Get the top five topics a user is knowledgeable about for a list of users. Resource /chatter/users/batch/userIds/knowledgeable-about-topics /connect/communities/communityId/chatter/users/batch/userIds/knowledgeable-about-topics

Where userIds is a comma-separated list of up to 500 user IDs. Available version 36.0 Requires Chatter Yes HTTP methods GET, HEAD

532

Chatter REST API Developer Guide

Users Resources

Response body for GET Batch Results

User Messages, General Returns all the messages for all the private conversations for the context user. Also used to search across all messages and post a message. To return all private conversations for the context user, see User Conversations, General. Resource /chatter/users/userId/messages /connect/communities/communityId/chatter/users/userId/messages

Note: userId must be the ID of the context user or the alias me. Available since version 23.0 Requires Chatter Yes HTTP methods GET, HEAD, POST Request parameters for GET Parameter Name

Type

Required or Optional Description

page

String

Optional

Available Version

A page token that 23.0 indicates where retrieval begins. Get this token from the NextPageUrl

property in the response body. pageSize

Integer

Optional

Specifies the number of 23.0 items per page. Valid values are from 1 through 100. If you don't specify a size, the default is 25.

q

String

Optional

Specifies the string to 24.0 search. The search string must contain at least two characters, not including any wildcards. For more information about wildcards, see Wildcards. This parameter is optional.

533

Chatter REST API Developer Guide

Parameter Name

Users Resources

Type

Required or Optional Description

Available Version

Note: The query parameter only searches message text bodies, not user names, titles, and so on.

Response body for GET Message Collection Request body for POST Root XML tag

Properties Name

Type

Description

Available Version

body

String

Text of the message body

23.0

inReplyTo

String

ID of an existing message that 23.0 identifies which conversation this message is part of. Specify either recipients or inReplyTo. Specify one or the other, not both.

recipients

User Message Recipient List Input

List of users who are the 23.0 intended message recipients, up to 9. Comma-separated list of user IDs. Specify either recipients or inReplyTo. Specify one or the other, not both.

Example XML format: Text of the message userID userID messageID

534

Chatter REST API Developer Guide

Users Resources

Example JSON format: { "body": "Text of the message", "recipients": ["userID","userID"], "inReplyTo": "messageID" }

Request parameters for POST Parameter Name

Type

Required or Optional Description

inReplyTo

String

Specify either recipients or inReplyTo. You

cannot specify both. recipients

String

Specify either recipients or inReplyTo. You

cannot specify both. text

String

Required

Available Version

ID of an existing 23.0 message that identifies which conversation this message is part of List of users who are the 23.0 intended message recipients, up to 9. Comma-separated list of user IDs. The text of the message, 23.0 up to 10,000 characters

Response body for POST Message SEE ALSO: Send a Private Message

User Messages, Specific Returns the specified Chatter private message. Resource /chatter/users/userId/messages/messageId /connect/communities/communityId/chatter/users/userId/messages/messageId

Note: userId must be the ID of the context user or the alias me. Available since version 23.0 Requires Chatter Yes HTTP methods GET or HEAD

535

Chatter REST API Developer Guide

Users Resources

Response body Message

User Photo The user photo. Get, post, and crop the photo. To use an image from the Files page as a user photo, pass the file ID in the fileId property of the request body or in the fileId request parameter. Images uploaded on the User page don’t have a file ID and can’t be used as the fileId. To upload a binary file as the user photo, you must send it in a multipart/form-data message. For information about how to create the multipart/form-data message, see Uploading Binary Files. To display user profile photos in a feed, cache the user photos. Then use the photoVersionId property of the Photo response body to determine when you need to update a photo. This technique helps you avoid running over limits and may improve mobile client performance. Resource /chatter/users/userId/photo /connect/communities/communityId/chatter/users/userId/photo

Available since version 23.0–34.0 Important: In version 35.0 and later, use /connect/user-profiles/userId/photo. Requires Chatter Yes HTTP methods GET, POST or HEAD Request body for POST Root XML tag

JSON example {

"cropSize" : "120", "cropX" : "0", "cropY" : "0", "fileId" : "069D00000001IOh"

}

Properties Name

Type

Description

Required or Optional

cropSize

Integer

The length, in pixels, of any edge of Required to crop an uploaded file 29.0 the crop square. or an existing file.

cropX

Integer

The position X, in pixels, from the left Required to crop an uploaded file 29.0 edge of the image to the start of the or an existing file. crop square. Top left is position (0,0).

536

Available Version

Chatter REST API Developer Guide

Users Resources

Name

Type

Description

Required or Optional

Available Version

cropY

Integer

The position Y, in pixels, from the top Required to crop an uploaded file 29.0 edge of the image to the start of the or an existing file. crop square. Top left is position (0,0).

fileId

String

18–character ID of an existing file. Required to choose an existing The key prefix must be 069 and the file. file size must be less than 2 GB.

25.0

Note: Images uploaded on the Group page and on the User page don’t have file IDs and therefore can’t be used. Integer

versionNumber

Version number of an existing file. If Optional not provided, the latest version is used.

25.0

Request parameters for POST Parameter Name

Type

Description

Required or Optional Available Version

cropSize

Integer

The length, in pixels, of any edge of the crop square.

Required to crop an uploaded file or an existing file.

29.0

cropX

Integer

The position X, in pixels, Required to crop an from the left edge of the uploaded file or an image to the start of the existing file. crop square. Top left is position (0,0).

29.0

cropY

Integer

The position Y, in pixels, Required to crop an from the top edge of the uploaded file or an image to the start of the existing file. crop square. Top left is position (0,0).

29.0

fileId

String

18 character ID of an Required to choose an existing file. The key existing file. prefix must be 069 and the file size must be less than 2 GB.

25.0

Note: Files uploaded on the Group page and on the User Profile page don’t

537

Chatter REST API Developer Guide

Parameter Name

Users Resources

Type

Description

Required or Optional Available Version

have a file ID and can’t be posted or cropped. Files uploaded on the Files page have a file ID and can be posted and cropped. versionNumber

Integer

Version number of the existing content. If not provided, the latest version is used.

Optional

25.0

Note: Photos are processed asynchronously and may not be visible right away. Response body for GET or HEAD Photo Response body for POST Photo

User Recommendations, General Returns the user, group, file, record, topic, article, custom, and static recommendations for the context user. Resource /chatter/users/userId/recommendations /connect/communities/communityId/chatter/users/userId/recommendations

Note: userId must be the ID of the context user or the alias me. Available since version 24.0 Requires Chatter Yes HTTP methods GET or HEAD Request parameters for GET Parameter Name

Type

Description

channel

String

Specifies a way to tie 36.0 recommendations together, for example, to display recommendations in specific

538

Available Version

Chatter REST API Developer Guide

Parameter Name

Users Resources

Type

Description places in the UI or to show recommendations based on time of day or geographic locations. Values are: • CustomChannel1—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. For example, community managers can use Community Builder to determine where recommendations appear. • CustomChannel2—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • CustomChannel3—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • CustomChannel4—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • CustomChannel5—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • DefaultChannel—Default recommendation channel. Recommendations appear by default on the Home and Question Detail pages of Customer Service (Napili) and Partner Central communities. They also

539

Available Version

Chatter REST API Developer Guide

Parameter Name

Users Resources

Type

Description

Available Version

appear in the feed in communities in the Salesforce mobile web and anywhere community managers add recommendations using Community Builder. contextAction

String

Action that the user just performed. Supported values are:

33.0

• follow • view Use contextAction and contextObjectId

together to get new recommendations based on the action just performed. contextObjectId

String

ID of the object that the user just performed an action on.

33.0

• If contextAction is follow, contextObjectId is user ID, file ID, record ID, or topic ID (version 36.0 and later). • If contextAction is view, contextObjectId is user ID, file ID, group ID, record ID, or article ID (version 37.0 and later). Use contextAction and contextObjectId

together to get new recommendations based on the action just performed. followed

String

ID of a user. Provides new recommendations based on the context of this user ID. Important: Use contextAction

and

540

23.0–32.0

Chatter REST API Developer Guide

Parameter Name

Users Resources

Type

Description

Available Version

contextObjectId

in version 33.0 and later. maxResults

Integer

Maximum number of recommendation results; default is 10. Values must be from 1 to 99.

23.0

viewed

String

ID of a file. Provides new recommendations based on the context of this file ID.

23.0–33.0

Important: Use contextAction

and contextObjectId

in version 33.0 and later.

Response body Recommendations

User Recommendations for a Specific Action Returns the recommendations for the specified action for the context user. Resource /chatter/users/userId/recommendations/action /connect/communities/communityId/chatter/users/userId/recommendations/action

Note: userId must be the ID of the context user or the alias me. Valid values for action and resulting recommendations: • follow returns recommendations to follow users, files, records, and topics (version 36.0 and later). • join returns recommendations to join groups. • view returns recommendations to view users, files, groups, and records (version 25.0 and later). In version 34.0 and later, view returns custom recommendations. In version 35.0 and later, view returns static recommendations. In version 37.0 and later, view returns article recommendations. Available since version 24.0 Requires Chatter Yes HTTP methods GET or HEAD

541

Chatter REST API Developer Guide

Users Resources

Request parameters for GET Parameter Name

Type

Description

channel

String

Specifies a way to tie 36.0 recommendations together, for example, to display recommendations in specific places in the UI or to show recommendations based on time of day or geographic locations. Values are: • CustomChannel1—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. For example, community managers can use Community Builder to determine where recommendations appear. • CustomChannel2—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • CustomChannel3—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • CustomChannel4—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • CustomChannel5—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • DefaultChannel—Default recommendation channel.

542

Available Version

Chatter REST API Developer Guide

Parameter Name

Users Resources

Type

Description

Available Version

Recommendations appear by default on the Home and Question Detail pages of Customer Service (Napili) and Partner Central communities. They also appear in the feed in communities in the Salesforce mobile web and anywhere community managers add recommendations using Community Builder. contextAction

String

Action that the user just performed. Supported values are:

33.0

• follow • view Use contextAction and contextObjectId

together to get new recommendations based on the action just performed. contextObjectId

String

ID of the object that the user just performed an action on. • If contextAction is follow, contextObjectId is user ID, file ID, record ID, or topic ID (version 36.0 and later). • If contextAction is view, contextObjectId is user ID, file ID, group ID, record ID, or article ID (version 37.0 and later). Use contextAction and contextObjectId

together to get new recommendations based on the action just performed.

543

33.0

Chatter REST API Developer Guide

Users Resources

Parameter Name

Type

Description

Available Version

followed

String

ID of a user. Provides new recommendations based on the context of this user ID.

23.0–32.0

Important: Use contextAction

and contextObjectId

in version 33.0 and later. maxResults

Integer

Maximum number of recommendation results; default is 10. Values must be from 1 to 99.

23.0

viewed

String

ID of a file. Provides new recommendations based on the context of this file ID.

23.0–33.0

Important: Use contextAction

and contextObjectId

in version 33.0 and later.

Response body Recommendations

User Recommendations for a Specific Action and Object Category Returns the recommendations for the specified action and object category for the context user. Resource /chatter/users/userId/recommendations/action/objectCategory /connect/communities/communityId/chatter/users/userId/recommendations/action/objectCategory

Note: userId must be the ID of the context user or the alias me. • Valid values for action: – follow – join – view (version 25.0 and later) • Valid values for objectCategory: – If action is follow, objectCategory is users, files, records, or topics (version 36.0 and later). – If action is join, objectCategory is groups.

544

Chatter REST API Developer Guide

Users Resources

– If action is view, objectCategory is users, files, groups, records, custom (version 34.0 and later), apps (version 35.0 and later), or articles (version 37.0 and later). Available since version 23.0 Requires Chatter Yes HTTP methods GET, HEAD Request parameters for GET Parameter Name

Type

Description

channel

String

Specifies a way to tie 36.0 recommendations together, for example, to display recommendations in specific places in the UI or to show recommendations based on time of day or geographic locations. Values are: • CustomChannel1—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. For example, community managers can use Community Builder to determine where recommendations appear. • CustomChannel2—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • CustomChannel3—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • CustomChannel4—Custom recommendation channel. Not used by default. Work with your community

545

Available Version

Chatter REST API Developer Guide

Parameter Name

Users Resources

Type

Description

Available Version

manager to define custom channels. • CustomChannel5—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • DefaultChannel—Default recommendation channel. Recommendations appear by default on the Home and Question Detail pages of Customer Service (Napili) and Partner Central communities. They also appear in the feed in communities in the Salesforce mobile web and anywhere community managers add recommendations using Community Builder. contextAction

String

Action that the user just performed. Supported values are:

33.0

• follow • view Use contextAction and contextObjectId

together to get new recommendations based on the action just performed. contextObjectId

String

ID of the object that the user just performed an action on. • If contextAction is follow, contextObjectId is user ID, file ID, record ID, or topic ID (version 36.0 and later). • If contextAction is view, contextObjectId is

546

33.0

Chatter REST API Developer Guide

Parameter Name

Users Resources

Type

Description

Available Version

user ID, file ID, group ID, record ID, or article ID (version 37.0 and later). Use contextAction and contextObjectId

together to get new recommendations based on the action just performed. followed

String

ID of a user. Provides new recommendations based on the context of this user ID.

23.0–32.0

Important: Use contextAction

and contextObjectId

in version 33.0 and later. maxResults

Integer

Maximum number of recommendation results; default is 10. Values must be from 1 to 99.

23.0

viewed

String

ID of a file. Provides new recommendations based on the context of this file ID.

23.0–33.0

Important: Use contextAction

and contextObjectId

in version 33.0 and later.

Response body for GET Recommendations Example request URL to get new recommendations based on an action just performed If you just followed Pam, who has a user ID of 005D0000001GLowIAB, use: /chatter/users/me/recommendations/follow/users?contextAction=follow&contextObjectId=005D0000001GLowIAB

to get only recommendations of users who are followed by the same people who follow Pam. In this example, John follows Pam so you get a recommendation to follow Suzanne since John also follows Suzanne.

547

Chatter REST API Developer Guide

Users Resources

Example request URL to get a list of files viewed by the same people who viewed the file you’re viewing This URL provides the same list that displays in the People Also Viewed area on the file detail page for the given file ID. /chatter/users/me/recommendations/view/files?contextAction=view&contextObjectId=069D00000000xNXIAY

SEE ALSO: Get Recommendations of Users to Follow

User Recommendations for a Specific Action and Key Prefix Returns the recommendations for the specified action and key prefix for the context user. Resource /chatter/users/userId/recommendations/action/idPrefix

/connect/communities/communityId/chatter/users/userId/recommendations/action/idPrefix

Note: userId must be the ID of the context user or the alias me. • Valid values for action: – follow – join – view • The key prefix, or idPrefix in the resource URL, is the first three characters of the object ID and indicates the object type. Valid values for idPrefix in this URL are: – If action is follow, idPrefix is the key prefix for users (005), files (069), topics (0TO), or records (such as 001 or 003). – If action is join, idPrefix is the key prefix for groups (0F9).

548

Chatter REST API Developer Guide

Users Resources

– If action is view, idPrefix is the key prefix for users (005), files (069), groups (0F9), records (such as 001 or 003), custom recommendations (0RD) in version 34.0 and later, static recommendations (T) in version 35.0 and later, or articles (such as kA0) in version 37.0 and later. Available since version 26.0 Requires Chatter Yes HTTP methods GET or HEAD Request parameters for GET Parameter Name

Type

Description

channel

String

Specifies a way to tie 36.0 recommendations together, for example, to display recommendations in specific places in the UI or to show recommendations based on time of day or geographic locations. Values are: • CustomChannel1—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. For example, community managers can use Community Builder to determine where recommendations appear. • CustomChannel2—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • CustomChannel3—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • CustomChannel4—Custom recommendation channel. Not used by default. Work with your community

549

Available Version

Chatter REST API Developer Guide

Parameter Name

Users Resources

Type

Description

Available Version

manager to define custom channels. • CustomChannel5—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • DefaultChannel—Default recommendation channel. Recommendations appear by default on the Home and Question Detail pages of Customer Service (Napili) and Partner Central communities. They also appear in the feed in communities in the Salesforce mobile web and anywhere community managers add recommendations using Community Builder. contextAction

String

Action that the user just performed. Supported values are:

33.0

• follow • view Use contextAction and contextObjectId

together to get new recommendations based on the action just performed. contextObjectId

String

ID of the object that the user just performed an action on. • If contextAction is follow, contextObjectId is user ID, file ID, record ID, or topic ID (version 36.0 and later). • If contextAction is view, contextObjectId is

550

33.0

Chatter REST API Developer Guide

Parameter Name

Users Resources

Type

Description

Available Version

user ID, file ID, group ID, record ID, or article ID (version 37.0 and later). Use contextAction and contextObjectId

together to get new recommendations based on the action just performed. followed

String

ID of a user. Provides new recommendations based on the context of this user ID.

23.0–32.0

Important: Use contextAction

and contextObjectId

in version 33.0 and later. maxResults

Integer

Maximum number of recommendation results; default is 10. Values must be from 1 to 99.

23.0

viewed

String

ID of a file. Provides new recommendations based on the context of this file ID.

23.0–33.0

Important: Use contextAction

and contextObjectId

in version 33.0 and later.

Example request URL /chatter/users/me/recommendations/view/001

Response body for GET Recommendations

User Recommendations for a Specific Action and Object ID Returns the recommendation for the specified action and object ID for the context user. Also used to delete a recommendation.

551

Chatter REST API Developer Guide

Users Resources

Resource /chatter/users/userId/recommendations/action/objectId /connect/communities/communityId/chatter/users/userId/recommendations/action/objectId

Note: userId must be the ID of the context user or the alias me. • Valid values for action: – follow – join – view (version 25.0 and later) • Valid values for objectId: – If action is follow, objectId is a user ID, file ID, record ID, or topic ID (version 36.0 and later). – If action is join, objectId is a group ID. – If action is view, objectId is a user ID, file ID, group ID, record ID, custom recommendation ID (version 34.0 and later), Today for static recommendations (version 35.0 and later), or an article ID (version 37.0 and later). Available since version 24.0 Requires Chatter Yes HTTP methods GET, DELETE, or HEAD DELETE is used to remove a recommendation and is only valid for the following resources: • /chatter/users/userId/recommendations/follow/recommendedUserId • /chatter/users/userId/recommendations/follow/recommendedFileId • /chatter/users/userId/recommendations/follow/recommendedRecordId • /chatter/users/userId/recommendations/follow/recommendedTopicId • /chatter/users/userId/recommendations/join/recommendedGroupId • /chatter/users/userId/recommendations/view/customRecommendationId • /chatter/users/userId/recommendations/view/Today • /chatter/users/userId/recommendations/view/recommendedArticleId Note: userId must be the ID of the context user or the alias me. Response body for GET Recommendations Response body for DELETE 204: Successful Delete

User Recommendations for a Specific Action and Object Type Returns the static recommendation for the specified action and object type for the context user. Also used to delete a static recommendation.

552

Chatter REST API Developer Guide

Users Resources

Resource /chatter/users/userId/recommendations/action/objectEnum /connect/communities/communityId/chatter/users/userId/recommendations/action/objectEnum

Note: userId must be the ID of the context user or the alias me. • Valid values for action: – view • Valid values for objectEnum: – Today—Static recommendations that don’t have an ID, for example, the Today app recommendation. Available version 34.0 Requires Chatter Yes HTTP methods GET, DELETE, HEAD Response body for GET Recommendations Response body for DELETE 204: Successful Delete

User Reputation Returns the specified community user's reputation. Resource /connect/communities/communityId/chatter/users/userId/reputation

Available version 32.0 Requires Chatter Yes HTTP methods GET, HEAD Response body Reputation

User Settings Information about the context user’s global Chatter settings.

553

Chatter REST API Developer Guide

Users Resources

Resource /chatter/users/userId/settings /connect/communities/communityId/chatter/users/userId/settings

Note: The userId must be the ID of the context user or the alias me. Available since version 27.0 Requires Chatter Yes HTTP methods GET, HEAD, or PATCH Request body for PATCH Root XML tag

Properties Name

Type

Description

Available Version

defaultGroup EmailFrequency

String

The default frequency with which a user 27.0 receives email from a group when they join. Valid values are: • EachPost • DailyDigest • WeeklyDigest • Never In communities, the Email on every post option is disabled once more than 10,000 members choose this setting for the group. All members who had this option selected are automatically switched to Daily digests.

Request parameter for PATCH Parameter Name

Type

Description

Available Since

defaultGroup EmailFrequency

String

The default frequency with which a user receives email from a group when they join. This setting does not affect groups a user is already a member of. Valid values are:

27.0

554

Chatter REST API Developer Guide

Parameter Name

Users Resources

Type

Description

Available Since

• EachPost • DailyDigest • WeeklyDigest • Never

Response body for GET, HEAD, or PATCH User Chatter Settings Response body example for GET {"defaultGroupEmailFrequency": "Never"}

User Status Note: This resource is no longer available as of version 25.0. Instead, use any feed resource, with the feed-item, such as /chatter/feeds/news/me/feed-items. Returns the most recent user status feed item. Also used to update or delete user status. See Using POST, PATCH, or PUT for Input. Resource /chatter/users/me/status

or /chatter/users/userId/status

Available in versions 23.0–24.0 Requires Chatter Yes HTTP methods GET, DELETE, POST or HEAD Request body for POST Root XML tag

Properties Name

Type

Description

body

Message Body Input

Description of message body. 23.0–24.0

555

Available Version

Chatter REST API Developer Guide

Zones Resources

Request parameter for POST Name

Type

Description

text

String Text to post

Text of the item to be posted to the user's status

Response body for GET or POST User Status

Topics Recently Used Topics recently used by the specified user. Get up to five topics most recently used by the specified user. Resource /chatter/users/userId/topics /connect/communities/communityId/chatter/users/userId/topics

Available since version 28.0 Requires Chatter Yes HTTP methods GET or HEAD Response body Topic Collection

Zones Resources Information about Chatter Answers zones. Note: With the Spring ’18 release, Salesforce no longer supports Chatter Answers. Users of Chatter Answers can post, answer, comment, or view existing Chatter Answers data, but support and updates are scheduled to end. We recommend transitioning to Chatter Questions. For more information, see End of Support for Chatter Answers in Spring ’18. Available resources: Resource

Description

/connect/zones

A list of Chatter Answers zones in the organization. Get information about zones available to the context user.

/connect/zones/zoneId

Information about the specified Chatter Answers zone.

/connect/zones/zoneId/searchResults

Search results from a search in a Chatter Answers zone.

556

Chatter REST API Developer Guide

Zones Resources

List of Zones A list of Chatter Answers zones in the organization. Get information about zones available to the context user. Note: With the Spring ’18 release, Salesforce no longer supports Chatter Answers. Users of Chatter Answers can post, answer, comment, or view existing Chatter Answers data, but support and updates are scheduled to end. We recommend transitioning to Chatter Questions. For more information, see End of Support for Chatter Answers in Spring ’18. Resource /connect/zones/ /connect/communities/communityId/zones/

Available version 29.0 Requires Chatter No HTTP methods GET Request parameters for GET Parameter Name

Type

Description

Available Version

page

Integer

An integer specifying a page of items. The default value 29.0 is 0, which returns the first page.

pageSize

Integer

Specifies the number of items per page. Valid values are 29.0 between 1 and 250. The default value is 25.

Response body for GET Zone Page

Zone Information Information about the specified Chatter Answers zone. Note: With the Spring ’18 release, Salesforce no longer supports Chatter Answers. Users of Chatter Answers can post, answer, comment, or view existing Chatter Answers data, but support and updates are scheduled to end. We recommend transitioning to Chatter Questions. For more information, see End of Support for Chatter Answers in Spring ’18. Resource /connect/zones/zoneId /connect/communities/communityId/zones/zoneId

Available version 29.0 Requires Chatter No

557

Chatter REST API Developer Guide

Zones Resources

HTTP methods GET Response body for GET Zone

Zone Search Results Search results from a search in a Chatter Answers zone. Note: With the Spring ’18 release, Salesforce no longer supports Chatter Answers. Users of Chatter Answers can post, answer, comment, or view existing Chatter Answers data, but support and updates are scheduled to end. We recommend transitioning to Chatter Questions. For more information, see End of Support for Chatter Answers in Spring ’18. Resource /connect/zones/zoneId/search-results /connect/communities/communityId/zones/zoneId/search-results

Available version 29.0 Requires Chatter No HTTP methods GET Request parameters for GET Parameter Name

Type

Description

Optional or Required Available Version

filter

String

A filter for the search results. One of these values:

Optional

29.0

• Article—Search results contain only articles. • Question—Search results contain only questions. language

String

The language of the articles or questions. The Optional value must be a Salesforce supported locale code. In an , the default value is the language of the page. Otherwise, the default value is the user's locale.

36.0

page

Integer

The page of items to return. The default value Optional is 0, which returns the first page.

29.0

pageSize

Integer

The number of items per page. Valid values are from 1 through 100. The default value is 20.

29.0

558

Optional

Chatter REST API Developer Guide

Chatter REST API Request Bodies

Parameter Name

Type

Description

Optional or Required Available Version

q

String

Required and cannot be null. Specifies the Required string to search. The search string must contain at least two characters, not including wildcards. See Wildcards.

29.0

Response body for GET Zone Search Result

Chatter REST API Request Bodies To perform a POST, PATCH, or PUT request, pass query parameters or create a request body formatted in either XML or JSON. This chapter lists the request bodies. The query parameters are listed with each resource. To create a JSON request body, specify the properties of the request body in JSON format. This is an example of a Comment request body. { "body" : "Let's look for a new solution." }

If a request body is top-level, it has a root XML tag listed. To create an XML request body, nest the properties as XML tags inside the root XML tag. This is the same Connect request body in XML format: Let's look for a new solution.

Action Link Definition Input The definition of an action link. An action link is a button on a feed element. Clicking an action link can take a user to a Web page, initiate a file download, or invoke an API call to Salesforce or to an external server. An action link includes a URL and an HTTP method, and can include a request body and header information, such as an OAuth token for authentication. Use action links to integrate Salesforce and third-party services into the feed so that users can take action to drive productivity and accelerate innovation.

Usage You can use context variables in the actionUrl, headers, and requestBody properties. Use context variables to pass information about the user who executed the action link to your server-side code. Salesforce substitutes the value when the action link is executed. These are the available context variables: Context Variable

Description

{!actionLinkId}

The ID of the action link the user executed.

559

Chatter REST API Developer Guide

Action Link Definition Input

Context Variable

Description

{!actionLinkGroupId}

The ID of the action link group containing the action link the user executed.

{!communityId}

The ID of the community in which the user executed the action link. The value for your internal organization is the empty key "000000000000000000".

{!communityUrl}

The URL of the community in which the user executed the action link. The value for your internal organization is empty string "".

{!orgId}

The ID of the organization in which the user executed the action link.

{!userId}

The ID of the user that executed the action link.

Root XML tag

JSON example This example doesn’t use a template: { "actionType":"Api", "actionUrl":"/services/data/v41.0/chatter/feed-elements", "groupDefault":"true", "labelKey":"Post", "method":"Post", "requiresConfirmation":"true", "requestBody":"{\"subjectId\": \"me\",\"feedElementType\": \"FeedItem\",\"body\": {\"messageSegments\": [{\"type\": \"Text\",\"text\": \"Testing a post created via an API action link.\"}]}}", "headers":[ { "name":"Content-Type", "value":"application/json" }] }

This example uses a template: { "templateId":"07gD00000004C9r", "templateBindings":[ { "key":"Bindings.version", "value":"v33.0" } ] }

560

Chatter REST API Developer Guide

Action Link Definition Input

Properties Name

Type

Description

Required or Optional

actionType

String

Defines the type of action link. Values are: Required

Available Version 33.0

Can be defined in • Api—The action link calls a an action link synchronous API at the action URL. template. Salesforce sets the status to SuccessfulStatus or FailedStatus based on the HTTP status code returned by your server. • ApiAsync—The action link calls an asynchronous API at the action URL. The action remains in a PendingStatus state until a third party makes a request to /connect/action-links/actionLinkId

to set the status to SuccessfulStatus or FailedStatus when the

asynchronous operation is complete. • Download—The action link downloads a file from the action URL. • Ui—The action link takes the user to a web page at the action URL. Use Ui if you need to load a page before the user performs an action, for example, to have the user provide input or view something before the action happens. actionUrl

String

The action link URL. For example, a Ui action link URL is a Web page. A Download action link URL is a link to the file to download. Ui and Download action link URLs are provided to clients. An Api or ApiAsync action link URL is a REST resource. Api and ApiAsync action link URLs aren’t provided to clients. Links to Salesforce can be relative. All other links must be absolute and start with https://. Tip: To avoid issues due to upgrades or changing functionality in your API, we recommend using a versioned API for actionUrl, for example,

561

Required Can be defined in an action link template.

33.0

Chatter REST API Developer Guide

Name

Type

Action Link Definition Input

Description

Required or Optional

Available Version

Optional

33.0

https://www.example.com/ api/v1/exampleResource.

If your API isn’t versioned, you can use the expirationDate property of the Action Link Group Definition Input to avoid issues due to upgrades or changing functionality in your API. excludedUserId String

ID of a single user to exclude from performing the action. If you specify an excludedUserId, you can’t specify a userId.

Can be defined in an action link template using the User Visibility and Custom User Alias

fields. groupDefault

Boolean

true if this action is the default action link in the action link group; false

Optional

The request headers for the Api and ApiAsync action link types.

Optional

33.0

Can be defined in otherwise. There can be only one default an action link action link per action link group. The template. default action link gets distinct styling in the Salesforce UI. headers

Request Header Input[]

See Authentication.

labelKey

String

Key for the set of labels to show in the user interface. A set includes labels for these states: NewStatus, PendingStatus, SuccessStatus, FailedStatus. For example, if you use the Approve key, you get these labels: Approve, Pending, Approved, Failed. For a complete list of keys and labels, see Action Links Labels. If none of the predefined labels work for your action link, use a custom label. To use a custom label, create an action link template. See Create Action Link Templates.

562

33.0

Can be defined in an action link template. Required Can be defined in an action link template.

33.0

Chatter REST API Developer Guide

Action Link Definition Input

Name

Type

Description

Required or Optional

Available Version

method

String

One of these HTTP methods:

Required

33.0

• HttpDelete—Returns HTTP 204 Can be defined in on success. Response body or output an action link template. class is empty. • HttpGet—Returns HTTP 200 on success. • HttpHead—Returns HTTP 200 on success. Response body or output class is empty. • HttpPatch—Returns HTTP 200 on success or HTTP 204 if the response body or output class is empty. • HttpPost—Returns HTTP 201 on success or HTTP 204 if the response body or output class is empty. Exceptions are the batch posting resources and methods, which return HTTP 200 on success. • HttpPut—Return HTTP 200 on success or HTTP 204 if the response body or output class is empty. requestBody

String

The request body for Api and ApiAsync action link types. Note: Escape quotation mark characters in the requestBody value.

requires Confirmation

Boolean

true to require the user to confirm the action; false otherwise.

563

Optional

33.0

Can be defined in an action link template.

Required Can be defined in an action link template.

33.0

Chatter REST API Developer Guide

Action Link Group Definition Input

Name

Type

Description

Required or Optional

Available Version

userId

String

The ID of the user who can execute the action. If not specified or null, any user can execute the action. If you specify a userId, you can’t specify an excludedUserId.

Optional

33.0

Can be defined in an action link template using the User Visibility and Custom User Alias

fields.

SEE ALSO: Define Action Links and Post with a Feed Element Action Link Group Definition Input

Action Link Group Definition Input The definition of an action link group. All action links must belong to a group. Action links in a group are mutually exclusive and share some properties. Define stand-alone actions in their own action group. Information in the action link definition can be sensitive to a third party (for example, OAuth bearer token headers). For this reason, only requests made via the connected app that created the action link definition can read, modify, or delete the definition. In addition, the user making the request must have created the definition or have View All Data permission. Root XML tag

JSON example This example instantiates an action link group definition without a template: { "actionLinks": [ { "actionType": "Api", "labelKey": "Like", "groupDefault": "true", "actionUrl": "https://test.com/this", "method": "HttpPost", "requiresConfirmation": "false" }, { "actionType": "Api", "labelKey": "Unlike", "groupDefault": "false", "actionUrl": "https://test.com/that", "method": "HttpPost", "requiresConfirmation": "false" } ],

564

Chatter REST API Developer Guide

Action Link Group Definition Input

"executionsAllowed": "OncePerUser", "expirationDate": "2014-07-07T23:59:11.168Z", "category": "Primary" }

This example instantiates an action link group definition from a template: { "templateId":"07gD00000004C9r", "templateBindings":[ { "key":"Bindings.version", "value":"v33.0" } ] }

Properties Name

Type

Description

Required or Optional

Available Version

actionLinks

Action Link Definition Input[]

The action links in the group.

category

String

Indicates the priority and relative Required to 33.0 locations of action links in an associated instantiate this feed item. Values are: action link group • Primary—The action link group without a template.

Required to 33.0 Within an action link group, action links instantiate this are displayed in the order listed in the action link group actionLinks property of the Action without a template. Link Group Definition Input request body. To instantiate from Within a feed item, action link groups are a template, don’t displayed in the order specified in the specify a value. actionLinkGroupIds property of the Associated Actions Capability Input request body.

is displayed in the body of the feed To instantiate from a template, don’t element. • Overflow—The action link group specify a value. is displayed in the overflow menu of the feed element. You can create up to three action links in a Primary group and up to four in an Overflow group.

565

Chatter REST API Developer Guide

Name

Action Link Group Definition Input

Type

executionsAllowed String

Description

Required or Optional

Available Version

Defines the number of times an action link can be executed. Values are:

Required to 33.0 instantiate this action link group • Once—An action link can be executed only once across all users. without a template. • OncePerUser—An action link To instantiate from can be executed only once for each a template, don’t specify a value. user. • Unlimited—An action link can be executed an unlimited number of times by each user. If the action link’s actionType is Api or ApiAsync, you can’t use this value.

expirationDate Date

ISO 8601 date string, for example, 2011-02-25T18:24:31.000Z, that represents the date and time this action link group is removed from associated feed items and can no longer be executed. The expirationDate must be within one year of the creation date.

Required to 33.0 instantiate this action link group without a template. Optional to instantiate from a template.

If the action link group definition includes an OAuth token, it is a good idea to set the expiration date of the action link group to the same value as the expiration date of the OAuth token so that users can’t execute the action link and get an OAuth error. To set a date when instantiating from a template, see Set the Action Link Group Expiration Time. templateBindings Action Link

Template Binding Input[]

A collection of key-value pairs to fill in binding variable values or a custom user alias from an action link template. To instantiate this action link group from an action link template that uses binding variables, you must provide values for all the variables. See Define Binding Variables.

566

To instantiate 33.0 without a template, don’t specify a value. Required to instantiate this action link group from a template that uses binding variables.

Chatter REST API Developer Guide

Action Link Input

Name

Type

Description

Required or Optional

templateId

String

The ID of the action link group template To instantiate 33.0 from which to instantiate this action link without a template, group. don’t specify a value. Required to instantiate this action link group from a template.

SEE ALSO: Define Action Links and Post with a Feed Element Define Action Links and Post with a Feed Element Define Action Links in a Template and Post with a Feed Element

Action Link Input The desired execution status of an action link. Root XML tag

JSON example {

"status" : "SuccessfulStatus"

}

567

Available Version

Chatter REST API Developer Guide

Action Link Template Binding Input

Properties Name

Type

Description

Required or Optional

status

String

The current status of the action. Values are: Required

Available Version 33.0

• FailedStatus—The action link execution failed. • NewStatus—The action link is ready to be executed. Available for Download and Ui action links only. • PendingStatus—The action link is executing. Choosing this value triggers the API call for Api and ApiAsync action links. • SuccessfulStatus—The action link executed successfully.

SEE ALSO: Update the Status of an Action Link or Invoke an Action Link

Action Link Template Binding Input A key-value pair to fill in a binding variable value from an action link template. JSON example { "key":"version", "value":"33.0" }

Properties Name

Type

Description

Required or Optional

key

String

The name of the binding variable key Required specified in the action link template in Setup. For example, if the binding variable in the template is {!Binding.firstName}, the key is firstName

568

Available Version 33.0

Chatter REST API Developer Guide

Activity Reminder Input

Name

Type

Description

Required or Optional

value

String

The value of the binding variable key. For Required example, if the key is firstName, this value could be Joan.

Available Version 33.0

SEE ALSO: Action Link Group Definition Input

Activity Reminder Input Activity reminder details in Salesforce Classic. Root XML tag

JSON example { "reminderDateTime": "2016-11-22T16:00:00.000Z", "isReminderDisplayed": false }

Properties Name

Type

Description

Required or Optional

Available Version

isReminderDisplayed Boolean

Indicates whether the activity reminder is Required displayed.

39.0

reminderDateTime Date

Date and time that the activity reminder displays.

39.0

Optional

Alternative Input Alternative representation for an extension on a feed element. Root XML tag

JSON example { "textRepresentation": "Quip document with ID 132452345", "thumbnailUrl": "http://salesforce.quip.com?id=132452345", "title": "Quip" }

569

Chatter REST API Developer Guide

Announcement Input

Properties Name

Type

text String Representation

Description

Required or Optional

Available Version

Text representation of the extension.

Required

40.0

thumbnailUrl

String

Thumbnail URL for the extension.

Optional

40.0

title

String

Title of the extension.

Optional

40.0

Announcement Input An announcement. Root XML tag

JSON example for creating an announcement {

"body": { "messageSegments": [ { "text": "Please install the updates for all iOS devices.", "type": "Text" } ] }, "parentId": "0F9B0000000004S", "expirationDate": "2016-02-22T00:00:00.000Z"

}

JSON example for creating an announcement using an existing feed item { "feedItemId": "0D5D0000000DaZBKA0", "expirationDate": "2016-02-22T00:00:00.000Z" }

JSON example for updating an announcement { "expirationDate": "2016-02-22T00:00:00.000Z", "isArchived": "false" }

Properties Name

Type

Description

body

Message Body Input Text of the announcement.

570

Required or Optional

Available Version

Required for creating an

31.0

Chatter REST API Developer Guide

Name

Type

Announcement Input

Description

Required or Optional

Available Version

announcement if feedItemId

isn’t specified Don’t specify for updating an announcement. expirationDate Date

feedItemId

String

The Salesforce UI displays an announcement until 11:59 p.m. on this date unless another announcement is posted first. The Salesforce UI ignores the time value in the expirationDate. However, you can use the time value to create your own display logic in your own UI.

Required for creating an announcement

ID of an AdvancedTextPost feed item that is the body of the announcement.

Required for creating an announcement if body isn’t specified

31.0

Optional for updating an announcement

36.0

Don’t specify for updating an announcement. isArchived

Boolean

Specifies whether the announcement is archived.

Optional

36.0

parentId

String

ID of the parent entity for the announcement, that is, a group ID when the announcement appears in a group.

Required for creating an announcement if

36.0

feedItemId

isn’t specified Don’t specify for updating an announcement. sendEmails

Boolean

Specifies whether the announcement is sent as an email to all group members regardless of their email setting for the group. If Chatter emails aren’t enabled for the organization, announcement emails aren’t sent. Default value is false.

571

Optional for creating an announcement Don’t specify for updating an announcement

36.0

Chatter REST API Developer Guide

Article Topic Assignment Job Input

Article Topic Assignment Job Input An article and topic assignment job. Root XML tag

JSON example { "operation": "AssignTopicsToArticle", "topicNames": ["API", "Chatter REST API", "ConnectApi"] }

Properties Name

Type

Description

Required or Optional

operation

String

Specifies the type of operation to perform Required on articles and topics. Values are:

Available Version 40.0

• AssignTopicsToArticle—Assign topics to articles in a data category. • UnassignTopicsFromArticle—Unassign topics from articles in a data category. topicNames

Topic Names Input

List of topic names to assign to or unassign Required from articles.

40.0

Associated Actions Capability Input Describes action links that can be created or updated on a feed element. To associate an action link group with a feed element, the client must be the same connected app that created the action link group definition and the user must either be the user who created the definition or have View all Data permission. An action link is a button on a feed element. Clicking an action link can take a user to a Web page, initiate a file download, or invoke an API call to Salesforce or to an external server. An action link includes a URL and an HTTP method, and can include a request body and header information, such as an OAuth token for authentication. Use action links to integrate Salesforce and third-party services into the feed so that users can take action to drive productivity and accelerate innovation. JSON example "associatedActions": { "actionLinkGroupIds":["0Agxx00000000d1CAA", "0Agxx00000000d2DFY"] }

572

Chatter REST API Developer Guide

Async Query Input

Properties Name

Type

Description

Required or Optional

actionLink GroupIds

String[]

The action link group IDs to associate with Required the feed element. Associate one Primary and up to 10 total action link groups to a feed item. Action link groups are returned in the order specified in this property.

Available Version 33.0

Get an action link group ID in the response from a request to /connect/action-link-group-definitions.

SEE ALSO: Feed Element Capabilities Input

Async Query Input Create an Async SOQL query job. Root XML tag

JSON example { "query": "SELECT firstField__c, secondField__c FROM SourceObject__c", "operation": "insert", "targetObject": "TargetObject__c", "targetFieldMap": {"firstField__c":"firstFieldTarget__c", "secondField__c":"secondFieldTarget__c" }, "targetValueMap": {"$JOB_ID":"BackgroundOperationLookup__c", "Copy fields from source to target":"BackgroundOperationDescription__c" } }

Properties Name

Type

Description

Required or Optional

query

String

Specifies the parameters for the SOQL query you Required want to execute.

573

Available Version 35.0

Chatter REST API Developer Guide

Async Query Input

Name

Type

Description

Required or Optional

operation

String

Specify whether the query is an insert or upsert. Optional If the record doesn’t exist, an upsert behaves like an insert.

Available Version 39.0

Note: Upsert is not supported for big objects targetObject String

A standard object, custom object, external object, Required or big object into which to insert the results of the query.

35.0

targetFieldMap Map

Note: When defining the targetFieldMap parameter, make sure that the field type mappings are consistent. If the source and target fields don’t match, these considerations apply. • Any source field can be mapped onto a target text field. • If the source and target fields are both numerical, the target field must have the same or greater number of decimal places than the source field. If not, the request fails. This behavior is to ensure that no data is lost in the conversion. • If a field in the query result is mapped more than once, even if mapped to different fields in the target object, only the last mapping is used. targetValueMap Map

Defines how to map static strings to fields in the Optional target object. Any field or alias can be used as the TargetValueMap value in the SELECT clause of a query. You can map the special value, $JOB_ID, to a field in the target object. The target field must be a lookup to the Background Operation standard object. In this case, the ID of the Background Operation object representing the Async SOQL query is inserted. If the target field is a text field, it must be at least 15–18 characters long. You can also include any field or alias in the SELECT clause of the TargetValueMap. They

574

37.0

Chatter REST API Developer Guide

Name

Attachment Input: Canvas App

Type

Description

Required or Optional

Available Version

can be combined together to concatenate a value to be used. targetExternalIdField String

The ID of the target sObject. Required for upsert Optional operations.

39.0

SEE ALSO: Async Query

Attachment Input: Canvas App Important: This request body isn’t available in version 32.0 and later. In version 32.0 and later, use Canvas Capability Input. XML In XML request bodies, attachmentType is an attribute of the element. TravelApp

JSON {"attachment" : { "attachmentType" : "Canvas", "developerName" : "TravelApp", "namespacePrefix" : "dev_org", "parameters" : "{"itinerary":"123"}", "height" : "250px", "title" : "TravelItinerary", } }

Properties Name

Type

Description

Available Version

attachmentType

String

The attachment type. Must contain the value Canvas.

29.0–31.0

description

String

Optional. The description of the canvas app.

29.0–31.0

developerName

String

The developer name (API name) of the canvas app

29.0–31.0

height

String

Optional. The height of the canvas app in pixels. Default height is 200 pixels.

29.0–31.0

namespacePrefix

String

Optional. The namespace prefix of the Developer Edition organization in which the canvas app was created.

29.0–31.0

575

Chatter REST API Developer Guide

Attachment Input: Existing Content

Name

Type

Description

Available Version

parameters

String

Optional. Parameters passed to the canvas app in JSON format. The 29.0–31.0 JSON must be escaped.

thumbnailUrl

String

Optional. The URL to a thumbnail image for the canvas app. Maximum dimensions are 120x120 pixels.

29.0–31.0

title

String

Optional. The title of the link used to call the canvas app.

29.0–31.0

Attachment Input: Existing Content Important: This request body isn’t available in version 32.0 and later. In version 32.0 and later, use Content Capability Input. XML In XML request bodies, attachmentType is an attribute of the element. 069...

JSON { "attachment": { "attachmentType":"ExistingContent", "contentDocumentId": "069D00000001FHF" } }

Properties Name

Type

Description

Available Version

attachmentType

String

The attachment type. Must contain the value ExistingContent.

27.0–31.0

contentDocumentId

String

ID of the existing content

23.0–31.0

Attachment Input: Feed Poll Important: This request body isn’t available in version 32.0 and later. In version 32.0 and later, use Poll Capability Input. XML Note that in XML, the choices for the poll are each wrapped in a element and attachmentType is an attribute of the element. For example: One

576

Chatter REST API Developer Guide

Attachment Input: Link

Two

JSON { "attachment": { "attachmentType":"Poll", "pollChoices": [ "Monday", "Tuesday" ] } }

Properties Name

Type

Description

Available Version

attachmentType

String

The attachment type. Must contain the value Poll.

27.0–31.0

pollChoices

String []

A list of choices used in the feed poll.

26.0–31.0

Attachment Input: Link Important: This request body isn’t available in version 32.0 and later. In version 32.0 and later, use Link Capability Input. XML The attachmentType property is an attribute of the element. For example: http://www.google.com A search engine

JSON { "attachment": { "attachmentType":"Link", "url": "http://www.salesforce.com", "urlName": "Salesforce" } }

Properties Name

Type

Description

Available Version

attachmentType

String

The attachment type. Must contain the value Link.

27.0–31.0

577

Chatter REST API Developer Guide

Attachment Input: New File Upload

Name

Type

Description

Available Version

url

String

URL included in the attachment.

23.0–31.0

urlName

String

Optional. Name of the URL. If not provided, a name is generated from the domain name of the URL.

23.0–31.0

Attachment Input: New File Upload Important: This request body isn’t available in version 32.0 and later. In version 32.0 and later, use Content Capability Input. To upload a new file, provide the binary file in a multipart/form-data body part where name="feedItemFileUpload". See Uploading Binary Files. XML The attachmentType property is an attribute of the element. For example: TPS Report (with cover) TPS.txt

JSON { "attachment": { "attachmentType":"NewFile", "description":"TPS Report (with cover)", "title":"TPS.txt" } }

Properties Name

Type

Description

Available Version

attachmentType

String

The attachment type. Must contain the value NewFile.

27.0–31.0

desc

String

Description of the file.

23.0–26.0

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

String

Optional. Description of the file.

27.0–31.0

title

String

Title of the file.

24.0–31.0

578

Chatter REST API Developer Guide

Banner Photo Input

Banner Photo Input A banner photo. Root XML tag

JSON example {

"cropHeight" : "120", "cropWidth" : "240", "fileId" : "069D00000001IOh"

}

Properties Name

Type

Description

Required or Optional

Available Version

cropHeight

Integer

Height of the crop rectangle in pixels.

Optional

36.0

cropWidth

Integer

Width of the crop rectangle in pixels.

Optional

36.0

cropX

Integer

X position of the crop rectangle from the Optional left edge of the image in pixels. Top left is position (0,0).

36.0

cropY

Integer

Y position of the crop rectangle from the Optional top edge of the image in pixels. Top left is position (0,0).

36.0

fileId

String

ID of an existing file. The key prefix must Required to use an be 069, and the file size must be less than existing file 8 MB.

36.0

Note: Images uploaded on the Group page and on the User page don’t have file IDs and therefore can’t be used. versionNumber Integer

Version number of an existing file. If not provided, the latest version is used.

Batch Collection Input Describes a collection of inputs for a batch request. JSON example { "inputs": [ { "richInput": { "subjectId": "me", "body": {

579

Optional

36.0

Chatter REST API Developer Guide

Batch Input

"messageSegments": [ { "type": "Text", "text": "Post Number 1" }] }, "feedElementType": "FeedItem" } }, { "richInput": { "subjectId": "me", "body": { "messageSegments": [ { "type": "Text", "text": "Post Number 2" }] }, "feedElementType": "FeedItem" } }] }

Properties Name

Type

Description

inputs

Batch Input[]

Collection of inputs (request bodies) Required to be processed together. Every Batch Input request body’s richInput property must contain the same type of request body.

Batch Input A single batch input to nest in a batch collection input. JSON example Example without a binary part: { "richInput": { "subjectId": "me", "body": { "messageSegments": [ { "type": "Text", "text": "Post Number 1" }] }, "feedElementType": "FeedItem"

580

Required or Optional

Available Version 32.0

Chatter REST API Developer Guide

Batch Input

} }

Example with a binary part: { "binaryPartNames": [ "bin1" ], "richInput": { "subjectId": "me", "body": { "messageSegments": [ { "type": "Text", "text": "Please accept this receipt" } ] }, "capabilities": { "content": { "description": "Receipt for expenses", "title": "receipt.pdf" } }, "feedElementType": "FeedItem" } }

In this example, the name parameter in the Content-Disposition header of the binary body part must have the value bin1. Properties Name

Type

binaryPartNames String[]

Description

Required or Optional

List of the name parameters in the Optional Content-Disposition header of the binary body parts to include with this input. If this value exists, the corresponding binary part must be included in the request. Note: When used with the /chatter/feed-elements/batch

resource, this property can contain only one value, not a list of values.

581

Available Version 32.0

Chatter REST API Developer Guide

Name

Type

Bookmarks Capability Input

Description

Required or Optional

An input body (request body) for the request. The Required richInput property must contain the request body that the resource expects.

richInput

Available Version 32.0

The /chatter/feed-elements/batch resource expects a Feed Item Input request body.

SEE ALSO: Batch Collection Input

Bookmarks Capability Input Create or update a bookmark on a feed element. Root XML tag true

JSON example { "isBookmarkedByCurrentUser": true }

Properties Name

Type

isBookmarked Boolean ByCurrentUser

Description

Required or Optional

Available Version

Specifies if the feed element should be bookmarked for the user (true) or not (false).

Required

32.0

SEE ALSO: Feed Element Capabilities Input

Canvas Capability Input Create or update a canvas app associated with a feed element. Root XML tag true true

582

Chatter REST API Developer Guide

Chatter Stream Input

JSON example { "developerName": "myNewApp", "title": "My New App" }

Properties Name

Type

Description

Required or Optional

Available Version

description

String

A description of the canvas app. The maximum size is 255 characters.

Optional

32.0

developerName String

The API name (developer name) of the connected app.

Required

32.0

String

The height of the canvas app in pixels.

Optional

32.0

A unique namespace prefix for the canvas Optional app.

32.0

height

namespacePrefix String

parameters

String

JSON parameters passed to the canvas app.

Optional

32.0

thumbnailUrl

String

A thumbnail URL to a preview image. The Optional maximum thumbnail size is 120 pixels by 120 pixels.

32.0

title

String

A title for the canvas link.

32.0

SEE ALSO: Feed Element Capabilities Input

Chatter Stream Input A Chatter feed stream. Root XML tag

JSON example { "description" : "Feeds from my management hierarchy.", "name" : "Managers Stream", "subscriptionsToAdd" : { "subscriptions" : [ {"entityId" : "00590000000Dk5F"}, {"entityId" : "00590000000Fk4M"}, {"entityId" : "00590000000Sy7N"}, {"entityId" : "00590000000Dk4H"}, {"entityId" : "00590000000Uk7L"}

583

Required

Chatter REST API Developer Guide

Clean Input

] } }

Properties Name

Type

Description

Required or Optional

Available Version

description

String

Description of the stream, up to 1,000 characters.

Optional

39.0

name

String

Name of the stream, up to 120 characters. Required when creating a stream (POST)

39.0

Optional when updating a stream (PATCH) subscriptions Stream Subscription List of up to 25 entities whose feeds are Input[] included in the stream. ToAdd

Optional

39.0

Optional when updating a stream (PATCH)

39.0

Adding an entity that is already added results in no operation. Including the same entity in subscriptionsToAdd and subscriptionsToRemove results in no operation. subscriptions Stream Subscription List of entities whose feeds are removed Input[] from the stream. ToRemove

Removing an entity that is already removed results in no operation. Including Not supported the same entity in when creating a subscriptionsToAdd and stream (POST) subscriptionsToRemove results in no operation.

Clean Input Defines a data integration rule, its type, and the records to update. JSON example { "cleanType":"bulk" "cleanRuleId":"07ixx000000000U" "requestId":"0Ysxx0000000004" "entityIds":["003xx000004TnDu", .... ] }

584

Chatter REST API Developer Guide

Comment Input

Properties Name

Type

Description

Required or Optional

Available Version

cleanRuleId

String

The 18-character ID of the data integration Required rule used to update records. Get the IDs for active rules from the Clean Rule Statuses resource.

37.0

cleanType

String

The system-generated type of update operation used by the data integration rule. One of these values:

Optional

37.0

• BulkClean—Updates all existing records applicable to the specified data integration rule. • Incremental—Updates only records that do not have a status of In Sync or Reviewed. • Manual—Manually updates records with the specified data integration rule. • Perpetual—Automatically updates saved records with the specified data integration rule. entityIds

String[]

The 18-character IDs of the records to update using the data integration rule.

Required

37.0

requestId

String

The system-generated ID of the update request.

Optional

37.0

Comment Input Root XML tag

JSON The following example attaches an existing file to a comment: { "body" : { "messageSegments" : [ { "text" : "FY14 Sales Projections", "type" : "Text" } ] }, "capabilities": {

585

Chatter REST API Developer Guide

Comment Input

"contentDocumentId":"069D00000001FHF" } }

Properties Name

Type

Description

Available Version

attachment

Depends on type.

Optional. Values are:

24.0–31.0

• Attachment Input: Existing Content • Attachment Input: New File Upload Important: As of version 32.0, use the capabilities property. body

Message Body Input

The body of the comment.

23.0

Feed item and comment bodies have a 10,000 character limit. Because this limit can change, we recommend that clients make a describeSObjects() call on the FeedItem or FeedComment object. To determine the maximum number of allowed characters, look at the length of the Body or CommentBody field. To edit this property in a comment, make a PATCH request to /chatter/comments/commentId. Editing comments is supported in version 34.0 and later. Rich text and inline images are supported in comment bodies in version 35.0 and later. capabilities

Comment Capabilities Input

SEE ALSO: Post a Comment Post a Comment and Include a File from Salesforce Post a Rich-Text Comment Post a Comment with a Code Block Post a Comment with an Inline Image Post an @Mention Post Multiple @Mentions Edit a Comment

586

Capabilities of the comment, such as a file attachment

32.0

Chatter REST API Developer Guide

Comment Capabilities Input

Comment Capabilities Input Root XML tag

Properties Name

Type

Description

Available Version

content

Content Capability Input

A file attachment.

32.0

SEE ALSO: Comment Input

Content Capability Input Create or update a file associated with a comment. To attach or remove files from a feed post (instead of a comment) in version 36.0 and later, use Files Capability Input. Root XML tag 069D00000001pyS

JSON example { "contentDocumentId": "069D00000001pyS" }

Properties Name

Type

contentDocumentId String

Description

Required or Optional

Available Version

ID of the existing content.

Required for existing 32.0 content Not supported for new content

description

String

Description of the file to be uploaded.

Optional for new content

32.0

Not supported for existing content sharingOption String

Sharing option of the file. Values are: • Allowed—Resharing of the file is allowed.

587

Optional

35.0

Chatter REST API Developer Guide

Name

Type

Custom List Audience Criteria Input

Description

Required or Optional

Available Version

Required for new content

32.0

• Restricted—Resharing of the file is restricted. title

String

Title of the file. This value is used as the file name for new content. For example, if the title is My Title, and the file is a .txt file, the file name is My Title.txt.

Not supported for existing content

SEE ALSO: Comment Capabilities Input Feed Element Capabilities Input

Custom List Audience Criteria Input The criteria for the custom list type of recommendation audience. Root XML tag

JSON example { "memberOperationType" : "Add", "members" : { "userIds" : [ "005B0000000Ge16", "005D0000001GpHp" ] }, "type" : "CustomList" }

Properties Name

Type

member String OperationType

Description

Required or Optional

Available Version

The operation to carry out on the audience Required to update 36.0 members. Values are: a recommendation • Add—Adds specified members to the audience audience. • Remove—Removes specified members from the audience.

588

Don’t use or specify null to create a recommendation audience

Chatter REST API Developer Guide

Datacloud Contact Import Input

Name

Type

Description

Required or Optional

members

User ID Collection Input

A collection of user IDs.

type

String

Value must be CustomList.

Available Version

Required to update 36.0 a recommendation When updating an audience, you can include up to 100 members. An audience audience can have up to 100,000 members, and Don’t use or specify each community can have up to 100 null to create a audiences. recommendation audience Required

36.0

SEE ALSO: Recommendation Audience Input

Datacloud Contact Import Input Input representation of the criteria for importing records as contacts or leads. Root XML tag

JSON Example Add Contact To add the records as contacts, include a parentAccountId. { "datacloudContactIds": [ 10344600,42701050,45995423 ], "parentAccountId":"09KR00000004C9rMAE" }

JSON Example Add Lead Without a parentAccountId, the records are added as leads. { "datacloudContactIds": [ 10344600,42701050,45995423 ] }

Properties Name

Type

Description

datacloudContactIds

String[]

A list of the contactIds to Required import. There can be from 1 up to 200 contactIds in a comma-separated list. Requests with more than 200 contacts fail.

36.0

parentAccountId

String

The accountId for the selected Optional account that is in your organization.

36.0

589

Required or Optional

Available Version

Chatter REST API Developer Guide

Datacloud Order Input

Datacloud Order Input A list of Data.com identification numbers that are used to purchase contacts or companies by a specific user type. Root XML tag

JSON example { "companyIds":[ "23456", "24548" ], "userType":"Monthly" }

Properties Name

Type

Description

Required or Optional

Available Version

companyIds String

The list of companies to purchase. If contactIds are Required to purchase included with companyIds, your purchase fails. companies

32.0

contactIds String

The list of contacts to purchase. If companyIds are included with contactIds, your purchase fails.

Required to purchase contacts

32.0

The Data.com user type.

Optional

32.0

userType

String

• Monthly—A user type that’s assigned monthly point limits for purchasing Data.com records. Only the assigned user can use monthly points. Points expire at the end of the month. Monthly is the default setting for DatacloudUserType. • Listpool—A user type that allows users to draw from a pool of points to purchase Data.com records.

Dashboard Component Snapshot Input Root XML tag

JSON { "parentId" : "0F9D00000000I4O", "feedItemBody" : { "messageSegments" : [ { "text" : "Sales Heat", "type" : "Text"

590

Chatter REST API Developer Guide

Digest Job Input

} ] } }

Properties Name

Type

Description

Available Version

parentId

String

A user, group, or dashboard ID to 25.0 which you are posting the snapshot.

filterId1

String

Optional. A dashboard filter item ID. 25.0

filterId2

String

Optional. A second dashboard filter item ID.

filterId3

String

Optional. A third dashboard filter item 25.0 ID.

feedItemBody

Message Body Input Contains the text that accompanies 25.0 the feed item associated with the dashboard component snapshot.

runningUserId

String

Optional. A user ID from which the view of the dashboard will be created, if other than the creator.

25.0

25.0

Digest Job Input Submit a daily or weekly Chatter email digest job. Root XML tag

JSON example { "period":"DailyDigest" }

Properties Name

Type

Description

Required or Optional

period

String

Specifies the period of time that is included Required in a Chatter email digest. Values are: • DailyDigest—The email includes up to the 50 latest posts from the previous day. • WeeklyDigest—The email includes up to the 50 latest posts from the previous week.

591

Available Version 37.0

Chatter REST API Developer Guide

Direct Message Capability Input

Direct Message Capability Input Create or update the members of a direct message. Root XML tag

JSON example { "membersToAdd": ["005R0000000I2X4","005R0000000I23Y","005R0000000IUV5"] }

Properties Name

Type

Description

Required or Optional

membersToAdd

String[]

List of user IDs for members to include in Required when the direct message. creating a direct message (POST)

Available Version 39.0

Optional when updating a direct message (PATCH) membersToRemove String[]

List of user IDs for members to remove from the direct message.

Optional when updating a direct message (PATCH)

40.0

Not supported when creating a direct message (POST) subject

String

Subject of the direct message.

Optional when creating a direct message (POST)

39.0

Not supported when updating a direct message (PATCH)

SEE ALSO: Feed Element Capabilities Input

Environment Hub SSO User Mapping Input Creates an SSO mapping between a user in an Environment Hub org and a user in an Environment Hub member org. Root XML tag

592

Chatter REST API Developer Guide

Extension Input

JSON example { "hubUserId":"005B0000000F6SNIA0", "memberUsername":"jeanSmith" }

Properties Name

Type

Description

Required or Optional

Available Version

hubUserId

String

The ID of a user in an Environment Hub organization.

Required

36.0

The username of a user in an Environment Required Hub member organization.

36.0

memberUsername String

SEE ALSO: Environment Hub SSO User Mapping Generator

Extension Input An extension. Root XML tag

JSON example { "alternativeRepresentation": { "textRepresentation": "Quip document with ID 132452345", "thumbnailUrl": "http://salesforce.quip.com?id=132452345", "title": "Quip" }, "extensionId": "id1", "payload": "eyJkb2N1bWVudF9pZCI6ICIxMjM0NSJ9", "payloadVersion": "0.1" }

Properties Name

Type

alternative Alternative Input Representation

Description

Required or Optional

Available Version

Alternative representation of the extension. Required

40.0

extensionId

String

ID of the extension.

Required

40.0

payload

String

Payload associated with the extension.

Required

40.0

593

Chatter REST API Developer Guide

Name

Type

payloadVersion String

Extensions Capability Input

Description

Required or Optional

Payload version that identifies the structure Optional of the payload associated with the extension.

Available Version 40.0

SEE ALSO: Extensions Capability Input

Extensions Capability Input Create or update extensions associated with a feed element. Root XML tag

JSON example { "itemsToAdd": { "items": [{ "extensionId": "extensionId1", "payload": "eyJkb2N1bWVudF9pZCI6ICIxMjM0NSJ9", "textRepresentation": "http://salesforce.quip.com?id=1234", "payloadVersion": "0.1" } ] }, "itemsToRemove": ["attachmentId2","attachmentId3"] }

Properties Name

Type

Description

Required or Optional

itemsToAdd

Extension Input[]

Collection of extensions to associate with Required for the feed element. creating an extension (POST) Optional for updating an extension (PATCH)

594

Available Version 40.0

Chatter REST API Developer Guide

Name

Type

itemsToRemove String[]

Feed Element Capabilities Input

Description

Required or Optional

List of attachment IDs to remove from the Optional for feed element. updating an extension (PATCH)

Available Version 41.0

Don’t specify for creating an extension (POST)

SEE ALSO: Feed Element Capabilities Input

Feed Element Capabilities Input A container for all capabilities that can be included when creating a feed element. In API version 30.0 and earlier, most feed items can have comments, likes, topics, and so on. In version 31.0 and later, every feed item (and feed element) can have a unique set of capabilities. If a capability property exists on a feed element, that capability is available, even if the capability property doesn’t have a value. For example, if the ChatterLikes capability property exists on a feed element (with or without a value), the context user can like that feed element. If the capability property doesn’t exist, it isn’t possible to like that feed element. A capability can also contain associated data. For example, the Moderation capability contains data about moderation flags. XML example 0Agxx00000000d1CAA 0Agxx00000000d2DFY false 069D00000001IOh 069D00000002IOg

JSON example "capabilities": { "associatedActions": {

595

Chatter REST API Developer Guide

Feed Element Capabilities Input

"actionLinkGroupIds":["0Agxx00000000d1CAA", "0Agxx00000000d2DFY"] }, "bookmarks": { "isBookmarkedByCurrentUser": false }, "files": { "items": [ {"id": "069D00000001IOh"}, {"id": "069D00000002IOg"} ] } }

Properties Name

Type

Description

Required or Optional

Available Version

associated Actions

Associated Actions Capability Input

Describes action links that can be created Optional or updated on a feed element. To associate an action link group with a feed element, the client must be the same connected app that created the action link group definition and the user must either be the user who created the definition or have View all Data permission.

31.0

bookmarks

Bookmarks Capability Input

Create or update a bookmark on a feed element.

Optional

32.0

canvas

Canvas Capability Input

Create or update a canvas app associated Optional with a feed element.

32.0

content

Content Capability Input

Attach or update a file on a comment. Use Optional this class to attach a new file or update a file that has already been uploaded to Salesforce.

32.0–35.0

Important: This request body isn’t available for feed posts in version 36.0 and later. In version 36.0 and later, use Files Capability Input. directMessage Direct Message

extensions

Create or update the members of a direct Optional message.

39.0

Capability Input Extensions Capability Input

Create or update extensions associated with a feed element.

Optional

40.0

Share a feed entity with a feed element.

Optional

39.0

feedEntityShare Feed Entity Share

Capability Input

596

Chatter REST API Developer Guide

Feed Entity Share Capability Input

Name

Type

Description

Required or Optional

Available Version

files

Files Capability Input

Attach up to 10 files that have already been uploaded or remove one or more files from a feed element.

Optional

36.0

link

Link Capability Input Create or update a link attached to a feed Optional element.

32.0

poll

Poll Capability Input Create, update, or vote on a poll attached Optional to a feed element.

32.0

questionAnd Answers

Question and Create or edit a question feed element or Optional Answers Capability set the best answer of the existing Input question feed element.

32.0

topics

Topics Capability Input

Optional

38.0

Required or Optional

Available Version

Assign topics to a feed element.

SEE ALSO: Edit a Question Title and Post Feed Item Input

Feed Entity Share Capability Input Share a feed entity with a feed element. Root XML tag

JSON example { "feedEntityId" : "0D5B000000QEfX4" }

Properties Name

Type

Description

feedEntityId

String

ID of the feed entity to share with the feed Required element.

SEE ALSO: Feed Element Capabilities Input

597

39.0

Chatter REST API Developer Guide

Feed Favorite Input

Feed Favorite Input Root XML tag

JSON for POST { "searchText" : "release", "targetId" : "0TOD0000000099d" }

Properties for POST Name

Type

Description

Available Version

searchText

String

Text of the feed search. Use this 24.0 parameter for feed searches only.

targetId

String

Id of the topic. Use this parameter for topics only.

28.0

JSON for PATCH { "updateLastViewDate" : "true" }

Properties for PATCH Name

Type

Description

Available Version

updateLastViewDate

Boolean

Sets the last view date of the specified feed favorite to the current system time. Default value is false.

24.0

Feed Item Input Root XML tag

JSON The following example attaches a poll to a feed item: { "body":{ "messageSegments":[ { "type":"Text", "text":"When should we meet for release planning?" }

598

Chatter REST API Developer Guide

Feed Item Input

] }, "capabilities":{ "poll":{ "choices":[ "Monday", "Tuesday" ] } }, "feedElementType":"FeedItem", "subjectId":"me" }

Properties Name

Type

Description

Required or Optional Available Version

attachment

Depends on type.

You can specify only one of these Optional values in the attachment parameter. Values are: • Attachment Input: Canvas App (v29.0–31.0) • Attachment Input: Existing Content (v23.0–31.0) • Attachment Input: Feed Poll (v26.0–31.0) • Attachment Input: Link (v23.0–31.0) • Attachment Input: New File Upload (v23.0–31.0) Important: As of API version 32.0, use the capabilities property.

body

Message Body Input

Description of message body. Feed item and comment bodies have a 10,000 character limit. Because this limit can change, we recommend that clients make a describeSObjects() call on the FeedItem or FeedComment object. To determine the maximum number of allowed characters, look at the length of the Body or CommentBody field. The body can contain up to 25 mentions.

599

Required unless the feed 23.0 item has a content capability or a link capability

Chatter REST API Developer Guide

Name

Feed Item Input

Type

Description

Required or Optional Available Version

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

To edit this property in a feed item, make a PATCH request to /chatter/feed-elements /feedElementId. Editing feed

posts is supported in version 34.0 and later. capabilities

Feed Element Capabilities Input

The capabilities that define the behavior of this feed element.

Optional

isBookmarked ByCurrentUser

Boolean

Specifies whether to bookmark the Optional new feed item for the user (true) or not (false). The default value is false.

31.0 24.0–31.0

Important: As of API version 32.0, use the capabilities.bookmarks. isBookmarkedByCurrentUser

property. feedElementType String

The type of feed element this input Required represents.

31.0

The only valid value is FeedItem. originalFeed ElementId

String

To share a feed element, specify its 18-character ID.

Optional

31.0–38.0

Optional

24.0–31.0

Note: You can’t share a post and upload a file in the same request body. Important: In API version 39.0 and later, use the capabilities.feedEntity Share.feedEntityId

property. originalFeedItemId String

To share a feed item, specify its 18-character ID. Important: In API version 32.0–38.0, use the

600

Chatter REST API Developer Guide

Name

Feed Item Input

Type

Description

Required or Optional Available Version

originalFeedElementId

property. In API version 39.0 and later, use the capabilities.feedEntity Share.feedEntityId

property. subjectId

String

The ID of the parent this feed Required element is being posted to. This value can be the ID of a user, group, or record, or the string me to indicate the context user.

601

31.0

Chatter REST API Developer Guide

Feed Item Input

Name

Type

Description

Required or Optional Available Version

visibility

String

Who can see the post. Valid values are:

Optional

• 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, group, or direct message, the visibility of the feed item must be AllUsers.

602

26.0

Chatter REST API Developer Guide

Feed Item Topic Input

SEE ALSO: Post a Feed Item Post a Feed Element and Include Files from Salesforce Post a Rich-Text Feed Element Post a Feed Element with a Code Block Post a Feed Element with an Inline Image Post an @Mention Post Multiple @Mentions Define Action Links and Post with a Feed Element Define Action Links in a Template and Post with a Feed Element Edit a Feed Post Edit a Question Title and Post Share a Feed Item Post to a Group

Feed Item Topic Input Root XML tag

JSON The following example attaches a new topic to a feed item: { "topicName": "W3C" }

Properties Name

Type

Description

Required or Optional

Available Version

topicId

String

ID of an existing topic

Required for existing topics if the 29.0 topicName property isn’t used

topicName

String

Name of a new or existing topic, Required for new topics; required 29.0 up to 150 characters for existing topics if the topicId property isn’t used

Feed Poll Input Important: This request body isn’t available in version 32.0 and later. In version 32.0 and later, use Poll Capability Input. Root XML tag

603

Chatter REST API Developer Guide

File Input

Properties Name

Type

Description

Available Version

myChoiceId

String

ID of an existing choice on the 26.0–31.0 feed poll. Used to specify the ID of the poll choice that the context user is voting on.

File Input Describes a new file input. To upload a file, provide the binary file in a multipart/form-data body part where name="fileData". See Uploading Binary Files. Root XML tag

JSON { "desc":"Employee Survey Results", "title":"emp_surv_results" }

Properties Name

Type

Description

content ModifiedDate

Date

File-specific last modified date that can be Optional used to set a client-side modified date.

32.0

desc

String

Description of the file to be uploaded.

Optional

24.0

Specifies whether to include permission information, such as whether the file is shared and what are the available permission types, for external files.

Optional

35.0

isInMyFileSync Boolean

true if the file is synced with Salesforce Optional Files Sync; false otherwise.

31.0

isMajorVersion Boolean

true if the file is a major version; false Optional

31.0

includeExternal Boolean FilePermissions Info

Required or Optional

Available Version

This property can be used with POST requests to /connect/files/users/userId,

but not with POST requests to /connect/files/fileId.

if the file is a minor version. Major versions can’t be replaced. parentFolderId String

ID of the containing folder.

604

Optional

31.0

Chatter REST API Developer Guide

File Input

Name

Type

Description

Required or Optional

Available Version

repository FileId

String

ID of the external file.

Optional

32.0

Optional

39.0

ID of the external data source.

Required if

32.0

This property can be used with POST requests to

repositoryFileId

This property can be used with POST requests to /connect/files/users/userId,

but not with POST requests to /connect/files/fileId.

If you specify repositoryFileId, don’t specify repositoryFileUri. repository FileUri

String

URI of the external file, such as https://drive.google.com/file/d/ 0B7a_ei8brT1TMy1CQ0o5NmZQNEE/view.

This property can be used with POST requests to /connect/files/users/userId,

but not with POST requests to /connect/files/fileId.

If you specifyrepositoryFileUri, don’t specify repositoryFileId. repositoryId

String

is specified. /connect/files/users/userId, Otherwise, Optional. but not with POST requests to /connect/files/fileId. reuseReference Boolean

Specifies whether to reuse the latest version of a reference you own to an external file rather than creating a duplicate reference.

Optional

36.0

Optional

35.0

This property can be used with POST requests to /connect/files/users/userId,

but not with POST requests to /connect/files/fileId. sharingOption String

Sharing option of the file. Values are: • Allowed—Resharing of the file is allowed. • Restricted—Resharing of the file is restricted.

605

Chatter REST API Developer Guide

Name

Type

sharingPrivacy String

File ID Input

Description

Required or Optional

Available Version

Specifies the sharing privacy of a file. Values are:

Optional

41.0

Optional

24.0

Required or Optional

Available Version

• None—File is visible to anyone with record access. • PrivateOnRecords—File is private on records. title

String

Title of the file.

SEE ALSO: Folder Item Input

File ID Input Attach a file that has already been uploaded or remove a file from a feed element. XML example 069D00000001IOh

JSON example { "id": "069D00000001IOh", "operationType": "add" }

Properties Name

Type

Description

id

String

ID of a file that has already been uploaded. Required

606

36.0

Chatter REST API Developer Guide

Name

Type

operationType String

Files Capability Input

Description

Required or Optional

Specifies the operation to carry out on the Optional file. Values are: If not specified, defaults to Add. • Add—Adds the file to the feed element. • Remove—Removes the file from the feed element. Remove operations are processed before Add operations. Adding content that is

already added and removing content that is already removed result in no operation.

SEE ALSO: Files Capability Input

Files Capability Input Attach up to 10 files that have already been uploaded or remove one or more files from a feed element. XML example 069D00000001IOh 069D00000002IOg

JSON example { "items": [ { "id": "069D00000001IOh", "operationType": "add" }, { "id": "069D00000002IOg", "operationType": "add" } ] }

607

Available Version 36.0

Chatter REST API Developer Guide

File Shares Input

Properties Name

Type

Description

Required or Optional

items

File ID Input[]

A collection of file IDs and the operations Required to be carried out on the files.

Available Version 36.0

SEE ALSO: Feed Element Capabilities Input

File Shares Input Root XML tag

JSON example { "message": "I shared a document with you.", "shares": [ { "id": "005D0000001Az4l", "sharingType": "V" }, { "id": "005D0000001B2ny", "sharingType": "C" } ] }

Properties Name

Type

Description

Available Version

message

String

Private message body that’s sent to the recipients. If Salesforce Communities is enabled, an email is sent instead of a private message.

30.0

shares

Share Input[]

Collection of Share Input request bodies

30.0

Files Connect Field Value Input The fields of the item type. Root XML tag

JSON example { "name" : "title", "value" : "Content Hub Simple Create Specs" }

608

Chatter REST API Developer Guide

Files Connect Item Input

Properties Name

Type

Description

Required or Optional

Available Version

name

String

Name of the field.

Required

35.0

value

String

Value of the field.

Required

35.0

SEE ALSO: Files Connect Item Input

Files Connect Item Input The item type ID and fields of the item type. Root XML tag

JSON example { "itemTypeId" : "file", "fields" : [ { "name" : "name", "value" : "Content Hub Simple Create Specs" }, { "name" : "description", "value" : "Document explaining the various connect api endpoints required for simple create" }] }

Properties Name

Type

Description

Required or Optional

fields

Files Connect Field Value Input[]

List of fields for the item to be created.

Required to create a 35.0 SharePoint file in a repository because the file name is required; otherwise optional

itemTypeId

String

ID of the item type.

Required to create a 35.0 file in a repository

609

Available Version

Chatter REST API Developer Guide

Files Connect Permission Collection Input

Files Connect Permission Collection Input A collection of permissions to apply or remove. Root XML tag

JSON example { "permissionsToApply": [ { "directoryEntryId" : "permissionTypesIds" } ], "permissionsToRemove": [ { "directoryEntryId" : "permissionTypesIds" } ] }

"Anyone", : ["CanView"]

"AnyoneInMyDomain", : ["CanDelete","CanEdit"]

Properties Name

Type

Description

Required or Optional

Available Version

permissions ToApply

Files Connect Permission Input[]

List of permissions to apply to the file.

Required if

35.0

permissions ToRemove isn’t

specified permissions ToRemove

Files Connect Permission Input[]

List of permissions to remove from the file. Required if permissions ToApply isn’t

specified

Files Connect Permission Input A permission. Root XML tag

JSON example { "directoryEntryId" : "AnyoneInMyDomain", "permissionTypesIds" : ["CanView","CanEdit"] }

610

35.0

Chatter REST API Developer Guide

Folder Input

Properties Name

Type

Description

Required or Optional

Available Version

directory EntryId

String

ID of the user or group.

Required

35.0

permission TypesIds

String[]

List of IDs of the permission types.

Required

35.0

SEE ALSO: Files Connect Permission Collection Input

Folder Input Root XML tag

JSON example { "path" : "my_documents/my_folder" }

Properties Name

Type

Description

Available Version

isInMyFileSync

Boolean

true if the folder and all folders in this folder are synced with Salesforce Files Sync; false otherwise.

33.0

Setting isInMyFileSync is valid only for the root folder. Once set to true, isInMyFileSync can’t be set to false. name

String

The name of the folder.

30.0

Either path or name is required. If you specify both, path is used and name is ignored. parentFolderId

String

The ID of the parent folder. Either parentFolderId or path is required. You can’t include both.

611

30.0

Chatter REST API Developer Guide

Folder Item Input

Name

Type

Description

Available Version

path

String

The path of the folder. For example, my documents/folder.

30.0

SEE ALSO: Folder Item Input

Folder Item Input Root XML tag

JSON example { "file" : { "desc" : "Yearly Report for Universal Containers Box Division", "title" : "Yearly.txt" }, "type" : "File" }

Properties Name

Type

Description

Required or Optional

Available Version

file

File Input

A file in a folder

Required to POST a File

30.0

folder

Folder Input

A folder in a folder

Required to POST a Folder

30.0

type

String

The item type. One of these Required values: • File • Folder

Following Input Root XML tag

612

30.0

Chatter REST API Developer Guide

Generic Batch Collection Input

Properties Name

Type

Description

Available Version

subjectId

String

The ID of the record you want 23.0 to follow, such as a user ID or Topic IDs are available in 29.0 file ID. Note: Use Group Member Input for adding members to groups.

SEE ALSO: Follow a Record

Generic Batch Collection Input Root XML Tag

JSON { "batchRequests" : [ { "method" : "Get", "url" : "/v41.0/chatter/feeds/news/me" }, { "method" : "Get", "url" : "/v41.0/chatter/feeds/user-profile/me" } ] }

Properties Name

Type

Description

batchRequests

Generic Batch Input[]

Collection of Batch Request Input request bodies 28.0 containing the subrequest URLs to execute.

613

Available Version

Chatter REST API Developer Guide

Generic Batch Input

Name

Type

Description

Available Version

haltOnError

Boolean

Controls whether Salesforce stops processing subrequests if a subrequest fails. The default value is false.

28.0

If the value is false and a subrequest in the batch does not complete, Salesforce attempts to execute subsequent subrequests in the batch. If the value is true and a subrequest in the batch doesn’t complete due to an HTTP response in the 400 or 500 range, Salesforce halts execution. It doesn’t attempt to execute subsequent subrequests in the batch. It returns an HTTP 412 status code and a BATCH_PROCESSING_HALTED error message for each subsequent subrequest indicating that a previous request was unsuccessful. The top-level request to /connect/batch returns HTTP 200, and the hasErrors property in the response is set to true. Note: Before subrequests are executed, Salesforce verifies that the entire request, including subrequests, is formed properly. If it isn't, Salesforce returns an HTTP 400 Bad Request and doesn't execute subrequests, regardless of the value of haltOnError. Examples of a bad request are a subrequest using the wrong method or having an error in its URL.

SEE ALSO: Like a Feed Item and Return the Total Number of Likes

Generic Batch Input Root XML Tag

JSON { "method" : "Get", "url" : "/v28.0/chatter/feeds/news/me" }

614

Chatter REST API Developer Guide

Generic Batch Input

Properties Name

Type

Description

Available Version

binaryPartName

String

The name of the binary part in the multipart request.

28.0

When there are multiple binary parts uploaded in one batch request, this value is used to map a request to its binary part. To prevent name collisions, use a unique value for each binaryPartName property in a batch request. This property is optional. If this value exists, a binaryPartNameAlias value must also exist. binaryPartNameAlias

String

The name parameter in the Content-Disposition 28.0 header of the binary body part. Different resources expect different values. See Uploading Binary Files. This property is optional. If this value exists, a binaryPartName value must also exist.

method

String

One of these HTTP methods:

28.0

• HttpDelete—Returns HTTP 204 on success. Response body or output class is empty. • HttpGet—Returns HTTP 200 on success. • HttpHead—Returns HTTP 200 on success. Response body or output class is empty. • HttpPatch—Returns HTTP 200 on success or HTTP 204 if the response body or output class is empty. • HttpPost—Returns HTTP 201 on success or HTTP 204 if the response body or output class is empty. Exceptions are the batch posting resources and methods, which return HTTP 200 on success. • HttpPut—Return HTTP 200 on success or HTTP 204 if the response body or output class is empty. The input body for the request.

richInput

The type depends on the request specified in the url property.

615

28.0

Chatter REST API Developer Guide

Name

Group Chatter Settings Input

Type

Description

Available Version

This property is optional. url

String

The Chatter API resource to request. This value 28.0 is called a subrequest. The subrequest URL can start with: • /services/data/version, for example, /services/data/v41.0 /chatter/users/me. • /version, for example, /v41.0/chatter/users/me. The version number must be less than or equal to the version of the request given to the /connect/batch request URL.

Additional information about subrequests: • The URL can include any query string parameters that the subrequest supports. The query string must be URL-encoded. • You can use parameters to filter response bodies. • You cannot apply headers at the subrequest level.

SEE ALSO: Generic Batch Collection Input

Group Chatter Settings Input Root XML tag

Properties A user’s Chatter settings. Name

Type

Description

emailFrequency

String

The frequency with which a group member 27.0 receives email from a group. Valid values are: • EachPost • DailyDigest • WeeklyDigest

616

Available Version

Chatter REST API Developer Guide

Name

Group Information Input

Type

Description

Available Version

• Never In communities, the Email on every post option is disabled once more than 10,000 members choose this setting for the group. All members who had this option selected are automatically switched to Daily digests.

Group Information Input JSON { "text" : "Post questions about the API.", "title" : "API Questions" }

Properties Name

Type

Description

text

String

The text in the “Information” section of the 28.0 group. HTML is not supported. The maximum length is 4000 characters (bytes).

title

String

The title in the “Information” section of the 28.0 group. The maximum length is 240 characters (bytes).

SEE ALSO: Group Input

Group Input Root XML Tag

JSON { "announcement" : "0D5D0000000K4XT", "canHaveChatterGuests" : "true", "description" : "This group is building a powerful API.", "information" : { "text" : "Read this section before you post to the group.",

617

Available Version

Chatter REST API Developer Guide

Group Input

"title" : "Information" }, "isArchived" : "false", "isAutoArchiveDisabled" : "false", "name" : "Chatter API", "owner" : "00590000000DmPw", "visibility" : "PublicAccess" }

Properties Name

Type

Description

Available Version

announcement

String

An announcement ID.

31.0

An announcement displays in a designated location in the Salesforce UI until 11:59 p.m. on its expiration date, unless it’s deleted or replaced by another announcement. canHaveChatterGuests Boolean

true if this group allows Chatter 29.0 customers, false otherwise. After this property is set to true, it cannot be set to false.

description

String

The “Description” section of the group

29.0

information

Group Information Input

The “Information” section of the groupIf the 28.0 group is private, the “Information” section is visible only to members. The “Description” section is visible to everyone.

isArchived

Boolean

true if the group is archived, false otherwise. Defaults to false.

29.0

isAutoArchiveDisabled Boolean

true if automatic archiving is turned off 29.0 for the group, false otherwise. Defaults to false.

isBroadcast

Boolean

true if only group owners and managers 36.0 can create posts in the group, false otherwise. Defaults to false.

name

String

The name of the group

owner

String

The ID of the group owner. This property is 29.0 available for PATCH requests only.

618

29.0

Chatter REST API Developer Guide

Group Member Input

Name

Type

Description

Available Version

visibility

String

Specifies the group visibility type. One of the 29.0 following values: • PrivateAccess—Only members of the group can see posts to this group. • PublicAccess—All users within the community can see posts to this group. • Unlisted—Reserved for future use.

SEE ALSO: Create a Group

Group Member Input Root XML tag

JSON example { "role" : "GroupManager", "userId" : "005B0000000Ge16" }

Properties Name

Type

Description

Available Version

role

String

The role of the member. One of 29.0 these values: • GroupManager • StandardMember

userId

String

The user ID of the member to be added to the group.

SEE ALSO: Join a Group

Group Membership Request Update Root XML tag

619

23.0

Chatter REST API Developer Guide

Group Record Input

Properties Name

Type

Description

Available Version

responseMessage

String

Use this property to provide a message to the 27.0 user if their membership request is declined. The value of this property is used only when the value of the status property is Declined. The maximum length is 756 characters.

String

status

Valid values:

27.0

• Accepted • Declined

SEE ALSO: Approve or Reject a Request to Join a Private Group

Group Record Input Record to add to a Chatter group. Root XML tag

JSON example {"recordId" : "001D000000Io9cD"}

Properties Name

Type

Description

Required or Optional

Available Version

recordId

String

ID of the record.

Required

34.0

Invite Collection Input An invitation. Root XML tag

JSON example { "invitees" : { "emails": [ "[email protected]", "[email protected]"

620

Chatter REST API Developer Guide

Link Capability Input

] }, "message" : "Join this group to participate in the discussion about your favorite feature." }

Properties Name

Type

Description

Required or Optional

Available Version

invitees

String[]

List of email addresses to send the invitation to.

Required

39.0

message

String

Message to include in the invitation.

Optional

39.0

Link Capability Input Create or update a link attached to a feed element. Root XML tag http://www.example.com Example

JSON example { "url": "http://www.example.com", "urlName": "Example" }

Properties Name

Type

Description

Required or Optional

Available Version

url

String

URL of the link.

Required

32.0

urlName

String

Name of the link.

Optional

32.0

SEE ALSO: Feed Element Capabilities Input

Managed Topic Input A managed topic. Root XML tag

621

Chatter REST API Developer Guide

Managed Topic Input

JSON example using recordId This example creates a managed topic from an existing standard topic (using the recordId of the standard topic). It also creates a topic hierarchy by assigning a parent topic with the parentId. { "managedTopicType":"Navigational", "parentId": "0mtR000000001KLIAY", "recordId":"0TOD00000000cwk" }

JSON example using name This example creates a new managed topic by name and creates a topic hierarchy by assigning a parent topic with the parentId. { "name":"Child Topic", "managedTopicType":"Navigational", "parentId":"0mtR000000001KLIAY" }

Properties Name

Type

Description

Required or Optional

Available Version

managedTopic Type

String

Type of managed topic.

Required

32.0

Required for new topics

32.0

• Featured—Topics that are featured, for example, on the community home page, but don’t provide overall navigation. • Navigational—Topics that display in a navigational menu in the community. A topic can be associated with up to two managed topic types, so a topic can be both a Featured topic and a Navigational topic. You can create up to 25 managed topics per managedTopicType. To create a child managed topic, specify Navigational as the managedTopicType and specify a parentId.

name

String

Name of the managed topic.

You must specify either name or recordId. You can’t specify both.

622

Chatter REST API Developer Guide

Managed Topic Position Collection Input

Name

Type

Description

Required or Optional

Available Version

parentId

String

ID of the parent managed topic.

Optional

35.0

If you specify a parentId, also specify Navigational as the managedTopicType. You can create up to three levels (parent, direct children, and their children) of managed topics and up to 10 children managed topics per managed topic. recordId

String

ID of the record to become a managed topic. In version 32.0, recordId must be a topic ID.

SEE ALSO: Create a Topic Hierarchy in Communities

Managed Topic Position Collection Input A collection of relative positions of managed topics. Root XML tag

JSON example { "managedTopicPositions" : [ { "managedTopicId" :"0mtD0000000001aIAA", "position" :"0" }, { "managedTopicId" :"0mtD0000000002qIAA", "position" :"2" } ] }

623

Required for existing 32.0 topics if the Name property isn’t used You must specify either name or recordId. You can’t specify both.

Chatter REST API Developer Guide

Managed Topic Position Collection Input

Properties Name

Type

Description

Required or Optional

managedTopic Positions

Managed Topic Position Input[]

Collection of managed topic position Required request bodies. This collection can include Featured and Navigational managed topics and doesn’t have to include all managed topics. If you don’t include all managed topics in managedTopicPositions, the managed topics are reordered by respecting the positions indicated in managedTopicPositions. Any managed topics that aren’t included in managedTopicPositions are pushed down to the next available position. See Reorder managed topics example.

Reorder managed topics example If you have these managed topics: Managed Topic

Position

ManagedTopicA

0

ManagedTopicB

1

ManagedTopicC

2

ManagedTopicD

3

ManagedTopicE

4

And you reorder managed topics by including this information in Managed Topic Position Collection Input: Managed Topic

Position

ManagedTopicD

0

ManagedTopicE

2

The result is: Managed Topic

Position

ManagedTopicD

0

624

Available Version 32.0

Chatter REST API Developer Guide

Managed Topic Position Input

Managed Topic

Position

ManagedTopicA

1

ManagedTopicE

2

ManagedTopicB

3

ManagedTopicC

4

Managed Topic Position Input The relative position of a managed topic. Root XML tag

JSON example { "managedTopicId" :"0mtD0000000001aIAA", "position" :"0" }

Properties Name

Type

managedTopicId String position

Integer

Description

Required or Optional

Available Version

ID of existing managed topic.

Required

32.0

Relative position of the managed topic, indicated by zero-indexed, ascending whole numbers.

Required

32.0

SEE ALSO: Managed Topic Position Collection Input

625

Chatter REST API Developer Guide

Message Body Input

Message Body Input Name

Type

Description

Available Version

messageSegments

Segments[]

Collection of message segments, 23.0 based on type. Segments can be one of the following: • Message Segment Input: Hash Tag • Message Segment Input: Inline Image (version 35.0 and later) • Message Segment Input: Link • Message Segment Input: Markup Begin (version 35.0 and later) • Message Segment Input: Markup End (version 35.0 and later) • Message Segment Input: Mention • Message Segment Input: Text

SEE ALSO: Edit a Comment Edit a Feed Post Edit a Question Title and Post Announcement Input Comment Input Dashboard Component Snapshot Input Feed Item Input User Status Input

Message Segment Input: Hash Tag Represents an inline hash tag. The use of this segment is optional because hash tags are also parsed out of Text segments.

626

Chatter REST API Developer Guide

Message Segment Input: Inline Image

Name

Type

Description

Available Version

tag

String

Text of the hash tag without the 23.0 hash tag. Multiple word hash tags are available in version 28.0. Note: Closing square brackets ( ] ) are not supported in hash tag text. If the text contains a closing square bracket ( ] ), the hash tag ends at the bracket.

String

type

Value is Hashtag.

23.0

SEE ALSO: Message Body Input

Message Segment Input: Inline Image An inline image segment. Properties Name

Type

Description

Required or Optional

Available Version

altText

String

Alt text for the inline image.

Optional

35.0

If not specified, the title of the inline image file is used as the alt text. fileId

String

ID of the inline image file.

Required

35.0

type

String

Value is InlineImage.

Required

35.0

SEE ALSO: Message Body Input

Message Segment Input: Link Represents an inline link to a URL. If a link is provided as input without whitespace text before it, a space is inserted. If a link is provided as input without whitespace text after it, a space is inserted. The use of this segment is optional because links are also parsed out of Text segments.

627

Chatter REST API Developer Guide

Message Segment Input: Markup Begin

Name

Type

Description

Available Version

type

String

Value is Link.

23.0

url

URL

URL to be used for the link.

23.0

SEE ALSO: Message Body Input

Message Segment Input: Markup Begin The beginning tag for rich text markup. Properties Name

Type

Description

Required or Optional

Available Version

markupType

String

Specifies the type of rich text markup.

Required

35.0

Required

35.0

• Bold—Bold tag. • Code—Code tag. • Italic—Italic tag. • ListItem—List item tag. • OrderedList—Ordered list tag. • Paragraph—Paragraph tag. • Strikethrough—Strikethrough tag. • Underline—Underline tag. • UnorderedList—Unordered list tag. Markup segments with a markupType of Code can include only text segments. type

String

Value is MarkupBegin.

SEE ALSO: Message Body Input

Message Segment Input: Markup End The end tag for rich text markup.

628

Chatter REST API Developer Guide

Message Segment Input: Mention

Properties Name

Type

Description

Required or Optional

Available Version

markupType

String

Specifies the type of rich text markup.

Required

35.0

Required

35.0

• Bold—Bold tag. • Code—Code tag. • Italic—Italic tag. • ListItem—List item tag. • OrderedList—Ordered list tag. • Paragraph—Paragraph tag. • Strikethrough—Strikethrough tag. • Underline—Underline tag. • UnorderedList—Unordered list tag. type

String

Value is MarkupEnd.

SEE ALSO: Message Body Input

Message Segment Input: Mention Represents an inline mention of a user or group. When creating a feedpost or comment, you can include up to 25 mentions. Name

Type

Description

Available Version

id

String

ID of the user or group to mention.

23.0 Groups are available in 29.0.

To mention a user, use either id or username. You can’t include both. To mention a group, you must use id. type

String

Value is Mention.

629

23.0

Chatter REST API Developer Guide

Message Segment Input: Text

Name

Type

Description

Available Version

username

String

User name of the user to mention.

38.0

To mention a user, use either id or username. You can’t include both.

SEE ALSO: Message Body Input

Message Segment Input: Text Represents plain inline text. Text that looks like a link and is surrounded by space is converted into a link segment. Text prefixed with a hash and surrounded by square brackets ([]) is converted into a hash tag segment. Multiple word hash tags are available in version 28.0 and higher. Name

Type

Description

Available Version

text

String

Plain text for this segment.

23.0

type

String

Only value is Text.

23.0

SEE ALSO: Edit a Comment Edit a Feed Post Edit a Question Title and Post Message Body Input

Moderation Flag Input A moderation flag. Root XML tag

JSON { "note" : "Flagged by moderator as spam on 6.6.16.", "type" : "FlagAsSpam", "visibility" : "ModeratorsOnly" }

630

Chatter REST API Developer Guide

Mute Capability Input

Properties Name

Type

Description

Required or Optional Available Version

note

String

A note of up to 4,000 characters about the Optional flag.

38.0

type

String

Specifies the type of moderation flag.

Optional

38.0

• FlagAsInappropriate—Flag for inappropriate content.

If not specified,

• FlagAsSpam—Flag for spam.

FlagAs Inappropriate is

the default value. String

visibility

Specifies the visibility behavior of a flag for Optional various user types.

30.0

• ModeratorsOnly—The flag is visible only to users with moderation permissions on the flagged element or item. • SelfAndModerators—The flag is visible to the creator of the flag and to users with moderation permissions on the flagged element or item.

Mute Capability Input Mute or unmute a feed element. Root XML tag

JSON example { "isMutedByMe": true }

Properties Name

Type

Description

Required or Optional

isMutedByMe

Boolean

Indicates whether the feed element is Required muted for the context user. Default value is false.

New User Audience Criteria Input The criteria for the new members type of recommendation audience.

631

Available Version 35.0

Chatter REST API Developer Guide

Notification Member Input

Root XML tag

JSON example { "value":"30", "type":"MaxDaysInCommunity" }

Properties Name

Type

Description

Required or Optional

Available Version

value

Double

The maximum number of days since a user Required became a community member. For example, if you specify 30, anyone who became a community member in the last 30 days is included in the new members audience.

36.0

type

String

Value must be

Required

36.0

Required or Optional

Available Version

MaxDaysInCommunity.

SEE ALSO: Recommendation Audience Input

Notification Member Input A notification member. Root XML tag

JSON example { "notificationFrequency":"EachPost" }

Properties Name

Type

Description

notification Frequency

String

Specifies the frequency with which a user Required receives email. In version 38.0 and later, EachPost is the only valid value.

632

38.0

Chatter REST API Developer Guide

Photo Input

Photo Input Describes a photo input. Root XML tag

JSON example {

"cropSize" : "120", "cropX" : "0", "cropY" : "0", "fileId" : "069D00000001IOh"

}

Properties Name

Type

Description

Required or Optional

Available Version

cropSize

Integer

The length, in pixels, of any edge of the crop square.

Required to crop an uploaded file 29.0 or an existing file.

cropX

Integer

The position X, in pixels, from the left Required to crop an uploaded file 29.0 edge of the image to the start of the or an existing file. crop square. Top left is position (0,0).

cropY

Integer

The position Y, in pixels, from the top Required to crop an uploaded file 29.0 edge of the image to the start of the or an existing file. crop square. Top left is position (0,0).

fileId

String

18–character ID of an existing file. The Required to choose an existing file. 25.0 key prefix must be 069 and the file size must be less than 2 GB. Note: Images uploaded on the Group page and on the User page don’t have file IDs and therefore can’t be used.

versionNumber

Integer

Version number of an existing file. If not provided, the latest version is used.

SEE ALSO: Update and Crop a Group Photo Update and Crop a User Photo Create and Schedule Custom Recommendations with Audiences

Pin Capability Input (Beta) Pin or unpin a feed element to a feed.

633

Optional

25.0

Chatter REST API Developer Guide

Poll Capability Input

Note: This release contains a beta version of pinned posts, which means it’s a high-quality feature with known limitations. Post pinning isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features. You can provide feedback and suggestions for pinned posts in the Trailblazer Community. Root XML tag

JSON example { "entityId":"0D5B000000TW7uh", "isPinned": "true" }

Properties Name

Type

Description

Required or Optional

entityId

String

ID of the entity to pin or unpin. In version Required 41.0, entityId must be a feed item ID, and only one feed item can be pinned per feed.

41.0

isPinned

Boolean

Specifies whether to pin (true) or unpin Required (false) the entity.

41.0

Poll Capability Input Create, update, or vote on a poll attached to a feed element. XML example Monday Tuesday

JSON example { "choices" : [ "Monday", "Tuesday" ] }

634

Available Version

Chatter REST API Developer Guide

Push Notification Input

Properties Name

Type

Description

Required or Optional

choices

String[]

The choices used to create a new poll. You Required for must specify 2–10 poll choices for each creating a poll poll.

myChoiceId

String

ID of an existing choice on the feed poll. Used to vote on an existing poll.

Available Version 32.0

Required for voting 32.0 on a poll

SEE ALSO: Feed Element Capabilities Input

Push Notification Input A push notification. Root XML tag

JSON example {

"appName" : "namespace" "userIds" : "payload" :

"TestApp", : "abc", ["005x00000013dPK", "005x00000013dPL"], "{'aps':{'alert':'test', 'badge':0, 'sound':'default'}}"

}

Properties Name

Type

Description

Required or Optional

appName

String

The API name of the connected app that Required the push notification is sent to.

31.0

namespace

String

The namespace of the connected app that Required if the the push notification is sent to. namespace is set

31.0

payload

String

The push notification payload in JSON format.

Required

31.0

userIds

String[]

The push notification recipient user ids.

Required

31.0

Question and Answers Capability Input Create or edit a question feed element or set the best answer of the existing question feed element.

635

Available Version

Chatter REST API Developer Guide

Read By Capability Input

Root XML tag 0D7D00000000lMAKAY

JSON example { "bestAnswerId": "0D7D00000000lMAKAY" }

Properties Name

Type

Description

Required or Optional

bestAnswerId

String

A comment ID to use as a best answer for a question feed element. The best answer comment must already exist on the question feed element.

Required to PATCH 32.0 the best answer.

Title for a question feed element.

Required to POST or 32.0 PATCH a question.

questionTitle String

To edit the title of a question, make a PATCH request to /chatter/feed-elements /feedElementId. Editing question

titles is supported in version 34.0 and later.

SEE ALSO: Edit a Question Title and Post Feed Element Capabilities Input

Read By Capability Input Mark feed elements as read by the context user. Root XML tag

JSON example { "isReadByMe": "true" }

636

Available Version

Not supported in POST requests.

Chatter REST API Developer Guide

Recommendation Audience Input

Properties Name

Type

Description

isReadByMe

Boolean

Specifies to mark the feed element as read Required (true) for the context user.

40.0

Specifies the last date when the feed Optional element is marked as read for the context user. If you don’t specify a date or you specify a future date, the current system date is used.

40.0

lastReadDateByMe Date

Required or Optional

SEE ALSO: Feed Element Capabilities Input

Recommendation Audience Input A recommendation audience. Root XML tag

JSON example for updating a custom list recommendation audience { "criteria" : { "memberOperationType" : "Add", "members" : { "userIds" : [ "005B0000000Ge16", "005D0000001GpHp" ] }, "type" : "CustomList" }, "name" : "My Custom List" }

JSON example for updating a new members recommendation audience { "criteria" : { "value" : "30", "type" : "MaxDaysInCommunity" }, "name" : "New Hires" }

637

Available Version

Chatter REST API Developer Guide

Recommendation Audience Input

JSON example for creating a recommendation audience { "name" : "Custom App Users" }

Properties Name

Type

Description

Required or Optional

Available Version

criteria

Custom List Audience Criteria Input

The criteria for the recommendation audience type.

Optional

36.0

or New User Audience Criteria Input

member String OperationType

Important: This property is available only in version 35.0. In version 36.0 and later, use Custom List Audience Criteria Input.

If not specified when creating a recommendation audience, the audience criteria type defaults to custom list. Required to update 35.0 only a recommendation audience

Don’t use or specify null to create a The operation to carry out on the audience recommendation members. Values are: audience • Add—Adds specified members to the audience. • Remove—Removes specified members from the audience. members

User ID Collection Input

Important: This property is available only in version 35.0. In version 36.0 and later, use Custom List Audience Criteria Input. A collection of user IDs. When updating an audience, you can include up to 100 members. An audience can have up to 100,000 members, and each community can have up to 100 audiences.

638

Required to update 35.0 only a recommendation audience Don’t use or specify null to create a recommendation audience

Chatter REST API Developer Guide

Recommendation Definition Input

Name

Type

Description

Required or Optional

Available Version

name

String

The unique name of the recommendation Optional to update 35.0 audience. a recommendation audience Required to create a recommendation audience

SEE ALSO: Create and Schedule Custom Recommendations with Audiences

Recommendation Definition Input A recommendation definition. JSON example { "actionUrl" : "https://www.example.com", "actionUrlName" : "Launch", "explanation" : "Click this link to learn more!", "name" : "Corporate Training Project", "title" : "Want to learn more about Corporate Training Project?"}

Properties Name

Type

Description

Required or Optional

actionUrl

String

The URL for acting on the Required for recommendation, for example, the URL to creating a join a group. recommendation definition.

Available Version 33.0

Optional for updating an existing recommendation definition. actionUrlName String

The text label for the action URL in the user Required for interface, for example, “Launch.” creating a recommendation definition. Optional for updating an existing recommendation definition.

639

34.0

Chatter REST API Developer Guide

Request Header Input

Name

Type

Description

Required or Optional

Available Version

explanation

String

The explanation, or body, of the recommendation.

Required for creating a recommendation definition.

33.0

Optional for updating an existing recommendation definition. name

String

The name of the recommendation Required for definition. The name is displayed in Setup. creating a recommendation definition.

33.0

Optional for updating an existing recommendation definition. title

String

The title of the recommendation definition. Optional

33.0

SEE ALSO: Create and Schedule Custom Recommendations with Audiences

Request Header Input An HTTP request header name and value pair. JSON example { "name": "Content-Type", "value": "application/json" }

Properties Name

Type

Description

Required or Optional

Available Version

name

String

The name of the request header.

Required

33.0

value

String

The value of the request header.

Required

33.0

SEE ALSO: Action Link Definition Input

640

Chatter REST API Developer Guide

Scheduled Recommendation Input

Scheduled Recommendation Input A scheduled recommendation. Root XML tag

JSON example for creating a new scheduled recommendation { "rank" : "2", "recommendationDefinitionId" : "0RDD00000004CEhOAM"}

JSON example for updating an existing scheduled recommendation {

"rank" : "2"}

Properties Name

Type

Description

Required or Optional

Available Version

channel

String

Specifies a way to tie recommendations together, for example, to display recommendations in specific places in the UI or to show recommendations based on time of day or geographic locations. Values are:

Optional for creating a scheduled recommendation

36.0

• CustomChannel1—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. For example, community managers can use Community Builder to determine where recommendations appear.

DefaultChannel.

• CustomChannel2—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • CustomChannel3—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • CustomChannel4—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • CustomChannel5—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels.

641

If not specified, defaults to Don’t use when updating a scheduled recommendation

Chatter REST API Developer Guide

Name

Type

Scheduled Recommendation Input

Description

Required or Optional

Available Version

• DefaultChannel—Default recommendation channel. Recommendations appear by default on the Home and Question Detail pages of Customer Service (Napili) and Partner Central communities. They also appear in the feed in communities in the Salesforce mobile web and anywhere community managers add recommendations using Community Builder. Use these channel values; you can’t rename or create other channels. enabled

Boolean

Indicates whether scheduling is enabled. Optional If true, the recommendation is enabled and appears in communities. If false, recommendations in feeds in the Salesforce mobile web aren’t removed, but no new recommendations appear. In Customer Service (Napili) and Partner Central communities, disabled recommendations no longer appear.

34.0

rank

Integer

Relative rank of the scheduled Optional recommendation indicated by ascending whole numbers starting with 1.

33.0

Setting the rank is comparable to an insertion into an ordered list. The scheduled recommendation is inserted into the position specified by the rank. The rank of all the scheduled recommendations after it is pushed down. See Ranking scheduled recommendations example. If the specified rank is larger than the size of the list, the scheduled recommendation is put at the end of the list. The rank of the scheduled recommendation is the size of the list, instead of the one specified. If a rank is not specified, the scheduled recommendation is put at the end of the list.

642

Chatter REST API Developer Guide

Name

Type

recommendation String AudienceId

Scheduled Recommendation Input

Description

Required or Optional

Available Version

ID of the audience for this scheduled recommendation.

Optional

35.0

When updating a scheduled recommendation, specify ALL to remove the association between a recommendation audience and a scheduled recommendation. recommendation String DefinitionId

ID of the recommendation definition that Required for this scheduled recommendation creating a schedules. scheduled recommendation. You can’t specify a recommendation DefinitionId

when updating an existing scheduled recommendation.

Ranking scheduled recommendations example If you have these scheduled recommendations: Scheduled Recommendations

Rank

ScheduledRecommendationA

1

ScheduledRecommendationB

2

ScheduledRecommendationC

3

And you include this information in the Scheduled Recommendation Input: Scheduled Recommendation

Rank

ScheduledRecommendationD

2

The result is: Scheduled Recommendation

Rank

ScheduledRecommendationA

1

ScheduledRecommendationD

2

ScheduledRecommendationB

3

643

33.0

Chatter REST API Developer Guide

Share Captured Activity Input

Scheduled Recommendation

Rank

ScheduledRecommendationC

4

SEE ALSO: Create and Schedule Custom Recommendations with Audiences

Share Captured Activity Input Defines who a captured email or event is shared with. JSON example { "groupsToShareWith":["0F9B00000004EVAKA2", "0F9B00000005YGHKA2", "0F9B00000008RTUKA2",], "sharingType":"MyGroups" }

Properties Name

Type

Description

Required or Optional

Available Version

groupsTo ShareWith

String[]

List of IDs for the groups that you share the activity with. Valid only if sharingType is MyGroups.

Optional

39.0

sharingType

String

Type of sharing operation.

Required

39.0

• Everyone—The activity is shared with everyone. • MyGroups—The activity is shared only with a selection of the context user’s groups. • OnlyMe—The activity is private.

Share Input JSON example { "id": "005D0000001Az4l", "sharingType": "V" }

Properties Name

Type

Description

Available Version

id

String

User ID to share a file with

30.0

644

Chatter REST API Developer Guide

Status Capability Input

Name

Type

Description

Available Version

sharingType

String

Either C for collaborator or V for viewer

30.0

SEE ALSO: File Shares Input

Status Capability Input Change the status of a feed post or comment. Root XML tag statusCapability

JSON example { "feedEntityStatus":"Published" }

Properties Name

Type

feedEntityStatus String

Description

Required or Optional

Available Version

Specifies the status of the feed post or comment. Values are:

Required

37.0

• PendingReview—The feed post or comment isn’t approved yet and therefore isn’t published or visible. • Published—The feed post or comment is approved and visible.

Stream Subscription Input An entity to subscribe to for a feed stream. Root XML tag

JSON example { "entityId" : "0TOD0000000090r" }

645

Chatter REST API Developer Guide

Topic Assignment Input

Properties Name

Type

Description

Required or Optional

entityId

String

The ID of any feed-enabled entity, such as Required a group, record, or user, that the context user can access. When subscribed, the entity’s feed is included in the feed stream.

Available Version 39.0

SEE ALSO: Chatter Stream Input

Topic Assignment Input Represents a topic to assign to a feed item or record. Administrators must enable topics for objects before users can add topics to records of that object type. Root XML tag

JSON The following example assigns a topic to a record: { "topicId": "0TOD0000000090r" }

Properties Name

Type

Description

Required or Optional

topicId

String

ID of an existing topic.

Required for existing topics if the 30.0 topicName property isn’t used.

topicName

String

Name of a new or existing topic. Required for new topics; required 30.0 for existing topics if the topicId property isn’t used.

Topic Endorsement Input Endorse a user who’s knowledgeable about a topic. Root XML tag

JSON { "userId" : "005B0000000Ge16" }

646

Available Version

Chatter REST API Developer Guide

Topic Input

Properties Name

Type

Description

Required or Optional Available Version

userId

String

ID of the user to be endorsed for the specified topic.

Required

30.0

Topic Input Root XML tag

JSON example { "description":"World Wide Web Consortium (W3C) is the main international standards organization for the web.", "name":"W3C" }

Properties Name

Type

Description

Available Version

description

String

Text description of the topic

28.0

idsToMerge

String[]

List of up to five secondary topic IDs to merge with the primary topic

33.0

If any of these secondary topics are managed topics, they lose their topic type, topic images, and children topics. Their feed items are reassigned to the primary topic. name

String

Name of the topic Use this property to change only the capitalization and spacing of the topic name.

SEE ALSO: Create a Topic Hierarchy in Communities

Topic Names Input A list of topic names to replace currently assigned topics. Also a list of suggested topics to assign.

647

28.0

Chatter REST API Developer Guide

Topics Capability Input

Root XML tag

JSON example { "topicNames": ["API", "Chatter REST API", "ConnectApi"] }

Properties Name

Type

Description

Required or Optional

Available Version

topicNames

String[]

A list of up to 10 topic names for a feed item or 100 topic names for a record.

Required

35.0

A list of suggested topics to assign to a Optional record or feed item to improve future topic suggestions.

37.0

topicSuggestions String[]

SEE ALSO: Article Topic Assignment Job Input

Topics Capability Input Assign topics to a feed element. Root XML tag

JSON example { "contextTopicName": "Recreation", "topics": ["Hiking", "Backpacking", "Camping"] }

Properties Name

Type

Description

Required or Optional

Available Version

contextTopic Name

String

Name of the parent topic in the community to which the feed element belongs.

Optional

38.0

topics

String[]

List of topics to assign to the feed element. Required

38.0

SEE ALSO: Feed Element Capabilities Input

648

Chatter REST API Developer Guide

Up Down Vote Capability Input

Up Down Vote Capability Input Allows a user to set the up down vote of a feed element or a comment. Root XML tag

JSON example { "vote":"Up" }

Properties Name

Type

Description

Required or Optional

Available Version

vote

String

Specifies the value of the vote for a feed element or comment. Values are:

Required

41.0

• Down • None • Up

User Chatter Settings Input A user’s global Chatter settings. Root XML tag

Properties Name

Type

Description

Available Version

defaultGroup EmailFrequency

String

The default frequency with which a user receives email from a group when they join. Valid values are:

27.0

• EachPost • DailyDigest • WeeklyDigest • Never In communities, the Email on every post option is disabled once more than 10,000 members choose this setting for the group. All members who had this option selected are automatically switched to Daily digests.

649

Chatter REST API Developer Guide

User ID Collection Input

User ID Collection Input A collection of user IDs. Root XML tag

JSON example { "userIds" : [ "005B0000000Ge16", "005D0000001GpHp" ] }

Properties Name

Type

Description

Required or Optional

Available Version

userIds

String[]

A list of user IDs.

Required

35.0

SEE ALSO: Custom List Audience Criteria Input

User Input Root XML tag

Properties Name

Type

Description

Available Version

aboutMe

String

The aboutMe property of a 29.0 User Detail response body. The maximum length is 1000 characters. This property populates the “About Me” section of the user profile, which is visible to all members of a community or an organization.

JSON example { "aboutMe": "Staff Technical Writer responsible for the Connect API and Connect in

650

Chatter REST API Developer Guide

User Message

Apex documentation." }

SEE ALSO: Update a User Profile

User Message Root XML tag

Properties Name

Type

Description

Available Version

body

String

Text of the message body

23.0

inReplyTo

String

ID of an existing message that 23.0 identifies which conversation this message is part of. Specify either recipients or inReplyTo. Specify one or the other, not both.

recipients

User Message Recipient List Input

List of users who are the 23.0 intended message recipients, up to 9. Comma-separated list of user IDs. Specify either recipients or inReplyTo. Specify one or the other, not both.

Example XML format: Text of the message userID userID messageID

Example JSON format: { "body": "Text of the message", "recipients": ["userID","userID"],

651

Chatter REST API Developer Guide

User Message Recipient Input

"inReplyTo": "messageID" }

SEE ALSO: Send a Private Message

User Message Recipient Input Root XML tag

Properties Name

Type

Description

Available Version

recipient

String

18-character ID of the user who 23.0 receives the message.

SEE ALSO: User Message Recipient List Input

User Message Recipient List Input Root XML tag

Properties Name

Type

Description

recipients

User Message Recipient Input[] Collection of recipients who receive the message.

Available Version 23.0

SEE ALSO: User Message

User Status Input Note: Setting a user status is no longer available as of version 25.0. Post feed items to the feed instead, using Feed Item Input. Root XML tag

Properties Name

Type

Description

Available Version

body

Message Body Input

Description of message body.

23.0–24.0

652

Chatter REST API Developer Guide

User Stream (Conversation) Input

User Stream (Conversation) Input Root XML tag

Properties Name

Type

Description

Available Version

read

Boolean

Changes the conversation status to unread (false) or read (true).

24.0

Verified Capability Input Mark a comment as verified or unverified. Root XML tag

JSON example { "isVerified": "true" }

Properties Name

Type

Description

Required or Optional

isVerified

Boolean

Specifies whether to mark the comment Required as verified (true) or unverified (false).

Available Version 41.0

Only verified comments can be marked as unverified, and only unverified comments can be marked as verified.

Chatter REST API Response Bodies The successful execution of a request to a Chatter REST API resource can return a response body in either JSON or XML format. A request to a Chatter REST API resource always returns an HTTP response code, whether the request was successful or not.

Action Link Definition The definition of an action link. To read this information, a request must use the same connected app that was used to create the action link definition.

653

Chatter REST API Developer Guide

Action Link Definition

Property Name

Type

Description

actionUrl

String

The action link URL. For example, a Ui Small, 33.0 action link URL is a Web page. A Download action link URL is a link to the file to download. Ui and Download action link URLs are provided to clients. An Api or ApiAsync action link URL is a REST resource. Api and ApiAsync action link URLs aren’t provided to clients. Links to Salesforce can be relative. All other links must be absolute and start with https://.

33.0

createdDate

Date

An ISO 8601 format date string, for example, Small, 33.0 2011-02-25T18:24:31.000Z..

33.0

ID of a single user to exclude from performing the action. If you specify an excludedUserId, you can’t specify a userId.

Small, 33.0

33.0

true if this action is the default action link Small, 33.0 in the action link group; false otherwise.

33.0

excludedUserId String

groupDefault

Boolean

Filter Group and Version

Available Version

There can be only one default action link per action link group. The default action link gets distinct styling in the Salesforce UI. headers

Request Header[]

The request headers for the Api and ApiAsync action link types.

id

String

18-character ID for the action link definition. Small, 33.0

33.0

label

String

A custom label to display on the action link Small, 34.0 button. A label value can be set only in an action link template.

34.0

Action links have four statuses: NewStatus, PendingStatus, SuccessStatus, and FailedStatus. These strings are appended to the label for each status: • label • label Pending • label Success • label Failed For example, if the value of label is “See Example,” the values of the four action link states are: See Example, See Example Pending, See Example Success, and See Example Failed.

654

Big, 33.0

33.0

Chatter REST API Developer Guide

Property Name

Type

Action Link Definition

Description

Filter Group and Version

Available Version

An action link can use either label or labelKey to generate label names, it can’t use both. If label has a value, the value of labelKey is None. If labelKey has a value other than None, the value of label is null. labelKey

String

Key for the set of labels to show in the user Small, 33.0 interface. A set includes labels for these states: NewStatus, PendingStatus, SuccessStatus, FailedStatus. For example, if you use the Approve key, you get these labels: Approve, Pending, Approved, Failed.

33.0

See Action Links Labels. method

String

The HTTP method. One of these values:

Medium, 33.0

33.0

• HttpDelete—Returns HTTP 204 on success. Response body or output class is empty. • HttpGet—Returns HTTP 200 on success. • HttpHead—Returns HTTP 200 on success. Response body or output class is empty. • HttpPatch—Returns HTTP 200 on success or HTTP 204 if the response body or output class is empty. • HttpPost—Returns HTTP 201 on success or HTTP 204 if the response body or output class is empty. Exceptions are the batch posting resources and methods, which return HTTP 200 on success. • HttpPut—Return HTTP 200 on success or HTTP 204 if the response body or output class is empty. modifiedDate

Date

ISO8601 date string, for example, 2011-02-25T18:24:31.000Z.

Small, 33.0

33.0

requestBody

String

The request body for Api and ApiAsync action link types.

Big, 33.0

33.0

requires Confirmation

Boolean

true to require the user to confirm the action; false otherwise.

Small, 33.0

33.0

655

Chatter REST API Developer Guide

Action Link Diagnostic

Property Name

Type

Description

Filter Group and Version

Available Version

templateId

String

The ID of the action link template from Medium, 33.0 which to instantiate this action link. If the action link isn’t associated with a template, the value is null.

33.0

type

String

Defines the type of action link. Values are:

Small, 33.0

33.0

Small, 33.0

33.0

• Api—The action link calls a synchronous API at the action URL. Salesforce sets the status to SuccessfulStatus or FailedStatus based on the HTTP status code returned by your server. • ApiAsync—The action link calls an asynchronous API at the action URL. The action remains in a PendingStatus state until a third party makes a request to /connect/action-links/actionLinkId

to set the status to SuccessfulStatus or FailedStatus when the

asynchronous operation is complete. • Download—The action link downloads a file from the action URL. • Ui—The action link takes the user to a web page at the action URL. userId

String

The ID of the user who can execute the action. If not specified or null, any user can execute the action. If you specify a userId, you can’t specify an excludedUserId.

SEE ALSO: Action Link Group Definition

Action Link Diagnostic Any diagnostic information that is returned from the REST endpoint when an action link has been executed. Diagnostic information is given only for users who can access the action link.

656

Chatter REST API Developer Guide

Property Name

Type

Action Link Group Definition

Description

Filter Group and Version

Available Version

diagnosticInfo String

Any diagnostic information that is returned Small, 33.0 from the REST endpoint when an action link has been executed. Diagnostic information is given only for users who can access the action link.

33.0

String

The Chatter REST API URL for this action link Small, 33.0 diagnostic.

33.0

url

Action Link Group Definition The definition of an action link group. All action links must belong to a group. Action links in a group are mutually exclusive and share some properties. Define stand-alone actions in their own action group. Property Name

Type

Description

Filter Group and Version

Available Version

actionLinks

Action Link Definition[]

A collection of action link definitions that make up the action link group.

Medium, 33.0

33.0

Medium, 33.0

33.0

Small, 33.0

33.0

Within an action link group, action links are displayed in the order listed in the actionLinks property of the Action Link Group Definition Input request body. Within a feed item, action link groups are displayed in the order specified in the actionLinkGroupIds property of the Associated Actions Capability Input request body. category

String

Indicates the priority and location of the action links. Values are: • Primary—The action link group is displayed in the body of the feed element. • Overflow—The action link group is displayed in the overflow menu of the feed element.

createdDate

Date

ISO8601 date string, for example, 2011-02-25T18:24:31.000Z

executions Allowed

String

Defines the number of times an action link Medium, 33.0 can be executed. Values are: • Once—An action link can be executed only once across all users.

657

33.0

Chatter REST API Developer Guide

Property Name

Type

Activity Reminder

Description

Filter Group and Version

Available Version

• OncePerUser—An action link can be executed only once for each user. • Unlimited—An action link can be executed an unlimited number of times by each user. If the action link’s actionType is Api or ApiAsync, you can’t use this value. expirationDate Date

ISO 8601 date string, for example, Medium, 33.0 2011-02-25T18:24:31.000Z, that represents the date and time this action group expires and can no longer be executed. If the value is null, there isn’t an expiration date.

33.0

id

String

18-character ID of the action link group definition

Small, 33.0

33.0

modifiedDate

Date

ISO8601 date string, for example, 2011-02-25T18:24:31.000Z

Small, 33.0

33.0

templateId

String

The ID of the action link group template Medium, 33.0 from which to instantiate this action link group, or null if this group isn’t associated with a template.

33.0

url

String

The Chatter REST API URL for this action link Small, 33.0 group definition.

33.0

Activity Reminder An activity reminder in Salesforce Classic. Property Name

Type

Description

Filter Group and Version

Available Version

entityId

String

Activity (task or event) ID.

Small, 39.0

39.0

Indicates if the reminder is displayed to the Small, 39.0 user.

39.0

Activity subject.

Small, 39.0

39.0

List of action groups with action links available for the activity reminder.

Medium, 39.0

39.0

Group[] Date

Reminder due date and time.

Small, 39.0

39.0

isReminderDisplayed Boolean

message

String

platformActionGroups Platform Action

reminderDate

658

Chatter REST API Developer Guide

Activity Reminders Collection

Activity Reminders Collection A collection of activity reminders in Salesforce Classic. Property Name

Type

Description

Filter Group and Version

Available Version

reminders

Activity Reminder[]

List of upcoming activity reminders.

Small, 39.0

39.0

Property

Type

Description

Filter Group Available and Version Version

city

String

Name of the city

Small, 29.0

23.0

country

String

Name of the country

Small, 29.0

23.0

formatted Address

String

Address formatted by locale

Small, 29.0

25.0

state

String

Name of the state, province, or so on

Small, 29.0

23.0

street

String

Street number

Small, 29.0

23.0

zip

String

Zip or postal code

Small, 29.0

23.0

Address

SEE ALSO: Datacloud Company Datacloud Contact User Detail

Alternative Alternative representation for an extension on a feed element. Property Name

Type

text String Representation

Description

Filter Group and Version

Available Version

Text representation of the extension.

Small, 40.0

40.0

thumbnailUrl

String

Thumbnail URL for the extension.

Small, 40.0

40.0

title

String

Title of the extension.

Small, 40.0

40.0

Announcement An announcement.

659

Chatter REST API Developer Guide

Property Name

Type

expirationDate Date

Announcement Page

Description

Filter Group and Version

Available Version

The Salesforce UI displays an announcement Small, 31.0 until 11:59 p.m. on this date unless another announcement is posted first. The Salesforce UI ignores the time value in the expirationDate. However, you can use the time value to create your own display logic in your own UI.

31.0

feedElement

Feed Item

The feed element that contains the body of Small, 31.0 the announcement and its associated comments, likes, and so on.

31.0

id

String

18-character ID of the announcement.

Small, 31.0

31.0

isArchived

Boolean

Specifies whether the announcement is archived.

Small, 36.0

36.0

sendEmails

Boolean

Specifies whether the announcement is sent Medium, 36.0 as an email to all group members.

36.0

url

String

The URL to the announcement.

Small, 33.0

33.0

Filter Group and Version

Available Version

SEE ALSO: Announcement Page Group Detail

Announcement Page A paginated collection of Announcement response bodies. Property Name

Type

Description

announcements Announcement[]

A collection of Announcement response Small, 31.0 bodies. An announcement displays in a designated location in the Salesforce UI until 11:59 p.m. on its expiration date, unless it’s deleted or replaced by another announcement.

31.0

currentPageUrl String

Chatter REST API URL identifying the current Medium, 31.0 page.

31.0

Chatter REST API URL identifying the next Small, 31.0 page, or null if there isn’t a next page. Check whether this value is null before getting another page. If a page doesn’t exist, a

31.0

nextPageUrl

String

660

Chatter REST API Developer Guide

Property Name

Type

Approval Capability

Description

Filter Group and Version

Available Version

Medium, 31.0

31.0

Filter Group and Version

Available Version

ConnectApi.NotFoundException

error is returned. previousPageUrl String

Chatter REST API URL identifying the previous page, or null if there isn’t a previous page.

Approval Capability If a feed element has this capability, it includes information about an approval. Property Name

Type

Description

id

String

The work item ID. The work item ID is null Small, 32.0 if there isn’t a pending work item associated with the approval record.

32.0

postTemplate Fields

Approval Post Template Field[]

The details of the approval post template field.

Small, 32.0

32.0

The process instance step ID. The associated Small, 32.0 record represents one step in an approval process.

32.0

The status of the approval. One of these values:

32.0

processInstance String StepId

status

String

• Approved • Fault • Held • NoResponse • Pending • Reassigned • Rejected • Removed • Started

SEE ALSO: Feed Element Capabilities

Approval Post Template Field Description of an approval post template field.

661

Small, 32.0

Chatter REST API Developer Guide

Article Item

Property

Type

Description

Filter Group Available and Version Version

displayName

String

The field name

Small, 29.0

28.0

displayValue

String

The field value or null if the field is set to null.

Small, 29.0

28.0

record

Reference

A record ID

Small, 29.0

28.0

If no record exists or if the reference is null, this value is null.

SEE ALSO: Approval Capability

Article Item Article item in question and answer search results. Property Name

Type

Description

Filter Group and Version

Available Version

id

String

ID of the article.

Small, 32.0

32.0

rating

Double

Rating of the article.

Small, 32.0

32.0

title

String

Title of the article.

Small, 32.0

32.0

urlLink

String

Link URL of the article.

Small, 32.0

32.0

viewCount

Integer

Number of votes given to the article.

Small, 32.0

32.0

SEE ALSO: Question and Answers Suggestion Collection

Article Summary A knowledge article summary. Property Name

Type

Description

Filter Group and Version

Available Version

articleType

String

Type of the knowledge article.

Small, 37.0

37.0

ID of the knowledge article version.

Small, 39.0

39.0

18-character ID of the knowledge article.

Small, 37.0

37.0

Last published date of the knowledge article.

Small, 37.0

37.0

knowledgeArticle String VersionId id

String

lastPublishedDate Date

662

Chatter REST API Developer Guide

Asset File

Property Name

Type

Description

Filter Group and Version

Available Version

motif

Motif

Small, medium, and large icons indicating that the object is a knowledge article. The motif can also contain the object’s base color.

Small, 37.0

37.0

The icon is not a preview of the article. mySubscription Reference

If the context user is following this article, it Medium, 37.0 contains information about the subscription. Otherwise, it returns null.

37.0

name

String

Name of the article.

Small, 37.0

37.0

rating

Double

The rating of the article.

Small, 37.0

37.0

summary

String

Summary of the knowledge article contents. Small, 37.0

37.0

title

String

Title of the knowledge article.

Small, 37.0

37.0

type

String

Value is KnowledgeArticle.

Small, 37.0

37.0

url

String

URL for the knowledge article.

Small, 37.0

37.0

urlName

String

URL name of the knowledge article.

Small, 37.0

37.0

viewCount

Integer

Number of times the knowledge article has Small, 38.0 been viewed.

38.0

Property Name

Type

Description

Filter Group and Version

Available Version

baseAssetUrl

String

The base download URL of the asset.

Small, 38.0

38.0

id

String

The ID of the asset.

Small, 38.0

38.0

masterLabel

String

The master label of the asset.

Small, 38.0

38.0

name

String

The unique name of the asset.

Small, 38.0

38.0

The namespace prefix of the package containing the asset.

Small, 38.0

38.0

The type of asset.

Small, 38.0

38.0

Asset File An asset file.

namespacePrefix String

type

String

SEE ALSO: File Detail

663

Chatter REST API Developer Guide

Associated Actions Capability

Associated Actions Capability If a feed element has this capability, it has platform actions associated with it. Property Name

Type

platformAction Platform Action Group[] Groups

Description

Filter Group and Version

The platform action groups associated with Medium, 33.0 a feed element. Platform action groups are returned in the order specified in the Associated Actions Capability Input request body.

Available Version 33.0

SEE ALSO: Feed Element Capabilities

Async Query The result of an Async SOQL query job. JSON example { "jobId": "08PD000000003kiT", "message": "", "query": "SELECT firstField__c, secondField__c FROM SourceObject__c", "status": "New", "targetObject": "TargetObject__c", "targetFieldMap": {"firstField__c":"firstFieldTarget__c", "secondField__c":"secondFieldTarget__c" }, "targetValueMap": {"$JOB_ID":"BackgroundOperationLookup__c", "Copy fields from source to target":"BackgroundOperationDescription__c" } }

Properties Property Name

Type

Description

Filter Group and Available Version Version

jobId

String

The ID of the Async SOQL query. This ID Big, 35.0 corresponds to an entry in the Background Operation standard object. It matches the ID that is used in the targetValueMap when $JOB_ID is

664

35.0

Chatter REST API Developer Guide

Property Name

Type

Async Query

Description

Filter Group and Available Version Version

used. To get the status of an async query job, use this ID in an Async Query, Status request (/async-queries/jobId). message

String

A text message that provides information Big, 37.0 regarding the query, such as an error message if the query failed.

37.0

operation

String

Specify whether the query is an insert or Big, 39.0 upsert. If the record doesn’t exist, an upsert behaves like an insert.

.39.0

Note: Upsert is not supported for big objects query

String

Specifies the parameters for the SOQL query you want to execute.

Big, 35.0

35.0

status

String

Status of an async query job.

Big, 35.0

35.0

targetExternalIdField String

The ID of the target sObject. Required for Big, 39.0 upsert operations.

39.0

targetFieldMap Map

Note: When defining the targetFieldMap parameter, make sure that the field type mappings are consistent. If the source and target fields don’t match, these considerations apply.

665

Chatter REST API Developer Guide

Property Name

Type

Async Query

Description

Filter Group and Available Version Version

• Any source field can be mapped onto a target text field. • If the source and target fields are both numerical, the target field must have the same or greater number of decimal places than the source field. If not, the request fails. This behavior is to ensure that no data is lost in the conversion. • If a field in the query result is mapped more than once, even if mapped to different fields in the target object, only the last mapping is used. targetValueMap Map

Defines how to map static strings to fields Big, 37.0 in the target object. Any field or alias can be used as the TargetValueMap value in the SELECT clause of a query.

37.0

You can map the special value, $JOB_ID, to a field in the target object. The target field must be a lookup to the Background Operation standard object. In this case, the ID of the Background Operation object representing the Async SOQL query is inserted. If the target field is a text field, it must be at least 15–18 characters long. You can also include any field or alias in the SELECT clause of the TargetValueMap. They can be combined together to concatenate a value to be used. targetObject

String

A standard object, custom object, external Big, 35.0 object, or big object into which to insert the results of the query.

SEE ALSO: Async Query Async Query, Status Async Query Collection

666

35.0

Chatter REST API Developer Guide

Async Query Collection

Async Query Collection A collection of Async SOQL results. JSON example { "asyncQueries" : [ { "jobId" : "08PD00000000002", "message" : "", "query" : "SELECT String__c FROM test__b", "status" : "Running", "targetFieldMap" : { "String__c" : "String__c" }, "targetObject" : "test__b", "targetValueMap" : { } }, { "jobId": "08PD000000000001", "message": "Complete", "query": "SELECT firstField__c, secondField__c FROM SourceObject__c", "status": "Complete", "targetObject": "TargetObject__c", "targetFieldMap": {"firstField__c":"firstFieldTarget__c", "secondField__c":"secondFieldTarget__c" } } }

Properties Property Name

Type

Description

Filter Group and Available Version Version

asyncQueries

Async Query[]

List of async queries available for the organization.

Big, 36.0

36.0

Banner Capability If this feed element has this capability, it has a banner motif and style. Property Name

Type

Description

Filter Group and Version

Available Version

motif

Motif

A banner motif.

Small, 31.0

31.0

667

Chatter REST API Developer Guide

Banner Photo

Property Name

Type

Description

Filter Group and Version

style

String

Decorates a feed item with a color and set Small, 31.0 of icons.

Available Version 31.0

• Announcement—An announcement displays in a designated location in the Salesforce UI until 11:59 p.m. on its expiration date, unless it’s deleted or replaced by another announcement.

SEE ALSO: Feed Element Capabilities

Banner Photo A banner photo. Property Name

Type

Description

bannerPhotoUrl String

Filter Group and Version

Available Version

URL to the banner photo in a large format. Medium, 36.0 This URL is available only to authenticated users.

36.0

bannerPhoto VersionId

String

18-character version ID of the banner photo. Small, 36.0

36.0

url

String

URL to the banner photo.

36.0

Small, 36.0

SEE ALSO: Group Detail User Detail

Batch Result Item Property

Type

Description

result

The type depends on Dependent on the type of batch. Value could be one Small, 29.0 the object type of of the following: the batch. • Feed Item for /chatter/feed-elements/batch (v32.0) Important: If the result is an error, the

Filter Group Available and Version Version

• Error Message (v23.0)

668

Chatter REST API Developer Guide

Property

Batch Result Item

Type

Description type is a collection.

Filter Group Available and Version Version

• File Summary for /connect/files/batch/

fileIds

(v26.0) • Group Member for /chatter/group-memberships/batch/

membershipIds

(v27.0) • Group for /chatter/groups/batch/

groupIds

(v23.0) • Motif for /connect/motifs/batch/

idOrPrefixList

(v27.0) • User Detail for /chatter/users/batch/

userIds

(v23.0) • Topics People Are Knowledgeable About Collection for /chatter/users/batch/ userIds/knowledgeable-about-topics

(v36.0) • For /connect/batch, the value can be any response body depending on the subrequest in the batch. (v28.0) statusCode

Integer

An HTTP status code indicating the status of this individual request in the batch

SEE ALSO: Batch Results

669

Small, 29.0

23.0

Chatter REST API Developer Guide

Batch Results

Batch Results Property

Type

Description

Filter Group Available and Version Version

hasErrors

Boolean

true if at least one of the results in the result set is an Small, 29.0 HTTP status code in the 400 or 500 range; false

28.0

otherwise results

Batch Result Item[]

Collection of batch result items

Small, 29.0

23.0

Bookmarks Capability If a feed element has this capability, the context user can bookmark it. Property Name

Type

isBookmarked Boolean ByCurrentUser

Description

Filter Group and Version

Available Version

Indicates whether the feed element has been bookmarked by the context user (true) or not (false).

Small, 32.0

32.0

SEE ALSO: Feed Element Capabilities

Candidate Answers Status The status of candidate answers on a feed element. Property Name

Type

Description

Filter Group and Version

Available Version

hasCandidate Answers

Boolean

Indicates whether candidate answers are available for a question.

Small, 41.0

41.0

hasCandidate Boolean AnswersPublished

Indicates whether any candidate answers are published.

Small, 41.0

41.0

Boolean

Indicates whether any candidate answers are rated.

Small, 41.0

41.0

hasCandidate AnswersRated

SEE ALSO: Question and Answers Capability

Case Comment Capability If a feed element has this capability, it has a case comment on the case feed.

670

Chatter REST API Developer Guide

Case Comment Capability

Property Name

Type

Description

Filter Group and Version

Available Version

actorType

String

Specifies the type of user who made the comment.

Small, 32.0

32.0

• Customer—if a Chatter customer made the comment • CustomerService—if a service representative made the comment createdBy

User Detail or User Summary

Information about the user who created the Small, 32.0 comment.

32.0

createdDate

Date

ISO8601 date string, for example, 2011-02-25T18:24:31.000Z.

Small, 32.0

32.0

eventType

String

Specifies an event type for a comment in the case feed.

Small, 32.0

32.0

• NewInternal—A case comment that has newly been marked Internal Only. • NewPublished—A newly published case comment. • NewPublishedByCustomer—A case comment by a customer that was newly published. • PublishExisting—An existing case comment that was republished. • PublishExistingByCustomer—An existing case comment by a customer that was republished. • UnpublishExistingByCustomer—An existing case comment by a customer that was unpublished. • UnpublishExsiting—An existing case comment that was unpublished. Note: Unfortunately, this typo is in the code, not the documentation. Use this spelling in your code. id

String

18-character ID of case comment.

Small, 32.0

32.0

published

Boolean

Specifies whether the comment has been published.

Small, 32.0

32.0

671

Chatter REST API Developer Guide

Canvas Capability

Property Name

Type

Description

Filter Group and Version

Available Version

text

String

Text of the case comment.

Small, 32.0

32.0

SEE ALSO: Feed Element Capabilities

Canvas Capability If a feed element has this capability, it renders a canvas app. Property Name

Type

Description

Filter Group and Version

Available Version

description

String

A description of the canvas app. The maximum size is 255 characters.

Small, 32.0

32.0

developerName String

The API name (developer name) of the connected app.

Small, 32.0

32.0

height

String

The height of the canvas app in pixels.

Small, 32.0

32.0

icon

Icon

The icon for the canvas app.

Small, 32.0

32.0

A unique namespace prefix for the canvas app.

Small, 32.0

32.0

namespacePrefix String

parameters

String

JSON parameters passed to the canvas app. Small, 32.0

32.0

thumbnailUrl

String

A thumbnail URL to a preview image. The maximum thumbnail size is 120 pixels by 120 pixels.

Small, 32.0

32.0

title

String

A title for the canvas link.

Small, 32.0

32.0

SEE ALSO: Feed Element Capabilities

Chatter Activity Property

Type

Description

Filter Group Available and Version Version

commentCount

Integer

Total number of comments in the organization or community made by the user

Small, 29.0

23.0

commentReceived Integer Count

Total number of comments in the organization or community received by the user

Small, 29.0

23.0

672

Chatter REST API Developer Guide

Chatter Directory

Property

Type

Description

Filter Group Available and Version Version

likeReceived Count

Integer

Total number of likes on posts and comments in the organization or community received by the user

Small, 29.0

23.0

postCount

Integer

Total number of posts in the organization or community Small, 29.0 made by the user

23.0

SEE ALSO: User Detail

Chatter Directory Property

Type

Description

Filter Group Available and Version Version

feeds

String

Returns a URL to the general feeds resource for the organization

Small, 29.0

24.0

groups

String

Returns a URL to the general groups resource for the organization

Small, 29.0

24.0

organization

String

24.0–26.0

Note: This property is no longer available as of version 26.0. Use the organization property in the Connect Directory instead. Returns a URL to the general connect organization resource

users

String

Returns a URL to the general users resource for the organization

Small, 29.0

24.0

Filter Group Available and Version Version

Chatter Influence Property

Type

Description

percentile

String

Percentile value for the user’s influence rank within the Small, 29.0 organization or community

24.0

rank

Integer

Number indicating the user’s influence rank, relative to Small, 29.0 all other users within the organization or community

24.0

SEE ALSO: User Detail

673

Chatter REST API Developer Guide

Chatter Likes Capability

Chatter Likes Capability If a feed element has this capability, the context user can like it. Exposes information about existing likes. Property Name

Type

Description

Filter Group and Version

Available Version

isLikedBy CurrentUser

Boolean

Indicates whether the feed element is liked Small, 32.0 by the context user (true) or not (false).

32.0

page

Like Page

Likes information for this feed element.

Small, 32.0

32.0

likesMessage

Like Message Body

A message body that describes who likes the feed element.

Small, 32.0

32.0

myLike

Reference

If the context user has liked the feed Medium, 32.0 element, this property is a reference to the specific like, null otherwise.

32.0

SEE ALSO: Feed Element Capabilities

Chatter Stream A Chatter feed stream. Property Name

Type

Description

Filter Group and Version

Available Version

community

Community Summary

Community summary for the stream.

Small, 41.0

41.0

createdDate

Date

Date the stream was created.

Small, 39.0

39.0

description

String

Description of the stream.

Small, 39.0

39.0

id

String

18-character ID of the stream.

Small, 39.0

39.0

name

String

Name of the stream.

Small, 39.0

39.0

subscriptions Feed Enabled Entity List of entities whose feeds are included in Small, 39.0

39.0

url

Summary[]

the stream.

String

URL to the stream.

Small, 39.0

SEE ALSO: Chatter Stream Collection

Chatter Stream Collection A collection of Chatter feed streams.

674

39.0

Chatter REST API Developer Guide

Property Name

Type

currentPageUrl String

Clean Record Result

Description

Filter Group and Version

Available Version

URL to the current page of streams.

Medium, 39.0

39.0

items

Chatter Stream[]

List of streams.

Small, 39.0

39.0

nextPageUrl

String

URL to the next page of streams.

Medium, 39.0

39.0

Small, 39.0

39.0

In version 39.0, all streams are included in currentPageUrl and nextPageUrl is null. total

Integer

Total number of streams in the collection.

Clean Record Result Results of updating a record with an active data integration rule. Property Name

Type

Description

Filter Group and Version

Available Version

cleanStatus

String

Status of the data integration rule used to update the record.

Small, 37.0

37.0

Key for the external data source used to update the record.

Small, 37.0

37.0

Filter Group and Version

Available Version

datasourceKey String

SEE ALSO: Clean Record Result Collection

Clean Record Result Collection Results of updating records with data integration rules. Property Name

Type

Description

cleanRecord

Clean Record Result[] Collection of results from updating records Small, 37.0 with data integration rules.

Clean Rule Data Service A data service associated with an active data integration rule.

675

37.0

Chatter REST API Developer Guide

Clean Rule Data Service Collection

Property Name

Type

Description

Filter Group and Version

Available Version

cleanData ServiceId

String

ID of the data service associated with a data Small, 37.0 integration rule for a record.

37.0

dataService MasterLabel

String

Name of the data service associated with a Small, 37.0 data integration rule for a record.

37.0

SEE ALSO: Clean Rule Data Service Collection

Clean Rule Data Service Collection Data services associated with all active data integration rules in an organization. Property Name

Type

Description

Filter Group and Version

dataService Records

Clean Rule Data Service[]

Collection of data services associated with Small, 37.0 all active data integration rules in an organization.

Available Version 37.0

Clean Rule Data Service Metrics Metrics for a data service associated with an active data integration rule. Property Name

Type

Description

Filter Group and Version

Available Version

cleanRule ErrorsUrl

String

URL where update errors for the data service Small, 37.0 can be downloaded.

37.0

cleanRuleId

String

ID of the data integration rule that uses the Small, 37.0 data service.

37.0

cleanRuleName String

Name of the data integration rule that uses Small, 37.0 the data service.

37.0

entityName

String

Name of the record type associated with the data service.

Small, 37.0

37.0

errorCount

Integer

Number of records with update errors for the data integration rule.

Small, 37.0

37.0

matchedRecords Integer

Number of records with a data integration Small, 37.0 rule status of In Sync, Different, or Skipped.

37.0

processedRecords Integer

Number of records processed by the data integration rule.

37.0

676

Small, 37.0

Chatter REST API Developer Guide

Clean Rule Data Service Metrics Collection

Property Name

Type

Description

Filter Group and Version

totalRecords

Integer

Number of total records that are available Small, 37.0 for processing by the data integration rule.

Available Version 37.0

SEE ALSO: Clean Rule Data Service Metrics Collection

Clean Rule Data Service Metrics Collection Metrics for data services associated with all active data integration rules in an organization. Property Name

Type

Description

Filter Group and Version

Available Version

cleanMetric Records

Clean Rule Data Service Metrics[]

List of metrics for data services associated with all active data integration rules in an organization.

Small, 37.0

37.0

metricDate

Date

Date when metrics were generated.

Small, 37.0

37.0

metricUri

String

URL for the Clean Metric API.

Medium, 37.0

37.0

Description

Filter Group and Version

Available Version

dataServiceName String

Data service associated with the data integration rule.

Small, 37.0

37.0

lastCleanDate Date

Date when the record was last updated with Small, 37.0 the data integration rule.

37.0

Clean Rule Status Status of an active data integration rule for a record. Property Name

Type

needCompare

Boolean

Indicates whether there are field value Small, 37.0 differences between the Salesforce record and the matching record in the data service.

37.0

ruleId

String

ID of the data integration rule.

Small, 37.0

37.0

ruleName

String

Name of the data integration rule.

Small, 37.0

37.0

status

String

Status of the data integration rule. For more Small, 37.0 information and available values, see “Statuses for Data Integration” in Salesforce Help.

37.0

677

Chatter REST API Developer Guide

Clean Rule Status Collection

Property Name

Type

Description

Filter Group and Version

statusId

String

ID of the status for the data integration rule. Small, 37.0

Available Version 37.0

SEE ALSO: Clean Rule Status Collection

Clean Rule Status Collection Statuses of all active data integration rules for a record. Property Name

Type

Description

Filter Group and Version

Available Version

cleanStatus Records

Clean Rule Status[]

Collection of update statuses for a record’s Small, 37.0 data integration rules.

37.0

entityId

String

ID of the record.

Small, 37.0

37.0

statusUri

String

URI for the update status.

Medium, 37.0

37.0

Type

Description

Filter Group Available and Version Version

applicationName String

Name of the connected app used for authentication. For more information, see Connected Apps.

Small, 29.0

23.0

applicationUrl String

Value from the Info URL field of the connected app Small, 29.0 used for authentication

23.0

ClientInfo Property

SEE ALSO: Comment Feed Item

678

Chatter REST API Developer Guide

Comment

Comment Property

Type

Description

Filter Group Available and Version Version

attachment

Depends on type of If the comment does not contain an attachment or if Medium, 29.0 comment the attachment, returns null. Otherwise, returns Feed Item Attachment: Content.

24.0–31.0

Important: As of version 32.0, use the capabilities property. body

Feed Item Body

Message body for the comment.

Small, 29.0

23.0

capabilities

Comment Capabilities

Capabilities associated with the comment.

Medium, 32.0

32.0

clientInfo

ClientInfo

Information about the connected app used to authenticate the connection.

Medium, 29.0

23.0

createdDate

String

ISO8601 date string, for example, 2011-02-25T18:24:31.000Z.

Small, 29.0

23.0

feedElement

Reference

The feed element on which the comment is posted.

Medium, 32.0

32.0

feedItem

Reference

The feed item on which the comment is posted.

Medium, 29.0

23.0–31.0

Small, 29.0

23.0

Important: As of version 32.0, use the feedElement property. id

String

isDeletable

Boolean

18-character ID of the comment.

23.0–24.0

Note: This property is no longer available as of version 25.0. Use the isDeleteRestricted property instead. Specifies if the context user can delete the comment.

isDelete Restricted

Boolean

Returns true if the context user can’t delete the comment. If it returns false, possibly the context user can delete the comment.

Medium, 29.0

25.0

likes

Like Page

Page of likes associated with the comment.

Medium, 29.0

24.0

A message body that describes who likes the comment. Medium, 29.0

27.0

This property has no information for comments on direct messages. likesMessage

Like Message Body

This property is null for comments on direct messages.

679

Chatter REST API Developer Guide

Comment Capabilities

Property

Type

Description

Filter Group Available and Version Version

myLike

Reference

If the context user liked the comment, returns a reference to that like or returns null.

Medium, 29.0

23.0

Big, 29.0

23.0

This property is null for comments on direct messages. parent

Reference

Information about the parent of the feed-item associated with this comment.

relative CreatedDate

String

The created date formatted as a relative, localized string, Medium, 29.0 for example, “17m ago” or “Yesterday.”

28.0

type

String

Indicates the type of comment. Valid values are:

Small, 29.0

24.0

• ContentComment—the comment contains an attachment • TextComment—the comment contains only text url

String

URL to this comment.

Small, 29.0

23.0

user

User Summary

Information about the comment author.

Small, 29.0

23.0

SEE ALSO: Comment Page Question and Answers Capability

Comment Capabilities A container for all capabilities that can be included with a comment. Property Name

Type

Description

Filter Group and Version

Available Version

content

Content Capability

Content, such as a file attachment, associated with this comment.

Small, 32.0

32.0

Most Content Capability properties are null if the content has been deleted from the feed element or if the access has changed to private. edit

Edit Capability

If a comment has this capability, users who Small, 34.0 have permission can edit it.

34.0

status

Status Capability

If a comment has this capability, it has a status that determines its visibility.

38.0

680

Small, 38.0

Chatter REST API Developer Guide

Comment Page

Property Name

Type

Description

Filter Group and Version

Available Version

upDownVote

Up Down Vote Capability

If a comment has this capability, users can Small, 41.0 vote it up or down.

41.0

verified

Verified Capability

If a comment has this capability, users with Small, 41.0 permission can mark it as verified or unverified.

41.0

SEE ALSO: Comment

Comment Page Property

Type

Description

Filter Group Available and Version Version

comments

Comment[]

Collection of comments.

Small, 29.0

23.0–31.0

Important: Use the items property as of version 32.0. currentPageToken String

Token identifying the current page.

Medium, 37.0

37.0

currentPageUrl String

URL for the current page of comments, that is, the most Medium, 29.0 recent comments. The default is 25 comments per page.

23.0

Collection of comments.

Small, 32.0

32.0

Token identifying the next page, or null if there isn’t Small, 37.0 a next page.

37.0

URL to the next page of comments, that is, older comments. The default is 25 comments per page.

Small, 29.0

23.0

Total number of published comments across all pages Small, 29.0 for the parent feed item.

23.0

items

Comment[]

nextPageToken String

nextPageUrl

String

If you want to read more of the comments in search results, all the comments in the thread are refreshed, not just the ones that match the search term. Avoid using nextPageUrl until the comments are refreshed. total

Integer

SEE ALSO: Comments Capability

681

Chatter REST API Developer Guide

Comments Capability

Comments Capability If a feed element has this capability, the context user can add a comment. Property Name

Type

Description

Filter Group and Version

Available Version

page

Comment Page

The comments information for this feed element.

Small, 32.0

32.0

SEE ALSO: Feed Element Capabilities

Community Property

Type

Description

Filter Group Available and Version Version

allowChatter Boolean AccessWithoutLogin

Specifies if guest users can access public groups in the Small, 31.0 community without logging in.

31.0

allowMembers ToFlag

Boolean

Specifies whether members of the community can flag Small, 30.0 content.

30.0

description

String

Community’s description.

Small, 29.0

26.0

id

String

18-character ID of the community.

Small, 29.0

26.0

invitations Enabled

Boolean

Specifies whether members of the community can Small, 29.0 invite other members to the community, true if they can, false otherwise.

26.0

Specifies whether knowledgeable people and endorsements are available for topics (true), or not (false).

Small, 30.0

30.0

knowledgeable Boolean Enabled

loginUrl

String

Login URL for the community.

Small, 36.0

36.0

name

String

Community name.

Small, 29.0

26.0

nicknameDisplay Boolean Enabled

Specifies whether nicknames are displayed in the community.

Small, 32.0

32.0

privateMessages Boolean Enabled

Specifies whether members of the community can send Small, 30.0 and receive private messages to and from other members of the community (true) or not (false).

30.0

reputationEnabled Boolean

Specifies whether reputation is calculated and displayed Small, 31.0 for members of the community.

31.0

Boolean

Specifies whether a welcome email is automatically Small, 29.0 generated and sent to any new member. true if email is sent, false otherwise.

26.0

sendWelcome Email

682

Chatter REST API Developer Guide

Property

Type

siteAsContainer Boolean Enabled

Community Page

Description

Filter Group Available and Version Version

Specifies whether the community uses Site.com pages Small, 41.0 (true) or Visualforce tabs (false).

41.0

siteUrl

String

Site URL for the community, which is the custom domain plus a URL prefix.

Small, 30.0

30.0

status

String

Community’s status. Values are:

Small, 29.0

28.0

Community-specific URL prefix.

Small, 29.0

26.0

Full URL to community.

Small, 29.0

26.0

• Live • Inactive • UnderConstruction urlPathPrefix String url

String

SEE ALSO: Community Page Connect Directory

Community Page Property

Type

Description

Filter Group Available and Version Version

communities

Community[]

List of communities available to the context user

Small, 29.0

26.0

total

Integer

Total number of communities

Small, 29.0

26.0

Community Summary A community summary. Property Name

Type

Description

Filter Group and Version

Available Version

id

String

18-character ID of the community.

Small, 41.0

41.0

name

String

Localized name of the community.

Small, 41.0

41.0

683

Chatter REST API Developer Guide

Connect Directory

Connect Directory Property

Type

Description

Filter Group Available and Version Version

communities

Community[]

List of communities in the current organization

Small, 29.0

26.0

organization

String

URL to the Chatter organization

Small, 29.0

25.0

Content A file attached to a feed item. Property Name

Type

Description

Filter Group and Version

Available Version

checksum

String

MD5 checksum for the file.

Small, 36.0

36.0

contentHub Repository

Files Connect Repository

The external data source associated with this file, or null if it doesn’t point to an external file.

Small, 36.0

36.0

contentUrl

String

URL of the content for links and Google docs.

Small, 36.0

36.0

description

String

Description of the attachment.

Small, 36.0

36.0

downloadUrl

String

URL to the content.

Small, 36.0

36.0

external DocumentUrl

String

The external URL this file points to, or null Small, 36.0 if it doesn’t point to an external file.

36.0

Extension of the file.

Small, 36.0

36.0

fileExtension String fileSize

String

Size of the file in bytes. If size can’t be determined, returns unknown.

Small, 36.0

36.0

fileType

String

Type of file, such as PDF.

Small, 36.0

36.0

hasPdfPreview Boolean

true if the file has a PDF preview available, Medium, 36.0 false otherwise.

36.0

id

String

18-character ID of the content.

Small, 36.0

36.0

imageDetails

Image File Detail

Image details, or null if the file isn’t an image.

Big, 40.0

40.0

true if the file is synced with Salesforce

Small, 36.0

36.0

isInMyFileSync Boolean

Files Sync. mimeType

String

MIME type of the file.

Small, 36.0

36.0

renditionUrl

String

URL to the rendition resource for the file. For shared files, renditions process asynchronously after upload. For private

Small, 36.0

36.0

684

Chatter REST API Developer Guide

Property Name

Type

Content

Description

Filter Group and Version

Available Version

files, renditions process when the first file preview is requested, and aren’t available immediately after the file is uploaded. renditionUrl 240By180

String

URL to the 240 x 180 pixel rendition Small, 36.0 resource for the file. For shared files, renditions process asynchronously after upload. For private files, renditions process when the first file preview is requested, and aren’t available immediately after the file is uploaded.

36.0

renditionUrl 720By480

String

URL to the 720 x 480 pixel rendition Small, 36.0 resource for the file. For shared files, renditions process asynchronously after upload. For private files, renditions process when the first file preview is requested, and aren’t available immediately after the file is uploaded.

36.0

repositoryFile String Id

The ID of the file in the external repository, Small, 36.0 or null if the file isn’t external.

36.0

repositoryFile String Url

The URL of the Chatter REST API resource Small, 36.0 giving access to the external repository file properties, or null if this file doesn’t point to an external file.

36.0

sharingOption String

Sharing option of the file. Values are:

Medium, 36.0

36.0

• Allowed—Resharing of the file is allowed. • Restricted—Resharing of the file is restricted. String

Text preview of the file if available; null otherwise.

Big, 36.0

36.0

thumb120By90 String RenditionStatus

Specifies the rendering status of the 120 x 90 preview image of the file. One of these values:

Medium, 36.0

36.0

textPreview

• Processing—Image is being rendered. • Failed—Rendering process failed. • Success—Rendering process was successful. • Na—Rendering is not available for this image.

685

Chatter REST API Developer Guide

Property Name

Type

thumb240By180 String RenditionStatus

Content Capability

Description

Filter Group and Version

Specifies the rendering status of the 240 x Medium, 36.0 180 preview image of the file. One of these values:

Available Version 36.0

• Processing—Image is being rendered. • Failed—Rendering process failed. • Success—Rendering process was successful. • Na—Rendering is not available for this image. thumb720By480 String RenditionStatus

Specifies the rendering status of the 720 x Medium, 36.0 480 preview image of the file. One of these values:

36.0

• Processing—Image is being rendered. • Failed—Rendering process failed. • Success—Rendering process was successful. • Na—Rendering is not available for this image. title

String

Title of the file.

Small, 36.0

36.0

versionId

String

Version ID of the file.

Medium, 36.0

36.0

SEE ALSO: Files Capability

Content Capability If a comment has this capability, it has a file attachment. For files attached to a feed post (instead of a comment) in version 36.0 and later, use Files Capability. If content is deleted from a feed element after it’s posted or if the access to the content is changed to private, the Content Capability exists, however most of its properties are null. Property Name

Type

Description

Filter Group and Version

Available Version

checksum

String

MD5 checksum for the file.

Small, 32.0

32.0

686

Chatter REST API Developer Guide

Content Capability

Property Name

Type

Description

Filter Group and Version

Available Version

contentHub Repository

Files Connect Repository

The external data source associated with this file, or null if it doesn’t point to an external file.

Small, 32.0

32.0

contentUrl

String

URL of the content for links and Google docs.

Small, 32.0

32.0

description

String

Description of the attachment.

Small, 32.0

32.0

downloadUrl

String

URL to the content.

Small, 32.0

32.0

external DocumentUrl

String

The external URL this file points to, or null Small, 32.0 if it does not point to an external file.

32.0

Extension of the file.

Small, 32.0

32.0

fileExtension String fileSize

String

Size of the file in bytes. If size cannot be determined, returns Unknown.

Small, 32.0

32.0

fileType

String

Type of file.

Small, 32.0

32.0

hasPdfPreview Boolean

id

String

isInMyFileSync Boolean

true if the file has a PDF preview available, Medium, 32.0 false otherwise.

32.0

18-character ID of the content.

Small, 32.0

32.0

true if the file is synced with Salesforce Files Sync; false otherwise.

Small, 32.0

32.0

mimeType

String

MIME type of the file.

Small, 32.0

32.0

renditionUrl

String

URL to the rendition resource for the file. Small, 32.0 Renditions are processed asynchronously and may not be available immediately after the file has been uploaded.

32.0

renditionUrl 240By180

String

URL to the 240x180 size rendition resource Small, 32.0 for the file. Renditions are processed asynchronously and may not be available immediately after the file has been uploaded.

32.0

renditionUrl 720By480

String

URL to the 720x480 size rendition resource Small, 32.0 for the file. Renditions are processed asynchronously and may not be available immediately after the file has been uploaded.

32.0

repository FileId

String

The ID of the file in the external repository, Small, 36.0 or null if the file isn’t external.

36.0

repository FileUrl

String

The URL of the Chatter REST API resource Small, 32.0 giving access to the external repository file

32.0

687

Chatter REST API Developer Guide

Property Name

Type

Conversation Detail

Description

Filter Group and Version

Available Version

Medium, 35.0

35.0

Big, 32.0

32.0

properties, or null if this file doesn’t point to an external file. sharingOption String

Sharing option of the file. Values are: • Allowed—Resharing of the file is allowed. • Restricted—Resharing of the file is restricted.

textPreview

String

Text preview of the file if available, null otherwise. The maximum number of characters is 200.

thumb120By90 String RenditionStatus

The status of the rendering of the 120x90 Medium, 32.0 pixel sized preview image of the file. Should be either Processing, Failed, Success, or Na if unavailable.

32.0

thumb240By180 String RenditionStatus

The status of the rendering of the 240x180 Medium, 32.0 pixel sized preview image of the file. Should be either Processing, Failed, Success, or Na if unavailable.

32.0

thumb720By480 String RenditionStatus

The status of the rendering of the 720x480 Medium, 32.0 pixel sized preview image of the file. Should be either Processing, Failed, Success, or Na if unavailable.

32.0

title

String

Title of the file.

Small, 32.0

32.0

versionId

String

Version ID of the file.

Medium, 32.0

32.0

SEE ALSO: Feed Element Capabilities Comment Capabilities

Conversation Detail Property

Type

Description

Filter Group and Version

Available Version

conversationId

String

18-character ID of the conversation

Medium, 29.0

23.0

conversationUrl

String

URL to the conversation detail page

Small, 29.0

23.0

members

User Summary[]

Collection of users participating in this conversation

Small, 29.0

23.0

688

Chatter REST API Developer Guide

Conversation Summary

Property

Type

Description

Filter Group and Version

Available Version

messages

Message Collection

Messages in this conversation

Small, 29.0

23.0

read

Boolean

Does the context user have unread messages in Small, 29.0 this conversation?

23.0

Conversation Summary Property

Type

Description

Filter Group Available and Version Version

id

String

18-character ID of the conversation

Small, 29.0

23.0

The most recent message in this conversation

Small, 29.0

23.0

latestMessage Message members

User Summary[]

Collection of users participating in the conversation

Small, 29.0

23.0

read

Boolean

Does the context user have unread messages in this conversation?

Small, 29.0

23.0

url

String

URL to the conversation detail page

Small, 29.0

23.0

SEE ALSO: Conversation Summary Collection

Conversation Summary Collection Property

Type

Description

Filter Group Available and Version Version

Collection of zero or more conversations.

Small, 29.0

23.0

currentPageToken String

Token identifying the current page.

Medium, 37.0

37.0

currentPageUrl String

URL to the current page of conversations.

Medium, 29.0

23.0

nextPageToken String

Token identifying the next page, or null if there isn’t Small, 37.0 a next page.

37.0

URL to the next page of messages, that is, older conversations.

23.0

conversations Conversation

Summary[]

nextPageUrl

String

689

Small, 29.0

Chatter REST API Developer Guide

Conversation Unread Count

Conversation Unread Count Property

Type

Description

Filter Group Available and Version Version

hasMore

Boolean

true if the actual number of unread conversations is Small, 29.0 greater than 50, false otherwise

23.0

unreadCount

Integer

Number of unread conversations, that is, conversations Small, 29.0 that have unread messages. Is an exact value up to the maximum of 50, and is capped at 50 if the value is greater.

23.0

Custom List Audience Criteria The criteria for the custom list type of recommendation audience. Property Name

Type

Description

Filter Group and Version

Available Version

memberCount

Integer

Total number of members in the recommendation audience.

Small, 36.0

36.0

members

User Reference Collection

The members of the recommendation audience.

Big, 36.0

36.0

type

String

CustomList

Small, 36.0

36.0

SEE ALSO: Recommendation Audience

Dashboard Component Snapshot Represents both dashboard component snapshots and alerts you receive when a dashboard component value crosses a threshold. Property Name

Type

Description

Filter Group and Version

Available Version

componentId

String

18-character ID of the dashboard component.

Small, 32.0

32.0

componentName String

The dashboard component name.

Small, 32.0

32.0

dashboardBodyText String

Display this text next to the actor in the feed Small, 32.0 element.Use this text in place of the default body text.

32.0

18-character ID of the dashboard.

Small, 32.0

32.0

The name of the dashboard.

Small, 32.0

32.0

dashboardId

String

dashboardName String

690

Chatter REST API Developer Guide

Property Name

Type

Dashboard Component Snapshot Capability

Description

Filter Group and Version

Available Version

fullSizeImageUrl String

The source URL to retrieve the full-size image of a snapshot. Access this URL with OAuth credentials.

Small, 32.0

32.0

lastRefreshDate Date

ISO-8601 formatted date specifying when this dashboard component was last refreshed.

Small, 32.0

32.0

lastRefreshDate String DisplayText

Display text for the last refresh date, for example, “Last Refreshed on October 31, 2013.”

Small, 32.0

32.0

runningUser

User Summary

The running user of the dashboard at the time the snapshot was posted. This value may be null. Each dashboard has a running user, whose security settings determine which data to display in a dashboard.

Small, 32.0

32.0

thumbnailUrl

String

The source URL to retrieve the thumbnail image of a snapshot. Access this URL with OAuth credentials.

Small, 32.0

32.0

SEE ALSO: Dashboard Component Snapshot Capability

Dashboard Component Snapshot Capability If a feed element has this capability, it has a dashboard component snapshot. A snapshot is a static image of a dashboard component at a specific point in time. Property Name

Type

Description

Filter Group and Version

Available Version

dashboard Component Snapshot

Dashboard Component Snapshot

The dashboard component snapshot.

Small, 32.0

32.0

SEE ALSO: Feed Element Capabilities

Datacloud Company The Data.com company record. If you own a company record, you see all the fields. If you don’t own the company record, some fields are hidden by asterisks (***).

691

Chatter REST API Developer Guide

Datacloud Company

Property Name

Type

Description

Filter Group and Version

Available Version

active Contacts

Integer

The number of active contacts that the company has.

Small, 32.0

32.0

address

Address

The address of the company.

Small, 32.0

32.0

annual Revenue

Double

The amount of money that the company makes in one year.

Small, 32.0

32.0

companyId

String

The unique numerical identifier for the company.

Small, 32.0

32.0

The description of the company.

Small, 32.0

32.0

description String dunsNumber

String

A randomly generated nine-digit number that’s assigned by Dun & Bradstreet (D&B) to identify unique business establishments.

Small, 32.0

32.0

industry

String

A description for the area of focus in Small, 32.0 which the company does business.

32.0

isInactive

Boolean

Whether the company information is Small, 32.0 no longer accurate (true) or the company information is up-to-date (false).

32.0

isOwned

Boolean

Whether the company has been Small, 32.0 purchased by you or your organization (true) or not (false).

32.0

naicsCode

String

North American Industry Small, 32.0 Classification System (NAICS) codes were created to provide details about a business’s service orientation. The code descriptions are focused on what a business does.

32.0

A description of the NAICS classification.

Small, 32.0

32.0

naics String Description name

String

The company’s name.

Small, 32.0

32.0

numberOf Employees

Integer

The number of employees who are working for the company.

Small, 32.0

32.0

ownership

String

The type of ownership of the company:

Small, 32.0

32.0

• Public • Private • Government • Other

692

Chatter REST API Developer Guide

Property Name

Type

phoneNumbers Phone Number[]

Datacloud Company Collection

Description

Filter Group and Version

Available Version

A numerical string that contains a Small, 32.0 corporate telephone number for the company.

32.0

String

Standard Industrial Codes (SIC) is a Small, 32.0 numbering convention that indicates what type of service a business provides.

32.0

sic String Description

A description of the SIC classification. Small, 32.0

32.0

String

The type of location of the company, Small, 32.0 such as “Headquarters.”

32.0

tickerSymbol String

The symbol that uniquely identifies Small, 32.0 companies that are traded on public stock exchanges.

32.0

String

The symbol that uniquely identifies Small, 32.0 companies that are traded on public stock exchanges.

32.0

The date when the information was Small, 32.0 last updated for this company.

32.0

The URL to the company’s website.

Small, 32.0

32.0

The year when the company was founded.

Small, 32.0

32.0

sic

site

tradeStyle

updatedDate Date

website

String

yearStarted String

SEE ALSO: Datacloud Company Collection

Datacloud Company Collection Purchase details for all companies that were purchased for a specific order. Property Name

Type

Description

Filter Group and Version

Available Version

companies

Datacloud Company[]

A list of all companies for a specific order.

Small, 32.0

32.0

current PageUrl

String

The URL to the current page of companies.

Medium, 32.0

32.0

nextPageUrl String

The URL to the next page of Small, 32.0 companies. If there isn’t a next page, value is null.

693

32.0

Chatter REST API Developer Guide

Datacloud Contact

Property Name

Type

Description

Filter Group and Version

Available Version

previous PageUrl

String

The URL to the previous page of companies. The value is null if there isn’t a previous page.

Medium, 32.0

32.0

total

Integer

Number of companies in the order. Small, 32.0 Users can set how many companies are displayed on a page. The default page size is 25.

32.0

Datacloud Contact Information about Data.com contacts. If you own a contact, you see all the fields. If you don’t own the contact record, some fields are hidden by asterisks (***). Property Name

Type

Description

Filter Group and Version

Available Version

address

Address

A postal address for the company where this contacts works.

Small, 32.0

32.0

companyId

String

The unique numerical identifier for the company at which the contact works.

Small, 32.0

32.0

companyName String

The name of the company at which Small, 32.0 the contact works.

32.0

contactId

String

The unique numerical identifier for a Small, 32.0 contact.

32.0

department

String

The name of the department to which the contact is assigned.

Small, 32.0

32.0

email

String

An email address for this contact.

Small, 32.0

32.0

firstName

String

The first name of a contact.

Small, 32.0

32.0

isInactive

Boolean

A true or false response. True Small, 32.0 means that the record is no longer active. False means that the contact is still valid and active.

32.0

isOwned

Boolean

Specifies whether your organization Small, 32.0 owns this contact.

32.0

lastName

String

The last name of a contact.

Small, 32.0

32.0

level

String

A human resource label designating Small, 32.0 a person’s level in the company.

32.0

694

Chatter REST API Developer Guide

Property Name

Type

phoneNumbers Phone Number[]

title

String

updatedDate Date

Datacloud Contact Collection

Description

Filter Group and Version

Available Version

A numerical string that contains the Small, 32.0 direct-dial phone number for the contact.

32.0

The job title for a contact.

Small, 32.0

32.0

The date when the information for this contacts was updated.

Small, 32.0

32.0

SEE ALSO: Datacloud Contact Collection

Datacloud Contact Collection Purchase details for all contacts that were purchased for a specific order. Property Name

Type

Description

Filter Group and Version

Available Version

contacts

Datacloud Contact []

A list of all the contacts for a specificorderId.

Small, 32.0

32.0

current PageUrl

String

The current page of contacts.

Medium, 32.0

32.0

nextPageUrl String

The URL to the next page of contacts. Small, 32.0 If there’s only one page of contacts, the value is null.

32.0

32.0

previous PageUrl

String

The URL to the previous page of contacts. The value is null when there’s only one page of contacts.

total

Integer

Number of contacts that are Small, 32.0 associated with this order. The total number of contacts can be greater than the number of contacts that are displayed on a single page.

Datacloud Import Represents the Data.com contact import response.

695

Medium, 32.0

32.0

Chatter REST API Developer Guide

Datacloud Import Status

Property Name

Type

Description

Filter Available Group and Version Version

duplicatesSkippedCount

Integer

The number of duplicate records blocked from being added.

Small, 36.0

35.0

errorCount

Integer

The number of errors generated for this response.

Small, 36.0

35.0

The URL to the error message for this Small, 36.0 response.

35.0

errorMessageDescriptionUrl String

importStatus

Datacloud Import Status[]

The status of this response.

Small, 36.0

35.0

orgAllowsDuplicates

Boolean

Indicates whether duplicate rules are Small, 36.0 turned on for the organization. True means that the organization accepts duplicate records, and false means the organization blocks duplicate records.

35.0

successCount

Integer

The number of contacts successfully Small, 36.0 added to the organization.

35.0

Datacloud Import Status Represents the status for each contactId for this request. Property Name

Type

Description

Filter Group and Version

Available Version

datacloudId

String

The contact’s ID. Each contactId is a unique numeric value.

Small, 36.0

35.0

importStatus

String

The import status for each contact listed in Small, 36.0 the request. Values are:

35.0

• Duplicate • Error • Success

SEE ALSO: Datacloud Import

Datacloud Order Information about the Data.com records that you purchased and details of the purchase.

696

Chatter REST API Developer Guide

Datacloud Purchase Usage

Property Name

Type

Description

Filter Group and Version

Available Version

entityUrl

String

A URL to a list of purchased records for a specific order.

Small, 32.0

32.0

id

String

The orderId that identifies a specific order.

Small, 32.0

32.0

The number of records that were purchased Small, 32.0 for this order.

32.0

purchaseCount Integer

purchaseDate

Date

The date when records were purchased.

Small, 32.0

32.0

url

String

A URL for the order information for a specific Small, 32.0 order.

32.0

Datacloud Purchase Usage Information about the Data.com purchase usage for an organization. Shows the credits that are used and available for Monthly and Listpool users. Property Name

Type

listpool Integer CreditsAvailable

Description

Filter Group and Version

Available Version

Listpool credits that are available for all users Small, 32.0 in the Listpool group.

32.0

Listpool credits that were used by all the users in the Listpool group.

Small, 32.0

32.0

monthlyCredits Integer Available

Monthly credits that are assigned to a specific user.

Small, 32.0

32.0

monthlyCredits Integer Used

Monthly credits that were used by a specific Small, 32.0 user.

32.0

listpool CreditsUsed

Integer

Digest Job Represents a successfully enqueued API digest job request. Property Name

Type

Description

Filter Group and Version

period

String

Specifies the period of time that is included Small, 37.0 in a Chatter email digest. Values are: • DailyDigest—The email includes up to the 50 latest posts from the previous day.

697

Available Version 37.0

Chatter REST API Developer Guide

Property Name

Type

Direct Message Capability

Description

Filter Group and Version

Available Version

Filter Group and Version

Available Version

Member activities of the direct message, Membership Activity with the most recent activity first. Collection

Big, 40.0

40.0

Direct Message Member Collection

Members included in the direct message.

Small, 39.0

39.0

Original members of the direct message.

Big, 40.0

40.0

Subject of the direct message.

Small, 39.0

39.0

Description

Filter Group and Version

Available Version

currentPageToken String

Page token to access the current page of direct message members.

Small, 39.0

39.0

currentPageUrl String

URL to the current page of direct message Small, 39.0 members.

39.0

nextPageToken String

Page token to access the next page of direct Small, 39.0 message members.

39.0

URL to the next page of direct message members.

39.0

• WeeklyDigest—The email includes up to the 50 latest posts from the previous week.

Direct Message Capability If a feed element has this capability, it’s a direct message. Property Name

Type

Description

memberChanges Direct Message

members

originalMembers Direct Message

Member Collection subject

String

SEE ALSO: Feed Element Capabilities

Direct Message Member Collection A collection of direct message members. Property Name

nextPageUrl

Type

String

698

Small, 39.0

Chatter REST API Developer Guide

Direct Message Membership Activity

Property Name

Type

Description

Filter Group and Version

Available Version

users

User Summary[]

Collection of direct message members.

Small, 39.0

39.0

SEE ALSO: Direct Message Capability Direct Message Membership Activity

Direct Message Membership Activity Direct message membership activity. Property Name

Type

Description

Filter Group and Version

Available Version

activityDate

Date

Direct message member activity date.

Small, 40.0

40.0

actor

User Summary

User who changed the direct message membership.

Small, 40.0

40.0

membersAdded

Direct Message Member Collection

Members added to the direct message as part of the activity.

Small, 40.0

40.0

Members removed from the direct message Small, 40.0 as part of the activity.

40.0

membersRemoved Direct Message

Member Collection

SEE ALSO: Direct Message Membership Activity Collection

Direct Message Membership Activity Collection A collection of direct message member activities. Property Name

Type

Description

Filter Group and Version

Available Version

activities

Direct Message Membership Activity[]

Collection of direct message member activities.

Small, 40.0

40.0

currentPageToken String

Token identifying the current page.

Medium, 40.0

40.0

currentPageUrl String

Chatter REST API URL identifying the current Medium, 40.0 page.

40.0

nextPageToken String

Token identifying the next page, or null Small, 40.0 if there isn’t a next page.

40.0

699

Chatter REST API Developer Guide

Edit Capability

Property Name

Type

Description

Filter Group and Version

nextPageUrl

String

Chatter REST API URL identifying the next Small, 40.0 page, or null if there isn’t a next page. Check whether this value is null before getting another page. If a page doesn’t exist, a

Available Version 40.0

ConnectApi.NotFoundException

error is returned.

SEE ALSO: Direct Message Capability

Edit Capability If a feed element or comment has this capability, it can be edited by users who have permission. Property Name

Type

Description

Filter Group and Version

isEdit Restricted

Boolean

Specifies whether editing this feed element Small, 34.0 or comment is restricted. If true, the context user can’t edit this feed element or comment. If false, the context user may or may not have permission to edit this feed element or comment. To determine if a feed element or comment is editable by the context user, use the Feed Elements, Editability or Comment Capability, Editability resource.

34.0

isEditable ByMeUrl

String

The URL to check if the context user is able Medium, 34.0 to edit this feed element or comment.

34.0

lastEditedBy

User Detail

Who last edited this feed element or comment.

Small, 34.0

34.0

lastEditedDate Date

The most recent edit date of this feed element or comment.

Small, 34.0

34.0

latestRevision Integer

The most recent revision of this feed element or comment.

Small, 34.0

34.0

700

Available Version

Chatter REST API Developer Guide

Email Address

Property Name

Type

Description

Filter Group and Version

Available Version

relativeLast EditedDate

String

Relative last edited date, for example, “2h ago.”

Small, 34.0

34.0

SEE ALSO: Feed Element Capabilities Comment Capabilities

Email Address An email address for an email message sent from a case record in Case Feed. Property

Type

Description

Filter Group Available and Version Version

displayName

String

Display name for an email address

Small, 29.0

29.0

emailAddress

String

Email address

Small, 29.0

29.0

The summary of a related record, for example, a contact Small, 36.0 or user summary.

36.0

relatedRecord Record Summary

SEE ALSO: Email Message Capability

Email Attachment An email attachment in an email message. Property Name

Type

Description

Filter Group and Version

Available Version

attachment

Record Summary

Record summary of the attachment.

Small, 36.0

36.0

contentType

String

Type of attachment.

Small, 36.0

36.0

fileName

String

Name of the attachment.

Small, 36.0

36.0

SEE ALSO: Email Message Capability

Email Merge Field The map for objects and their merge fields.

701

Chatter REST API Developer Guide

Property Name

Type

entityToMerge Map

Email Merge Field Collection The merge fields for an object. Property Name

Type

Description

Filter Group and Version

Available Version

mergeFields

String[]

List of merge fields for a single object.

Small, 39.0

39.0

Email Message Capability If a feed element has this capability, it has an email message from a case. Property Name

Type

Description

Filter Group and Version

Available Version

attachments

Email Attachment[]

The attachments in the email message.

Big, 36.0

36.0

bccAddresses

Email Address[]

The BCC addresses for the email message.

Small, 36.0

36.0

body

String

The body of the email message.

Big, 36.0

36.0

ccAddresses

Email Address[]

The CC addresses for the email message.

Small, 36.0

36.0

direction

String

The direction of the email message. Values Small, 32.0 are:

32.0

• Inbound—An inbound message (sent by a customer). • Outbound—An outbound message (sent to a customer by a support agent). emailMessageId String

The ID of the email message.

Small, 32.0

32.0

fromAddress

Email Address

The From address for the email message.

Small, 36.0

36.0

isRichText

Boolean

Indicates whether the body of the email message is in rich text format.

Small, 36.0

36.0

subject

String

The subject of the email message.

Small, 32.0

32.0

textBody

String

The body of the email message.

Big, 32.0

32.0–35.0

Important: In version 36.0 and later, use the body property.

702

Chatter REST API Developer Guide

Emoji

Property Name

Type

Description

Filter Group and Version

Available Version

toAddresses

Email Address[]

The To addresses of the email message.

Small, 32.0

32.0

The total number of attachments in the email message.

Small, 38.0

38.0

totalAttachments Integer

SEE ALSO: Feed Element Capabilities

Emoji An emoji. Property Name

Type

Description

Filter Group and Version

Available Version

category

String

Emoji category.

Small, 39.0

39.0

shortcut

String

Emoji shortcut.

Small, 39.0

39.0

unicode Character

String

Emoji’s unicode character.

Small, 39.0

39.0

SEE ALSO: Emoji Collection

Emoji Collection A collection of emojis. Property Name

Type

Description

Filter Group and Version

Available Version

emojis

Emoji[]

A collection of emojis.

Small, 39.0

39.0

SEE ALSO: Supported Emojis

Enhanced Link Capability If a feed element has this capability, it has a link that may contain supplemental information like an icon, a title, and a description.

703

Chatter REST API Developer Guide

Entity Label

Property Name

Type

Description

Filter Group and Version

Available Version

description

String

A description with a 500 character limit.

Small, 32.0

32.0

icon

Icon

A icon.

Small, 32.0

32.0

linkRecordId

String

A ID associated with the link if the link URL Small, 32.0 refers to a Salesforce record.

32.0

linkUrl

String

A link URL to a detail page if available content can’t display inline.

Small, 32.0

32.0

title

String

A title to a detail page.

Small, 32.0

32.0

SEE ALSO: Feed Element Capabilities

Entity Label An entity's label. Property Name

Type

Description

Filter Group and Version

Available Version

label

String

Localized singular label of the entity.

Small, 40.0

40.0

labelPlural

String

Localized plural label of the entity.

Small, 40.0

40.0

SEE ALSO: Record Summary

Environment Hub My Domain Validation Results from an attempt to validate a My Domain value.

704

Chatter REST API Developer Guide

Property Name

Type

validationError String

Environment Hub OAuth URL

Description

Filter Group and Version

Available Version

A validation error for a proposed domain. One of these values:

Small, 36.0

36.0

• Duplicate—The proposed domain is already in use. • Invalid—The proposed domain is not a valid CNAME. • Valid—The proposed domain is valid.

SEE ALSO: Environment Hub My Domain Validation

Environment Hub OAuth URL An OAuth URL that initiates the workflow to connect an org to an Environment Hub. Property Name

Type

Description

Filter Group and Version

Available Version

oauthUrl

String

The generated URL.

Small, 36.0

36.0

SEE ALSO: Environment Hub OAuth URL Generator

Environment Hub Sign-up Member Validation The results from validation of the input parameters used to create an Environment Hub member org. Property Name

Type

Description

errorMessage

String

If the parameters were invalid, this property Small, 36.0 contains the error string.

36.0

orgEdition

String

If the parameters were valid, this property contains the edition of the member org.

Small, 36.0

36.0

If the parameters were valid, this property Small, 36.0 contains the trial length of the member org.

36.0

trialMaxLengthDays Integer

Filter Group and Version

SEE ALSO: Environment Hub Sign-up Member Validation

705

Available Version

Chatter REST API Developer Guide

Environment Hub SSO User Mapping Validation

Environment Hub SSO User Mapping Validation Results from validating a potential SSO user mapping between a user in an Environment Hub and a user in a hub member org. Property Name

Type

errorFieldNames String[]

Description

Filter Group and Version

Available Version

If the parameters were invalid, this property Small, 36.0 contains the names of fields with errors.

36.0

errorMessage

String

If the parameters were invalid, this property Small, 36.0 contains the error string.

36.0

hubUserId

String

The ID of a user in an Environment Hub organization.

Small, 36.0

36.0

memberUsername String

The username of a user in an Environment Small, 36.0 Hub member organization.

36.0

userMappingId String

The ID of the new SSO user mapping.

36.0

Small, 36.0

SEE ALSO: Environment Hub SSO User Mapping Generator

Error Message Property

Type

Description

Filter Group Available and Version Version

errorCode

String

An error code with information about the error, for example, INSUFFICIENT_PRIVILEGES

Small, 29.0

23.0

message

String

Description of error

Small, 29.0

23.0

Error with Output Contains extra information about errors. In rare cases, an error message isn't enough to describe the reason for a failure. For example, when a conflicting precondition exists, the error result can include the information about the cause of the conflict. Property

Type

enhancedErrorType String

Description

Filter Group Available and Version Version

Indicates the type of the output property. This value Small, 39.0 is either null or:

39.0

• GroupMembershipRequestError–A nested Group Membership Request. message

String

Description of the error

706

Small, 29.0

27.0

Chatter REST API Developer Guide

Explanation Details

Property

Type

Description

Filter Group Available and Version Version

output

Any response body

The response body returned by the requested resource. Small, 29.0 For example, if a successful request returns a Like response body but an error triggers the Error with Output response body, the value of the output property is a Like response body.

27.0

Explanation Details Represents a detailed explanation for some recommendations. Property

Type

Description

Filter Group Available and Version Version

data

Various

More information about the recommendation. The value of the type property determines what is returned.

Small, 29.0

24.0

• UserFollowsSameUsers—people that both the user and recommended person are following. See User Summary. • GroupMembersFollowed—people that the user is following and that are members of the recommended group. See User Summary. • UserViewingSameRecords—records that the user and the recommended person have recently viewed. See Record Summary. • RecordParentOfFollowed—records that the user is following and that are child records of the recommended record. See Record Summary. summary

String

Summary explanation for recommendation.

Small, 29.0

24.0

type

String

Indicates the reason for the recommendation.

Small, 29.0

24.0

• ArticleHasRelatedContent—Articles with related content to a context article. • ArticleViewedTogether—Articles often viewed together with the article that the context user just viewed. • ArticleViewedTogetherWithViewers—Articles often viewed together with other records that the context user views. • Custom—Custom recommendations. • FilePopular—Files with many followers or views.

707

Chatter REST API Developer Guide

Property

Type

Explanation Details

Description

Filter Group Available and Version Version

• FileViewedTogether—Files often viewed at the same time as other files that the context user views. • FollowedTogetherWithFollowees—Users often followed together with other records that the context user follows. • GroupMembersFollowed—Groups with members that the context user follows. • GroupNew—Recently created groups. • GroupPopular—Groups with many active members. • ItemViewedTogether—Records often viewed at the same time as other records that the context user views. • PopularApp—Applications that are popular. • RecordOwned—Records that are owned by the context user. • RecordParentOfFollowed—Parent records of records that the context user follows. • RecordViewed—Records that the context user recently viewed. • TopicFollowedTogether—Topics often followed together with the record that the context user just followed. • TopicFollowedTogetherWithFollowees—Topics often followed together with other records that the context user follows. • TopicPopularFollowed—Topics with many followers. • TopicPopularLiked—Topics on posts that have many likes. • UserDirectReport—Users who report to the context user. • UserFollowedTogether—Users often followed together with the record that the context user just followed. • UserFollowsSameUsers—Users who follow the same users as the context user. • UserManager—The context user’s manager. • UserNew—Recently created users. • UserPeer—Users who report to the same manager as the context user.

708

Chatter REST API Developer Guide

Property

Type

Explanation Summary

Description

Filter Group Available and Version Version

• UserPopular—Users with many followers. • UserViewingSameRecords—Users who view the same records as the context user.

Explanation Summary Represents a summary explanation for a recommendation. Property

Type

Description

Filter Group Available and Version Version

detailsUrl

String

URL for explanation details or null if the Small, 29.0 recommendation doesn’t have a detailed explanation.

24.0

summary

String

Summary explanation for recommendation.

23.0

709

Small, 29.0

Chatter REST API Developer Guide

Explanation Summary

Property

Type

Description

Filter Group Available and Version Version

type

String

Indicates the reason for the recommendation.

Small, 29.0

• ArticleHasRelatedContent—Articles with related content to a context article. • ArticleViewedTogether—Articles often viewed together with the article that the context user just viewed. • ArticleViewedTogetherWithViewers—Articles often viewed together with other records that the context user views. • Custom—Custom recommendations. • FilePopular—Files with many followers or views. • FileViewedTogether—Files often viewed at the same time as other files that the context user views. • FollowedTogetherWithFollowees—Users often followed together with other records that the context user follows. • GroupMembersFollowed—Groups with members that the context user follows. • GroupNew—Recently created groups. • GroupPopular—Groups with many active members. • ItemViewedTogether—Records often viewed at the same time as other records that the context user views. • PopularApp—Applications that are popular. • RecordOwned—Records that are owned by the context user. • RecordParentOfFollowed—Parent records of records that the context user follows. • RecordViewed—Records that the context user recently viewed. • TopicFollowedTogether—Topics often followed together with the record that the context user just followed. • TopicFollowedTogetherWithFollowees—Topics often followed together with other records that the context user follows. • TopicPopularFollowed—Topics with many followers. • TopicPopularLiked—Topics on posts that

710

24.0

Chatter REST API Developer Guide

Property

Type

Extension

Description

Filter Group Available and Version Version

have many likes. • UserDirectReport—Users who report to the context user. • UserFollowedTogether—Users often followed together with the record that the context user just followed. • UserFollowsSameUsers—Users who follow the same users as the context user. • UserManager—The context user’s manager. • UserNew—Recently created users. • UserPeer—Users who report to the same manager as the context user. • UserPopular—Users with many followers. • UserViewingSameRecords—Users who view the same records as the context user.

SEE ALSO: Non-Entity Recommendation

Extension An extension. Property Name

Type

alternative Alternative Representation

Description

Filter Group and Version

Available Version

Alternative representation of the extension. Small, 40.0

40.0

attachmentId

String

Attachment ID of the extension.

Small, 41.0

41.0

extensionId

String

ID of the extension.

Small, 40.0

40.0

payload

String

Payload associated with the extension.

Small, 40.0

40.0

Payload version that identifies the structure Small, 40.0 of the payload associated with the extension.

40.0

payloadVersion String

SEE ALSO: Extensions Capability

711

Chatter REST API Developer Guide

Extension Definition

Extension Definition An extension's definition. Property Name

Type

Description

Filter Group and Version

canAccess

Boolean

Indicates whether users can access the Small, 40.0 extension when it’s associated with a feed element.

40.0

canCreate

Boolean

Indicates whether users can create a feed element with the extension in the org.

Small, 40.0

40.0

createdDate

Date

Date when the extension was created.

Small, 40.0

40.0

description

String

Description of the extension.

Big, 40.0

40.0

iconUrl

String

URL to the icon for the extension.

Small, 40.0

40.0

id

String

ID of the extension.

Small, 40.0

40.0

information Collection

Lightning Extension Collection of extension information. Information[]

Small, 40.0

40.0

isEnabled InCommunity

Boolean

Indicates whether the extension is enabled Small, 40.0 in communities.

40.0 only

isEnabled InLightning Publisher

Boolean

Indicates whether the extension is enabled Small, 40.0 in the Lightning publisher.

40.0 only

name

String

Name of the extension.

40.0

position

Integer

Position in which the extension is displayed Small, 41.0 in the publisher.

Medium, 40.0

Available Version

41.0

SEE ALSO: Extension Definition Collection

Extension Definition Collection Collection of extension definitions. Property Name

Description

Filter Group and Version

Available Version

currentPageToken String

Token identifying the current page.

Small, 40.0

40.0

currentPageUrl String

Chatter REST API URL identifying the current Small, 40.0 page.

40.0

Collection of extension definitions.

40.0

extension Definitions

Type

Extension Definition[]

712

Small, 40.0

Chatter REST API Developer Guide

Property Name

Type

Extensions Capability

Description

Filter Group and Version

Available Version

nextPageToken String

Token identifying the next page, or null Small, 40.0 if there isn’t a next page.

40.0

String

Chatter REST API URL identifying the next Small, 40.0 page, or null if there isn’t a next page. Check whether this value is null before getting another page. If a page doesn’t exist, a

40.0

nextPageUrl

ConnectApi.NotFoundException

error is returned. total

Integer

Total number of extensions returned.

Small, 40.0

40.0

Extensions Capability If a feed element has this capability, it has one or more extensions associated with it. Property Name

Type

Description

Filter Group and Version

Available Version

items

Extension[]

Collection of extensions.

Small, 40.0

40.0

Description

Filter Group and Version

Available Version

Available permission types for the parent folder of the external file, or null for non-external files or when

Small, 35.0

35.0

Small, 35.0

35.0

Explanation of the failure if a failure occurred Small, 35.0 and

35.0

SEE ALSO: Feed Element Capabilities

External File Permission Information External file permissions information. Property Name

Type

external Files Connect FilePermission Permission Type[] Types

includeExternalFilePermissionsInfo

is false. external Boolean FilePermissions Failure

true if the retrieval of external file

information failed or if includeExternalFilePermissionsInfo

is false; false otherwise. external String FilePermissions InfoFailureReason

713

Chatter REST API Developer Guide

Property Name

Type

Favorite

Description

Filter Group and Version

Available Version

includeExternalFilePermissionsInfo

is true; null otherwise. external FileSharing Status

String

Specifies the sharing status for the external Small, 35.0 file. Values are:

35.0

• DomainSharing—File is shared with the domain. • PrivateSharing—File is private or shared only with individuals. • PublicSharing—File is publicly shared. Value is null for non-external files or when includeExternalFilePermissionsInfo

is false. repositoryPublic Repository Group Summary[] Groups

Available public groups in the external repository or null for non-external files or when

Small, 35.0

35.0

includeExternalFilePermissionsInfo

is false.

SEE ALSO: File Summary Repository File Summary

Favorite Property

Type

Description

Filter Group Available and Version Version

community

Reference

Information about the community. Returns null if favorite exists in default community or communities aren’t enabled.

Medium, 29.0

26.0

createdBy

User Summary

Information about the original creator of the favorite

Medium, 29.0

24.0

feedUrl

String

URL to the feed item for this favorite

Small, 29.0

24.0

id

String

18-character ID of the favorite

Small, 29.0

24.0

lastViewDate

String

ISO8601 date string, for example, 2011-02-25T18:24:31.000Z

Medium, 29.0

24.0

name

String

Name of the favorite

Small, 29.0

24.0

714

Chatter REST API Developer Guide

Favorites Page

Property

Type

Description

Filter Group Available and Version Version

searchText

String

If the favorite is from a search, contains the search text, Medium, 29.0 if not, contains null.

24.0

target

Reference

A reference to the topic if applicable, null otherwise Small, 29.0

28.0

type

String

One of the following values:

Small, 29.0

24.0

• ListView • Search • Topic url

String

URL to this favorite

Small, 29.0

24.0

user

User Summary

Information about the user who saved this favorite

Medium, 29.0

24.0

SEE ALSO: Favorites Page Feed Directory

Favorites Page Property

Type

Description

Filter Group Available and Version Version

favorites

Favorite[]

Collection of one or more favorites

Small, 29.0

24.0

total

Integer

Total number of favorites

Small, 29.0

24.0

Features Features that are available to the context user. If a feature is disabled, the resources associated with that feature are unavailable and some feature-related properties on objects are set to null. Property

Type

Description

Filter Group Available and Version Version

Reserved for future use.

Small, 37.0

37.0

Specifies whether Chatter is enabled for an org.

Small, 29.0

27.0

chatterActivity Boolean

Specifies whether the user details include information Small, 29.0 about Chatter activity.

24.0

chatterAnswers Boolean

Specifies whether Chatter Answers is enabled.

29.0

activityReminder Boolean NotificationsEnabled chatter

Boolean

715

Small, 29.0

Chatter REST API Developer Guide

Property

Type

chatter Boolean GlobalInfluence

Features

Description

Filter Group Available and Version Version

Specifies whether the user details include global Chatter Small, 29.0 activity.

24.0

chatter GroupRecords

Boolean

Specifies whether Chatter groups can have records associated with them.

Small, 33.0

33.0

chatter GroupRecord Sharing

Boolean

Specifies whether Chatter records are implicitly shared Small, 33.0 among group members when records are added to groups.

33.0

chatter Messages

Boolean

Specifies whether Chatter messages are enabled for the org.

Small, 29.0

24.0

Specifies whether Chatter topics are enabled.

Small, 29.0

28.0

chatterTopics Boolean communities Enabled

Boolean

Specifies whether Salesforce Communities is enabled. Small, 31.0

31.0

community Moderation

Boolean

Specifies whether community moderation is enabled for the org.

Small, 29.0

29.0

community Reputation

Boolean

Specifies whether reputation is enabled for communities in the org.

Small, 32.0

32.0

dashboard Component Snapshots

Boolean

Specifies whether the user can post dashboard component snapshots.

Small, 29.0

24.0

The ISO code of the default currency. Applicable only when multiCurrency is false.

Small, 29.0

28.0

defaultCurrency String IsoCode feedPolling

Boolean

Reserved for future use.

Small, 29.0

24.0

feedStream Enabled

Boolean

Indicates whether Chatter feed streams are enabled for Small, 39.0 the org.

39.0

files

Boolean

Specifies whether files can act as resources for Chatter Small, 29.0 REST API.

24.0

filesOnComments Boolean

Specifies whether files can be attached to comments. Small, 29.0

24.0

groupsCanFollow Boolean

Reserved for future use.

Small, 29.0

28.0–29.0

ideas

Boolean

Specifies whether Ideas is enabled.

Small, 29.0

29.0

liveAgent HostName

String

Live Agent host name configured for the org.

Small, 41.0

41.0

managedTopics Boolean Enabled

Indicates access to the community home feed and the Small, 32.0 managed topic feed.

32.0

maxEntity Integer Subscriptions PerStream

Specifies the maximum number of feed-enabled entities Small, 39.0 that can be subscribed to in a Chatter stream.

39.0

716

Chatter REST API Developer Guide

Feed

Property

Type

Description

Filter Group Available and Version Version

maxFiles PerFeedItem

Integer

Specifies the maximum number of files that can be added to a feed item.

Small, 36.0

36.0

maxStreams PerPerson

Integer

Specifies the maximum number of Chatter streams that Small, 39.0 a user can have.

39.0

mobile Boolean Notifications Enabled

Reserved for future use.

Small, 29.0

29.0

multiCurrency Boolean

Indicates whether the user’s org uses multiple Small, 29.0 currencies (true) or not (false). When false, the defaultCurrencyIsoCode indicates the ISO code of the default currency.

28.0

offlineEditEnabled Boolean

Specifies whether the offline object permissions are enabled for Salesforce for Android and Salesforce for iOS mobile clients.

Small, 37.0

37.0

publisherActions Boolean

Indicates whether actions in the publisher are enabled. Small, 29.0

28.0

Boolean

Indicates whether the Salesforce for Android and Small, 30.0 Salesforce for iOS can use secure, persistent storage on mobile devices to cache data.

30.0

Specifies whether trending topics are enabled.

Small, 29.0

24.0

storeData OnDevices Enabled

trendingTopics Boolean viralInvites Allowed

Boolean

Specifies whether existing Chatter users can invite people in their company to use Chatter.

Small, 29.0

24.0

wave

Boolean

Indicates whether Wave is enabled.

Small, 36.0

36.0

Property

Type

Description

Filter Group Available and Version Version

feedElement PostUrl

String

URL for posting feed elements to this subject

Small, 31.0

SEE ALSO: Connect Resources Organization

Feed

When returned by a request that includes the HTTP header X-Connect-Bearer-Urls: true, the URL includes a bearer token. Use this bearer token URL to make POST requests.

717

31.0

Chatter REST API Developer Guide

Feed Directory

Property

Type

Description

Filter Group Available and Version Version

feedElements

Feed Element Page

Page of feed elements for the feed specified in redirectedFeedType. Otherwise, null.

Small, 40.0

40.0

URL of feed elements

Small, 31.0

31.0

URL of feed items

Small, 29.0

23.0–31.0

feedElementsUrl String feedItemsUrl

String

isModifiedUrl String

A News Feed Is-Modified resource with a since Small, 29.0 request parameter that contains an opaque token that describes when the feed was last modified. Returns null if feed is not a news feed.

23.0

Important: This feature is available through a Feed Polling pilot program. This pilot program is closed and not accepting new participants. pinnedFeed ElementsUrl

String

URL of pinned feed items.

Small, 41.0

41.0

Note: This release contains a beta version of pinned posts, which means it’s a high-quality feature with known limitations. Post pinning isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features. You can provide feedback and suggestions for pinned posts in the Trailblazer Community.

(Beta)

redirected FeedType

String

Specifies which feed is returned if pageSize is specified. Otherwise, null.

Small, 40.0

40.0

respectsMute

Boolean

Indicates whether the feed respects the mute feature. Small, 35.0 If true, the feed shows the ability to mute or unmute each element, depending on the value of isMutedByMe; null if the mute feature is disabled for the organization.

35.0

Feed Directory Property

Type

Description

Filter Group Available and Version Version

favorites

Favorite[]

Collection of favorites that the context user has saved. Small, 29.0

718

24.0

Chatter REST API Developer Guide

Feed Directory Item

Property

Type

Description

Filter Group Available and Version Version

feeds

Feed Directory Item[] Collection of feed directory items that the context user Small, 29.0 is allowed to view

23.0

Feed Directory Item The definition of a feed. Property

Type

feedElementsUrl String

Description

Filter Group Available and Version Version

URL to the resource of the feed elements for a specific Small, 31.0 feed. For example:

31.0

/chatter/feeds/files/me/feed-elements

feedItemsUrl

String

URL to the resource of the feed items for a specific feed. Small, 29.0 For example:

23.0–31.0

/chatter/feeds/files/me/feed-elements

feedType

String

The feed type. One of these values: • Bookmarks—Contains all feed items saved as bookmarks by the context user. • Company—Contains all feed items except feed items of type TrackedChange. To see the feed item, the user must have sharing access to its parent. • DirectMessageModeration—Contains all direct messages that are flagged for moderation. The Direct Message Moderation feed is available only to users with Moderate Communities Chatter Messages permissions. • DirectMessages—Contains all feed items of the context user’s direct messages. • Files—Contains all feed items that contain files posted by people or groups that the context user follows. • Filter—Contains the news feed filtered to contain feed items whose parent is a specified object type. • Groups—Contains all feed items from all groups the context user either owns or is a member of. • Home—Contains all feed items associated with any managed topic in a community.

719

Big, 30.0

30.0

Chatter REST API Developer Guide

Property

Type

Feed Directory Item

Description

Filter Group Available and Version Version

• Landing—Contains all feed items that best drive user engagement when the feed is requested. Allows clients to avoid an empty feed when there aren’t many personalized feed items. • Moderation—Contains all feed items that are flagged for moderation, except direct messages. The Communities Moderation feed is available only to users with Moderate Community Feeds permissions. • Mute—Contains all feed items that the context user muted. • News—Contains all updates for people the context user follows, groups the user is a member of, and files and records the user is following. Also contains all updates for records whose parent is the context user and every feed item and comment that mentions the context user or that mentions a group the context user is a member of. • PendingReview—Contains all feed items and comments that are pending review. • People—Contains all feed items posted by all people the context user follows. • Record—Contains all feed items whose parent is a specified record, which could be a group, user, object, file, or any other standard or custom object. When the record is a group, the feed also contains feed items that mention the group. When the record is a user, the feed contains only feed items on that user. You can get another user’s record feed. • Streams—Contains all feed items for any combination of up to 25 feed-enabled entities, such as people, groups, and records, that the context user subscribes to in a stream. • To—Contains all feed items with mentions of the context user, feed items the context user commented on, and feed items created by the context user that are commented on. • Topics—Contains all feed items that include the specified topic. • UserProfile—Contains feed items created when a user changes records that can be tracked in a feed, feed items whose parent is the user, and feed items that @mention the user. This feed is different than the news feed, which returns more

720

Chatter REST API Developer Guide

Property

Type

Feed Element Capabilities

Description

Filter Group Available and Version Version

feed items, including group updates. You can get another user’s user profile feed. feedUrl

String

URL to the resource of a specific feed. For example:

Small, 29.0

23.0

/services/data/v41.0/ chatter/feeds/files/me

keyPrefix

String

For filter feeds, this value is the key prefix associated Big, 30.0 with the entity type used to filter this feed. All feed items in this feed have a parent whose entity type matches this key prefix value. For non-filter feeds, this value is null.

30.0

A key prefix is the first three characters of a record ID, which specifies the entity type. label

String

Name of the feed, such as, Groups, People, Company, Small, 29.0 and so on

23.0

SEE ALSO: Feed Directory

Feed Element Capabilities A container for all capabilities that can be included with a feed element. In API version 30.0 and earlier, most feed items can have comments, likes, topics, and so on. In version 31.0 and later, every feed item (and feed element) can have a unique set of capabilities. If a capability property exists on a feed element, that capability is available, even if the capability property doesn’t have a value. For example, if the ChatterLikes capability property exists on a feed element (with or without a value), the context user can like that feed element. If the capability property doesn’t exist, it isn’t possible to like that feed element. A capability can also contain associated data. For example, the Moderation capability contains data about moderation flags. Property Name

Type

approval

Approval Capability If a feed element has this capability, it includes information about an approval.

associatedActions Associated Actions

Capability

Description

Filter Group and Available Version Version Small, 32.0

32.0

If a feed element has this capability, it has Small, 31.0 platform actions associated with it.

31.0

banner

Banner Capability

If this feed element has this capability, it has a banner motif and style.

Small, 31.0

31.0

bookmarks

Bookmarks Capability

If a feed element has this capability, the context user can bookmark it.

Small, 31.0

31.0

721

Chatter REST API Developer Guide

Feed Element Capabilities

Property Name

Type

Description

bundle

Generic Bundle Capability

If a feed element has this capability, the Small, 31.0 feed element may be a group of other feed elements condensed into one.

31.0

or

Filter Group and Available Version Version

Tracked Change Bundle Capability canvas

Canvas Capability

If a feed element has this capability, it renders a canvas app.

Small, 32.0

32.0

caseComment

Case Comment Capability

If a feed element has this capability, it has Small, 32.0 a case comment on the case feed.

32.0

chatterLikes

Chatter Likes Capability

If a feed element has this capability, the Small, 31.0 context user can like it. Exposes information about existing likes.

31.0

comments

Comments Capability

If a feed element has this capability, the context user can add a comment.

31.0

content

Content Capability

If a comment has this capability, it has a file Small, 32.0 attachment.

Small, 31.0

32.0–35.0

Most Content Capability properties are null if the content has been deleted from the feed element or if the access has changed to private. Important: In version 36.0 and later, use the files property. dashboardComponent Dashboard Component Snapshot

If a feed element has this capability, it has Small, 32.0 a dashboard component snapshot. A Snapshot Capability snapshot is a static image of a dashboard component at a specific point in time.

32.0

directMessage

Direct Message Capability

If a feed element has this capability, it’s a direct message.

Small, 39.0

39.0

edit

Edit Capability

If a feed element has this capability, users Small, 34.0 who have permission can edit it.

34.0

emailMessage

Email Message Capability

If a feed element has this capability, it has Small, 32.0 an email message from a case.

32.0

enhancedLink

Enhanced Link Capability

If a feed element has this capability, it has Small, 32.0 a link that may contain supplemental information like an icon, a title, and a description.

32.0

extensions

Extensions Capability

If a feed element has this capability, it has Small, 40.0 one or more extension attachments.

40.0

722

Chatter REST API Developer Guide

Property Name

Type

feedEntityShare Feed Entity Share

Capability

Feed Element Capabilities

Description

Filter Group and Available Version Version

If a feed element has this capability, a feed Small, 39.0 entity is shared with it.

39.0

files

Files Capability

If a feed element has this capability, it has Small, 36.0 one or more file attachments.

36.0

interactions

Interactions Capability

If a feed element has this capability, it has Small, 37.0 information about user interactions.

37.0

link

Link Capability

If a feed element has this capability, it has Small, 32.0 a link.

32.0

If a feed element has this capability, it has Small, 41.0 one or more media references.

41.0

mediaReferences Media Reference

Capability moderation

Moderation Capability

If a feed element has this capability, users Small, 31.0 in the community can flag the feed element for moderation. This response body also includes information about the flagged content.

31.0

mute

Mute Capability

If a feed element has this capability, users Small, 35.0 can mute it.

35.0

origin

Origin Capability

If a feed element has this capability, it was Small, 33.0 created by a feed action.

33.0

pin (Beta)

Pin Capability (Beta) If a feed element has this capability, users Small, 41.0 who have permission can pin it to a feed.

41.0

Note: This release contains a beta version of pinned posts, which means it’s a high-quality feature with known limitations. Post pinning isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features. You can provide feedback and suggestions for pinned posts in the Trailblazer Community. poll

Poll Capability

If a feed element has this capability, the Small, 31.0 feed element can include a poll for voting.

723

31.0

Chatter REST API Developer Guide

Property Name

Feed Element Page

Type

Description

questionAndAnswers Question and

Answers Capability

readBy

Read By Capability

recommendations Recommendations

Capability recordSnapshot Record Snapshot

Capability

Filter Group and Available Version Version

If a feed element has this capability, it has Small, 31.0 a question and comments on the feed element are answers to the question.

31.0

If a feed element has this capability, the context user can mark it as read.

Small, 40.0

40.0

If a feed element has this capability, it has Small, 32.0 a recommendation.

32.0

If a feed element has this capability, it contains all the snapshotted fields of a record for a single create record event.

Small, 32.0

32.0

socialPost

Social Post Capability

If a feed element has this capability, it can Small, 36.0 interact with a social post on a social network.

36.0

status

Status Capability

If a feed post or comment has this capability, it has a status that determines its visibility.

Small, 37.0

37.0

topics

Topics Capability

If a feed element has this capability, the context user can add topics to it. Topics help users organize and discover conversations.

Small, 31.0

31.0

If a feed element has this capability, it Small, 32.0 contains all changes to a record for a single tracked change event.

32.0

Capability Up Down Vote Capability

If a feed post or comment has this capability, users can vote it up or down.

41.0

trackedChanges Tracked Changes

upDownVote

Small, 41.0

SEE ALSO: Feed Item Generic Feed Element Feed Item Summary

Feed Element Page Container of feed elements with paginated results. Property Name

Type

Description

Filter Group and Version

Available Version

currentPageToken

String

Token identifying the current page.

Medium, 37.0

37.0

724

Chatter REST API Developer Guide

Feed Element Page

Property Name

Type

Description

Filter Group and Version

Available Version

currentPageUrl

String

Chatter REST API URL identifying the current page.

Medium, 31.0

31.0

Collection of feed elements. A feed element can be any of these:

Small, 31.0

31.0

elements

• Generic Feed Element • Feed Item isModifiedToken

String

An opaque polling token that describes Medium, 31.0 when a news feed was last modified. Use this as the value in the since request parameter of the

31.0

/chatter/feeds/news/me /feed-elements/is-modified

resource. Important: This feature is available through a Feed Polling pilot program. This pilot program is closed and not accepting new participants. isModifiedUrl

String

A Chatter REST API URL with a since Medium, 31.0 request parameter that contains an opaque token that describes when the feed was last modified. Returns null if the feed isn’t a news feed. Use this URL to poll a news feed for updates.

31.0

Important: This feature is available through a Feed Polling pilot program. This pilot program is closed and not accepting new participants. nextPageUrl

String

Chatter REST API URL identifying the Small, 31.0 next page, or null if there isn’t a next page. Check whether this value is null before getting another page. If a page doesn’t exist, a

31.0

ConnectApi.NotFoundException

error is returned. updatesToken

String

Token to use in an updatedSince Big, 31.0 parameter, or null if not available. An opaque polling token that describes when a news feed was last modified. Use this token as the value in the

725

31.0

Chatter REST API Developer Guide

Property Name

Feed Enabled Entity Summary

Type

Description

Filter Group and Version

Available Version

updatedSince request parameter

of the /chatter/feeds/news/me/feed-elements

resource. String

updatesUrl

A resource with the feed elements Big, 31.0 updated since the feed was refreshed. Value is null if the feed doesn’t support updates polling.

31.0

SEE ALSO: Generic Bundle Capability Tracked Change Bundle Capability Feed

Feed Enabled Entity Summary An entity that can have feeds associated with it. Property Name

Type

Description

Filter Group and Version

Available Version

id

String

The 18-character ID of the record.

Small, 39.0

39.0

motif

Motif

Small, medium, and large icons indicating the record's type.

Small, 39.0

39.0

name

String

The localized name of the record.

Small, 39.0

39.0

type

String

The type of the record.

Small, 39.0

39.0

url

String

URL to the record.

Small, 39.0

39.0

Description

Filter Group and Version

Available Version

true if the context user can add and

Small, 36.0

36.0

SEE ALSO: Chatter Stream

Feed Entity Is Editable Indicates whether the context user can edit a feed element or comment. Property Name

Type

areAttachments Boolean EditableByMe

remove attachments on the feed element or comment, false otherwise.

726

Chatter REST API Developer Guide

Property Name

Type

Feed Entity Not Available Summary

Description

Filter Group and Version

Available Version

feedEntityUrl String

URL of the feed element or comment.

Small, 34.0

34.0

isEditableByMe Boolean

true if the context user can edit the feed Small, 34.0 element or comment, false otherwise.

34.0

Feed Entity Not Available Summary A summary when the feed entity isn’t available. Property Name

Type

Description

Filter Group and Version

Available Version

actor

One of these response bodies:

null

Small, 39.0

39.0

• Record Summary • User Summary • Unauthenticated User body

Feed Item Body

null

Small, 39.0

39.0

createdDate

Date

null

Small, 39.0

39.0

feedElementType String

null

Small, 39.0

39.0

id

String

null

Small, 39.0

39.0

isEntity Available

Boolean

The value is false because the user doesn’t have access to the entity or the entity was deleted.

Small, 39.0

39.0

parent

One of these response bodies:

null

Medium, 39.0

39.0

relativeCreated String Date

null

Small, 39.0

39.0

String

null

Small, 39.0

39.0

• File Summary • Group • Record Summary • User Summary

url

727

Chatter REST API Developer Guide

Feed Entity Share Capability

Feed Entity Share Capability If a feed element has this capability, a feed entity is shared with it. Property Name

Type

Description

Filter Group and Version

Available Version

feedEntity

One of these response bodies:

The summary of the feed entity that is shared with the feed element.

Small, 39.0

39.0

• Feed Item Summary • Feed Entity Not Available Summary

SEE ALSO: Feed Element Capabilities

Feed Item A feed is made up of feed elements. A feed item is a type of feed element. Property

Type

Description

Filter Group Available and Version Version

actor

Depends on parent

The entity that created the feed item. Values are:

Small, 29.0

• Record Summary—if a record (23.0) • User Summary—if a user (23.0) • Unauthenticated User—if a Chatter customer (24.0) Note: If the actor is a user, a User Summary response body is returned, not a Record Summary of type user. attachment

Depends on type

Depends on the type value of the attachment. Values Medium, 29.0 include: • Approval—Feed Item Attachment: Approval (v27.0–31.0) • BasicTemplate—Feed Item Attachment: Basic Template (v27.0–31.0) • Canvas—Feed Item Attachment: Canvas Template (v29.0–31.0) • CaseComment—Feed Item Attachment: Case Comment (v24.0–31.0) • Content—Feed Item Attachment: Content or null if the content is unavailable (v23.0–31.0)

728

Chatter REST API Developer Guide

Property

Type

Feed Item

Description

Filter Group Available and Version Version

• DashboardComponent—Feed Item Attachment: Dashboard (v24.0–31.0) • EmailMessage—Feed Item Attachment: Email Message (v29.0–31.0) • Link—Feed Item Attachment: Link (v23.0–31.0) • Poll—Feed Item Attachment: Poll (v26.0–31.0) • RecordSnapshot—Feed Item Attachment: Record Snapshot (v29.0–31.0) • TrackedChange—Feed Item Attachment: Tracked Change (v29.0–31.0) Important: As of API version 32.0, use the capabilities property. body

Feed Item Body

Information about the feed item.

Small, 29.0

23.0

Medium, 29.0

27.0–38.0

In API versions to 28.0, use the /body/text property as the default case for rendering text. In API versions 29.0–30.0, use the /preamble/text property as the default case for rendering text. In API versions 31.0 and later, use the /header/text property as the default case for rendering text. canShare

Boolean

Indicates whether the feed item can be shared. If a feed item has multiple file attachments and at least one attachment has been deleted or is inaccessible, the feed item can’t be shared. The canShare value is incorrectly set to true in these cases. Important: As of API version 39.0, use the isSharable property.

capabilities

Feed Element Capabilities

Auxiliary information for the feed element. The feed element's characteristics are made up of these capabilities.

Medium, 31.0

31.0

clientInfo

ClientInfo

Information about the connected app used to authenticate the connection.

Medium, 29.0

23.0

comments

Comment Page

Comments for this feed item.

Small, 29.0

23.0–31.0

Small, 29.0

23.0

Important: As of API version 32.0, use the capabilities.comments.page

property. createdDate

String

ISO8601 date string, for example, 2011-02-25T18:24:31.000Z

729

Chatter REST API Developer Guide

Property

Type

currentUserLike Reference

Feed Item

Description

Filter Group Available and Version Version 23.0–24.0

Note: This property is no longer available as of version 24.0. Use the myLike property instead. A reference to a like object if applicable, null otherwise.

event

Boolean

feedElementType String

true if feed item created due to an event change, false otherwise.

Medium, 29.0

Feed elements are the top-level objects that a feed Small, 31.0 contains. The feed element type describes the characteristics of that feed element. One of these values:

23.0 31.0

• Bundle—A container of feed elements. A bundle also has a body made up of message segments that can always be gracefully degraded to text-only values. • FeedItem—A feed item has a single parent and is scoped to one community or across all communities. A feed item can have capabilities such as bookmarks, canvas, content, comment, link, poll. Feed items have a body made up of message segments that can always be gracefully degraded to text-only values. • Recommendation—A recommendation is a feed element with a recommendations capability. A recommendation suggests records to follow, groups to join, or applications that are helpful to the context user. hasVerified Comment

Boolean

true if the feed item has a verified comment, otherwise false.

header

Feed Item Body

The header is the title of the post. This property contains Medium, 31.0 renderable plain text for all the segments of the message. If a client doesn’t know how to render a feed element type, it should render this text.

31.0

id

String

18-character ID of the feed item.

Small, 29.0

23.0

true if the context user has bookmarked this feed item, false otherwise.

Medium, 29.0

24.0–31.0

isBookmarked Boolean ByCurrentUser

Important: As of API version 32.0, use the capabilities.bookmarks.isBookmarkedByCurrentUser

property.

730

Small, 41.0

41.0

Chatter REST API Developer Guide

Feed Item

Property

Type

Description

Filter Group Available and Version Version

isDelete Restricted

Boolean

Returns true if the context user can’t delete a feed item. If it returns false, possibly the context users can delete the feed item.

Medium, 29.0

25.0

isLikedBy CurrentUser

Boolean

true if the context user has liked this feed item, false otherwise.

Medium, 29.0

23.0–31.0

Important: As of API version 32.0, use the capabilities.chatterLikes.isLikedByCurrentUser

property. isSharable

Boolean

Indicates whether the feed item can be shared.

Medium, 39.0

39.0

likes

Like Page

Likes for this feed item,

Medium, 29.0

23.0–31.0

Important: As of API version 32.0, use the capabilities.chatterLikes.page

property. likesMessage

Like Message Body

A message body that describes who likes the feed item. Small, 29.0

27.0–31.0

Important: As of API version 32.0, use the capabilities.chatterLikes.likesMessage

property. modifiedDate

String

moderationFlags Moderation Flags

ISO8601 date string, for example, 2011-02-25T18:24:31.000Z.

Small, 29.0

23.0

Flags for this feed item. Community moderators can view and act on flagged items.

Big, 29.0

29.0–31.0

If the communityModeration property of the Features response body is false, this property is null. Important: As of API version 32.0, use the capabilities.moderation.moderationFlags

property. myLike

Reference

If the context user has liked the comment, this property Medium, 29.0 is a reference to the specific like, null otherwise.

23.0–31.0

Important: As of API version 32.0, use the capabilities.chatterLikes.myLike

property. originalFeedItem Reference

originalFeed ItemActor

Depends on type

A reference to the original feed item if this feed item is Small, 29.0 a shared feed item, null otherwise.

24.0

Value depends on type of original feed item. Values are: Medium, 29.0

24.0

• Record Summary–if original feed item is a record

731

Chatter REST API Developer Guide

Property

Type

Feed Item

Description

Filter Group Available and Version Version

• User Summary–if original feed item is a user • Unauthenticated User—if original feed item is from a Chatter customer • null if this feed item is not a shared feed item parent

Depends on type

Value depends on type of parent. Values are:

Medium, 29.0

23.0

Medium, 29.0

23.0

• File Summary–if parent is a file • Group–if parent is a group • Record Summary–if parent is a record • User Summary–if parent is a user Note: If the parent is a user, a User Summary response body is returned, not a Record Summary of type user. The same applies for both groups and files. photoUrl

String

URL of the photo associated with the feed item.

preamble

Feed Item Preamble The preamble is the title of the post. This property Medium, 29.0 Message Body contains renderable plain text for all the segments of the message, for example, “App Builders - Pam Jones”.

27.0–30.0

In API versions to 28.0, use the /body/text property as the default case for rendering text. In API versions 29.0–30.0, use the /preamble/text property as the default case for rendering text. In API versions 31.0 and later, use the /header/text property as the default case for rendering text. relative CreatedDate

String

ISO8601 date string, for example, 2011-02-25T18:24:31.000Z.

Small, 29.0

28.0

topics

Feed Item Topics

Topics for this feed item.

Medium, 29.0

28.0–31.0

Important: As of API version 32.0, use the capabilities.topics.items

property. type

String

The type property always returns all types, regardless Small, 29.0 of API version. However, not all types are valid with all API versions. Important: As of API version 32.0, use the capabilities property to determine what can be done with a feed item. See Capabilities. Values are:

732

23.0

Chatter REST API Developer Guide

Property

Type

Feed Item

Description

Filter Group Available and Version Version

• ActivityEvent—Feed item generated in Case Feed when an event or task associated with a parent record with a feed enabled is created or updated. • AdvancedTextPost—A feed item with advanced text formatting, such as a group announcement post. • ApprovalPost—Feed item with an approval capability. Approvers can act on the feed item parent. • AttachArticleEvent—Feed item generated when an article is attached to a case in Case Feed. • BasicTemplateFeedItem—Feed item with an enhanced link capability. • CallLogPost—Feed item generated when a call log is saved to a case in Case Feed. • CanvasPost—Feed item generated by a canvas app in the publisher or from Chatter REST API or Chatter in Apex. The post itself is a link to a canvas app. • CaseCommentPost—Feed item generated when a case comment is saved in Case Feed. • ChangeStatusPost—Feed item generated when the status of a case is changed in Case Feed. • ChatTranscriptionPost—Feed item generated in Case Feed when a Live Agent chat transcript is saved to a case. • CollaborationGroupCreated—Feed item generated when a new public group is created. Contains a link to the new group. • CollaborationGroupUnarchived—Deprecated. Feed item generated when an archived group is activated. • ContentPost—Feed item with a content capability. • CreateRecordEvent—Feed item that describes a record created in the publisher. • DashboardComponentAlert—Feed item with a dashboard alert. • DashboardComponentSnapshot—Feed item with a dashboard component snapshot capability.

733

Chatter REST API Developer Guide

Property

Type

Feed Item

Description

Filter Group Available and Version Version

• EmailMessageEvent—Feed item generated when an email is sent from a case in Case Feed. • FacebookPost—Deprecated. Feed item generated when a Facebook post is created from a case in Case Feed. • LinkPost—Feed item with a link capability. • MilestoneEvent—Feed item generated when a case milestone is either completed or reaches a violation status. Contains a link to the case milestone. • PollPost—Feed item with a poll capability. Viewers of the feed item are allowed to vote on the options in the poll. • ProfileSkillPost—Feed item generated when a skill is added to a user’s profile. • QuestionPost—Feed item generated when a question is asked. As of API version 33.0, a feed item of this type can have a content capability and a link capability. • ReplyPost—Feed item generated by a Chatter Answers reply. • RypplePost—Feed item generated when a user posts thanks. • SocialPost—Feed item generated when a social post is created from a case in Case Feed. • TextPost—Feed item containing text only. • TrackedChange—Feed item created when one or more fields on a record have been changed. • UserStatus—Deprecated. A user's post to their own profile. url

String

URL to this feed item.

734

Small, 29.0

23.0

Chatter REST API Developer Guide

Feed Item Attachment: Approval

Property

Type

Description

Filter Group Available and Version Version

visibility

String

Who can see this feed item. Values are:

Small, 29.0

26.0

• 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.

SEE ALSO: Announcement Feed Item Page Pinned Feed Element Collection (Beta)

Feed Item Attachment: Approval An approval attachment. Important: This response body isn’t available in version 32.0 and later. In version 32.0 and later, Approval Capability is used. Property

Type

Description

Filter Group Available and Version Version

id

String

The work item ID

Small, 29.0

27.0–31.0

The process instance step ID. The associated record represents one step in an approval process.

Small, 30.0

30.0–31.0

The status of the approval. Values are:

Small, 29.0

27.0–31.0

process String InstanceStepId status

String

• Approved • Fault • Held • NoResponse • Pending • Reassigned • Rejected • Removed • Started postTemplate Fields

Approval Post Template Field[]

Collection of approval post template fields

Small, 29.0

28.0–31.0

type

String

Approval

Small, 29.0

27.0–31.0

735

Chatter REST API Developer Guide

Feed Item Attachment: Basic Template

Feed Item Attachment: Basic Template Important: This response body isn’t available in version 32.0 and later. In version 32.0 and later, Enhanced Link Capability is used. Property

Type

Description

Filter Type Available and Version Version

description

String

An optional description with a 500 character limit

Small, 29.0

27.0–31.0

icon

Icon

An optional icon

Small, 29.0

27.0–31.0

linkRecordId

String

If linkURL refers to a Salesforce record, linkRecordId contains the ID of the record.

Small, 29.0

28.0–31.0

linkUrl

String

An optional link URL to a detail page if available content Small, 29.0 can’t display inline

27.0–31.0

subtype

String

The subtype associated with the basic template feed item. Value is:

27.0 only

Big, 29.0

This property is deprecated in 28.0 and always returns None for clients with older versions.

• CollaborationGroupCreated

title

String

An optional title to a detail page

Small, 29.0

27.0–31.0

type

String

BasicTemplate

Small, 29.0

27.0–31.0

Feed Item Attachment: Canvas Template Important: This response body isn’t available in version 32.0 and later. In version 32.0 and later, Canvas Capability is used. Property

Type

Description

description

String

Optional. Description of the canvas app. The maximum Small, 29.0 length of this field is 500 characters.

29.0–31.0

The developer name (API name) of the canvas app

Small, 29.0

29.0–31.0

developerName String

Filter Type Available and Version Version

height

String

Optional. The height of the canvas app in pixels. Default Small, 29.0 height is 200 pixels.

29.0–31.0

icon

Icon

The canvas app icon

Small, 29.0

29.0–31.0

Optional. The namespace prefix of the Developer Edition organization in which the canvas app was created.

Small, 29.0

29.0–31.0

namespacePrefix String

736

Chatter REST API Developer Guide

Feed Item Attachment: Case Comment

Property

Type

Description

Filter Type Available and Version Version

parameters

String

Optional. Parameters passed to the canvas app in JSON Small, 29.0 format. Example:

29.0–31.0

{'isUpdated'='true'}

thumbnailUrl

String

Optional. The URL to a thumbnail image for the canvas Small, 29.0 app. Maximum dimensions are 120x120 pixels.

29.0–31.0

title

String

The title of the link used to call the canvas app

Small, 29.0

29.0–31.0

type

String

Canvas

Small, 29.0

29.0–31.0

Feed Item Attachment: Case Comment Important: This response body isn’t available in version 32.0 and later. In version 32.0 and later, Case Comment Capability is used. Property

Type

Description

Filter Group Available and Version Version

actorType

String

Specifies the type of user who made the comment. Valid values are:

Small, 29.0

24.0–31.0

• Customer—if a Chatter customer made the comment • CustomerService—if a service representative made the comment createdBy

User Summary

Information about the user who created the comment Small, 29.0

24.0–31.0

createdDate

String

ISO8601 date string, for example, 2011-02-25T18:24:31.000Z

Small, 29.0

24.0–31.0

eventType

String

Specifies the event type of a comment in Case Feed One of these values:

Small, 29.0

29.0–31.0

• NewInternal—A case comment that has newly been marked Internal Only. • NewPublished—A newly published case comment. • NewPublishedByCustomer—A case comment by a customer that was newly published. • PublishExisting—An existing case comment that was republished. • PublishExistingByCustomer—An existing case comment by a customer that was republished.

737

Chatter REST API Developer Guide

Property

Type

Feed Item Attachment: Content

Description

Filter Group Available and Version Version

• UnpublishExistingByCustomer—An existing case comment by a customer that was unpublished. • UnpublishExsiting—An existing case comment that was unpublished. Note: Unfortunately, this typo is in the code, not the documentation. Use this spelling in your code. id

String

18-character ID of case comment

Small, 29.0

24.0–31.0

published

Boolean

Specifies whether the comment has been published

Small, 29.0

24.0–31.0

text

String

Text of the case comment

Small, 29.0

24.0–31.0

type

String

CaseComment

Small, 29.0

27.0–31.0

Feed Item Attachment: Content Description of a feed item content attachment. Important: This response body isn’t available in version 32.0 and later. In version 32.0 and later, Content Capability is used. Property

Type

Description

Filter Group Available and Version Version

checkSum

String

MD5 checksum for the file

Small, 29.0

26.0–31.0

contentUrl

String

URL for link files and Google Docs; otherwise the value Small, 31.0 is null.

31.0–31.0

description

String

Description of the attachment

Small, 29.0

23.0–31.0

downloadUrl

String

File’s URL. This value is null if the content is a link or Small, 29.0 a Google Doc.

23.0–31.0

Extension of the file

Small, 29.0

26.0–31.0

fileExtension String fileSize

String

Size of the file in bytes. If size cannot be determined, returns unknown.

Small, 29.0

23.0–31.0

fileType

String

Type of file

Small, 29.0

23.0–31.0

true if the file has a preview image available, false Small, 29.0

23.0–29.0

hasImagePreview Boolean

otherwise hasPdfPreview Boolean

true if the file has a PDF preview available, false

Small, 29.0

23.0–31.0

Small, 29.0

23.0–31.0

otherwise id

String

18-character ID of the content

738

Chatter REST API Developer Guide

Property

Type

isInMyFileSync Boolean

Feed Item Attachment: Content

Description

Filter Group Available and Version Version

true if the file is synced with Salesforce Files Sync; false otherwise.

Small, 29.0

26.0–31.0

mimeType

String

MIME type content of the file

Small, 29.0

23.0–31.0

renditionUrl

String

URL to the rendition resource for the file. For shared Small, 29.0 files, renditions process asynchronously after upload. For private files, renditions process when the first file preview is requested, and aren’t available immediately after the file is uploaded.

26.0–31.0

renditionUrl 240By180

String

URL to the 240 x 180 rendition resource for the file. For Small, 30.0 shared files, renditions process asynchronously after upload. For private files, renditions process when the first file preview is requested, and aren’t available immediately after the file is uploaded.

30.0–31.0

renditionUrl 720By480

String

URL to the 720 x 480 rendition resource for the file. For Small, 30.0 shared files, renditions process asynchronously after upload. For private files, renditions process when the first file preview is requested, and aren’t available immediately after the file is uploaded.

30.0–31.0

textPreview

String

Text preview of the file if available; null otherwise.

30.0–31.0

thumb120By90 String RenditionStatus

Big, 30.0

Specifies the rendering status of the 120 x 90 preview Medium, 30.0 image of the file. One of these values:

30.0–31.0

• Processing—Image is being rendered. • Failed—Rendering process failed. • Success—Rendering process was successful. • Na—Rendering is not available for this image. thumb240By180 String RenditionStatus

Specifies the rendering status of the 240 x 180 preview Medium, 30.0 image of the file. One of these values:

30.0–31.0

• Processing—Image is being rendered. • Failed—Rendering process failed. • Success—Rendering process was successful. • Na—Rendering is not available for this image. thumb720By480 String RenditionStatus

Specifies the rendering status of the 720 x 480 preview Medium, 30.0 image of the file. One of these values: • Processing—Image is being rendered. • Failed—Rendering process failed. • Success—Rendering process was successful. • Na—Rendering is not available for this image.

739

30.0–31.0

Chatter REST API Developer Guide

Feed Item Attachment: Dashboard

Property

Type

Description

Filter Group Available and Version Version

title

String

Title of the file

Small, 29.0

23.0–31.0

type

String

Content

Small, 29.0

27.0–31.0

versionId

String

18-character ID of this version of the content

Medium, 29.0

23.0–31.0

Feed Item Attachment: Dashboard Important: This response body isn’t available in version 32.0 and later. In version 32.0 and later, Dashboard Component Snapshot Capability is used. Property

Type

Description

Filter Group Available and Version Version

componentId

String

18-character ID of the component

Small, 29.0

24.0–31.0

componentName String

Name of the component. If no name is saved with the Small, 29.0 component, returns the localized string, “Untitled Component.”

24.0–31.0

dashboard BodyText

String

Text that should be displayed next to the actor in the Small, 29.0 body of a feed item. This is used instead of the default body text. If no text is specified, and there is no default body text, returns null.

24.0–31.0

dashboardId

String

18-character ID of the dashboard

Small, 29.0

24.0–31.0

Name of the dashboard

Small, 29.0

24.0–31.0

dashboardName String fullSize ImageUrl

String

URL of the full-sized dashboard image

Small, 29.0

24.0–31.0

lastRefresh Date

String

ISO8601 date string, for example, Small, 29.0 2011-02-25T18:24:31.000Z of when this dashboard was last refreshed

24.0–31.0

The text of the last refresh date to be displayed, such as, “Last refreshed on October 31, 2011.”

Small, 29.0

24.0–31.0

lastRefreshDate String DisplayText runningUser

User Summary

The user running the dashboard

Small, 29.0

24.0–31.0

thumbnailUrl

String

URL of the thumbnail-sized dashboard image

Small, 29.0

24.0–31.0

type

String

DashboardComponent

Small, 29.0

27.0–31.0

Feed Item Attachment: Email Message An email message sent from a case record in Case Feed. Important: This response body isn’t available in version 32.0 and later. In version 32.0 and later, Email Message Capability is used.

740

Chatter REST API Developer Guide

Feed Item Attachment: Link

Property

Type

Description

Filter Group Available and Version Version

direction

String

The direction of the email message. One of these values: Small, 29.0

29.0–31.0

• Inbound—An inbound message (sent by a customer). • Outbound—An outbound message (sent to a customer by a support agent). emailMessageId String

ID of the email message

Small, 29.0

29.0–31.0

subject

String

Subject of the email message

Small, 29.0

29.0–31.0

textBody

String

Body of the email message

Big, 29.0

29.0–31.0

toAddresses

Email Address[]

Collection of addresses to receive the email message

Small, 29.0

29.0–31.0

type

String

Emailmessage

Small, 29.0

27.0–31.0

Feed Item Attachment: Link Important: This response body isn’t available in version 32.0 and later. In version 32.0 and later, Link Capability is used. Property

Type

Description

Filter Group Available and Version Version

title

String

Description of the link

Small, 29.0

23.0–31.0

type

String

Link

Small, 29.0

27.0–31.0

url

String

URL attached to the feed item (could be external)

Small, 29.0

23.0–31.0

Feed Item Attachment: Poll Important: This response body isn’t available in version 32.0 and later. In version 32.0 and later, Poll Capability is used. Property

Type

Description

Filter Group Available and Version Version

choices

Feed Poll Choice[]

Collection of feed poll choices that make up the poll

Small, 29.0

26.0–31.0

myChoiceId

String

18-character ID of the poll choice that the context user Small, 29.0 has voted for in this poll. Returns null if the context user hasn’t voted.

26.0–31.0

Total number of votes cast on the feed poll item

Small, 29.0

26.0–31.0

Poll

Small, 29.0

27.0–31.0

totalVoteCount Integer type

String

741

Chatter REST API Developer Guide

Feed Item Attachment: Record Snapshot

Feed Item Attachment: Record Snapshot Important: This response body isn’t available in version 32.0 and later. In version 32.0 and later, Record Snapshot Capability is used. Property

Type

Description

Filter Group Available and Version Version

recordView

Record View

A representation of a record.

Small, 29.0

29.0–31.0

type

String

RecordSnapshot

Small, 29.0

29.0–31.0

Feed Item Attachment: Tracked Change Important: This response body isn’t available in version 32.0 and later. In version 32.0 and later, Tracked Changes Capability is used. Property

Type

Description

Filter Group Available and Version Version

changes

Feed Tracked Change[]

Collection of feed tracked changes.

Small, 29.0

29.0–31.0

type

String

TrackedChange

Small, 29.0

29.0–31.0

Feed Item Body Property

Type

Description

Filter Group Available and Version Version

isRichText

Boolean

Indicates if the body is rich text.

Small, 35.0

35.0

Collection of message segments, based on type. Segments can be one or more of the following:

Medium, 29.0

23.0

messageSegments Segment[]

• Message Segment: Entity Link • Message Segment: Field Change • Message Segment: Field Change Name • Message Segment: Field Change Value • Message Segment: Hashtag • Message Segment: Inline Image (version 35.0 and later) • Message Segment: Link • Message Segment: Markup Begin (version 35.0 and later) • Message Segment: Markup End (version 35.0 and later)

742

Chatter REST API Developer Guide

Property

Type

Feed Item Page

Description

Filter Group Available and Version Version

• Message Segment: Mention • Message Segment: More Changes • Message Segment: Text The collection of message segments could contain message segment types introduced in later API versions. All message segment types are guaranteed to have text and type properties that are available in version 23.0 and later. If a client encounters an unknown message segment type, it can render the text value as a fallback. text

String

Display-ready text of the message. Use this text if you Small, 29.0 don’t want to process the message segments.

23.0

SEE ALSO: Comment Feed Item Generic Feed Element Message User Status Feed Item Summary

Feed Item Page Important: This response body isn’t available in version 32.0 and later. In version 32.0 and later, Feed Element Page is used. Property

Type

Description

Filter Group Available and Version Version

currentPageUrl String

URL to the current page of feed items

Medium, 29.0

23.0–31.0

isModifiedToken String

An opaque polling token that describes when a news Medium, 29.0 feed was last modified. Use this value as the since request parameter of the News Feed Is-Modified resource.

27.0–31.0

Important: This feature is available through a Feed Polling pilot program. This pilot program is closed and not accepting new participants. isModifiedUrl String

A News Feed Is-Modified resource with a since Medium, 29.0 request parameter that contains an opaque token that describes when the feed was last modified. Returns null if feed is not a news feed.

743

23.0–31.0

Chatter REST API Developer Guide

Property

Type

Feed Item Preamble Message Body

Description

Filter Group Available and Version Version

Important: This feature is available through a Feed Polling pilot program. This pilot program is closed and not accepting new participants. items

Feed Item[]

Collection of one or more feed items

Small, 29.0

23.0–31.0

nextPageUrl

String

URL to the next page of feed items

Small, 29.0

23.0–31.0

updatesToken

String

Token to use in an updatedSince parameter, or null if not available.

Big, 30.0

30.0–31.0

updatesUrl

String

A Chatter REST API resource with a query string Big, 30.0 containing the value of the updatesToken property. The resource returns the feed items that have been updated since the last request. Use the URL as it is—do not modify it. Property is null if not available.

30.0–31.0

Feed Item Preamble Message Body Property

Type

messageSegments Segments[]

Description

Filter Group Available and Version Version

Collection of message segments, based on type. Segments can be one or more of the following:

Medium, 29.0

27.0

• Message Segment: Entity Link • Message Segment: Link (version 35.0 and later) • Message Segment: Text text

String

The preamble is the title of the post. This property Small, 29.0 contains renderable plain text for all the segments of the message, for example, “App Builders - Pam Jones”.

SEE ALSO: Feed Item

Feed Item Summary A feed item summary.

744

27.0

Chatter REST API Developer Guide

Feed Item Summary

Property Name

Type

Description

Filter Group and Version

Available Version

actor

One of these response bodies:

Entity that created the feed entity.

Small, 39.0

39.0

• Record Summary • User Summary • Unauthenticated User body

Feed Item Body

Information about the feed entity.

Small, 39.0

39.0

capabilities

Feed Element Capabilities

Container for all capabilities that can be included with a feed item.

Medium, 39.0

39.0

createdDate

Date

ISO8601 date string, for example, Small, 39.0 2011-02-25T18:24:31.000Z, when the entity was created.

39.0

Type of feed entity.

39.0

feedElementType String

Small, 39.0

• Bundle—A container of feed elements. A bundle also has a body made up of message segments that can always be gracefully degraded to text-only values. • FeedItem—A feed item has a single parent and is scoped to one community or across all communities. A feed item can have capabilities such as bookmarks, canvas, content, comment, link, poll. Feed items have a body made up of message segments that can always be gracefully degraded to text-only values. • Recommendation—A recommendation is a feed element with a recommendations capability. A recommendation suggests records to follow, groups to join, or applications that are helpful to the context user. header

Feed Item Body

Title of the post. This property contains Medium, 39.0 renderable plain text for all the message segments. If a client doesn’t know how to render a feed element type, it should render this text.

39.0

id

String

18-character ID of the feed entity.

39.0

745

Small, 39.0

Chatter REST API Developer Guide

Feed Item Topics

Property Name

Type

Description

isEntity Available

Boolean

Specifies whether the entity is available. If Small, 39.0 false, either the user doesn’t have access to the entity or the entity was deleted.

39.0

modifiedDate

Date

When the feed item was modified in the Small, 39.0 form of an ISO8601 date string, for example, 2011-02-25T18:24:31.000Z.

39.0

Reference to the original feed item if this Small, 39.0 feed item is a shared feed item; otherwise, null.

39.0

If this feed item is a shared feed item, Medium, 39.0 information about the original poster of the feed item; otherwise, null.

39.0

Parent of the feed entity.

Medium, 39.0

39.0

URL of the photo associated with the feed Medium, 39.0 item.

39.0

Relative created date, for example, “2h ago.” Small, 39.0

39.0

originalFeedItem Reference

originalFeed ItemActor

One of these response bodies: • Record Summary

Filter Group and Version

Available Version

• User Summary • Unauthenticated User parent

One of these response bodies: • File Summary • Group • Record Summary • User Summary

photoUrl

String

relativeCreated String Date url

String

URL to the feed entity.

Small, 39.0

39.0

visibility

String

Specifies who can see a feed item.

Small, 39.0

39.0

• AllUsers—Visibility is not limited to internal users. • InternalUsers—Visibility is limited to internal users.

Feed Item Topics Important: This response body isn’t available in version 32.0 and later. In version 32.0 and later, Topics Capability is used.

746

Chatter REST API Developer Guide

Property

Type

canAssignTopics Boolean

topics

Topic[]

Feed Modified Info

Description

Filter Group Available and Version Version

true if a topic can be assigned to the feed item, false otherwise

Small, 29.0

28.0–31.0

Collection of topics

Small, 29.0

28.0–31.0

Feed Modified Info Important: This feature is available through a Feed Polling pilot program. This pilot program is closed and not accepting new participants. Property

Type

Description

isModified

Boolean

true if a news feed and has been modified since the Small, 29.0 last time it was polled, false otherwise. Returns null if the feed is not a news feed.

23.0

isModifiedToken String

An opaque polling token that describes when a news Small, 29.0 feed was last modified. Use this value as the since request parameter of the News Feed Is-Modified resource.

27.0

String

A News Feed Is-Modified resource with a since Small, 29.0 request parameter that contains an opaque token that describes when the feed was last modified. Returns null if feed is not a news feed. Make a request to this resource after making a request to the isModifiedUrl resource in the Feed or Feed Item Page response bodies.

23.0

nextPollUrl

Filter Group Available and Version Version

Feed Poll Choice Property

Type

Description

Filter Group Available and Version Version

id

String

18-character ID of the poll choice

Small, 29.0

26.0

position

Integer

The location in the poll where this poll choice exists. The first poll choice starts at 1.

Small, 29.0

26.0

text

String

Label text associated with the poll choice

Small, 29.0

26.0

voteCount

Integer

Total number of votes for this poll choice

Small, 29.0

26.0

747

Chatter REST API Developer Guide

Property

Type

voteCountRatio Double

Feed Tracked Change

Description

Filter Group Available and Version Version

The ratio of total number of votes for this poll choice Small, 29.0 to all votes cast in the poll. Multiply the ratio by 100 to get the percentage of votes cast for this poll choice.

26.0

SEE ALSO: Poll Capability

Feed Tracked Change Property

Type

Description

Filter Group Available and Version Version

fieldName

String

The name of the field that was updated.

Small, 29.0

29.0

newValue

String

The new value of the field or null if the field length Small, 29.0 is long or empty.

29.0

oldValue

String

The old value of the field or null if the field length is Small, 29.0 long or empty.

29.0

SEE ALSO: Tracked Change Bundle Capability Tracked Changes Capability

File Detail Includes all the File Summary response body with these additional items. Property

Type

Description

Filter Group Available and Version Version

fileAsset

Asset File

An asset file.

Small, 38.0

38.0

pageCount

Integer

Number of pages for documents that support flash renditions, or the number of slides in a presentation. Returns 0 if the flash rendition fails, or if it isn’t supported for the file type.

Medium, 29.0

24.0

topics

Topic Collection

A paged collection of topics that are assigned to the Big, 37.0 file. Check page attributes to make sure that you get all the assigned topics.

SEE ALSO: File Summary

748

37.0

Chatter REST API Developer Guide

File Preview

File Preview A file preview. Property Name

Type

Description

Filter Group and Version

Available Version

format

String

The format of the preview. Values are:

Small, 35.0

35.0

The total number of preview URLs for this preview format.

Small, 35.0

35.0

• Pdf—Preview format is PDF. • Svg—Preview format is compressed SVG. • Thumbnail—Preview format is 240 x 180 PNG. • ThumbnailBig—Preview format is 720 x 480 PNG. • ThumbnailTiny—Preview format is 120 x 90 PNG. previewUrlCount Integer

previewUrls

File Preview URL[]

A list of file preview URLs.

Small, 35.0

35.0

status

String

The availability status of the preview. Values Small, 35.0 are:

35.0

• Available—Preview is available. • InProgress—Preview is being processed. • NotAvailable—Preview is unavailable. • NotScheduled—Generation of the preview isn’t scheduled yet. url

String

The URL for the file preview.

Small, 35.0

35.0

SEE ALSO: File Preview Collection Message Segment: Inline Image

File Preview Collection A collection of file previews. Property Name

Type

Description

Filter Group and Version

Available Version

fileId

String

ID of the file.

Small, 35.0

35.0

749

Chatter REST API Developer Guide

File Preview URL

Property Name

Type

Description

Filter Group and Version

Available Version

previews

File Preview[]

Previews supported for the file.

Small, 35.0

35.0

url

String

URL to the current page of file previews.

Medium, 35.0

35.0

Version number of the file.

Medium, 40.0

40.0

Filter Group and Version

Available Version

versionNumber String

File Preview URL The URL to a file preview. Property Name

Type

Description

pageNumber

Integer

Preview page number starting from zero, or Small, 35.0 null for PDF files.

35.0

previewUrl

String

File preview URL.

35.0

Small, 35.0

SEE ALSO: File Preview

File Share Link Description of a file shared as a link. Property

Type

Description

Filter Group Available and Version Version

fileViewUrl

String

URL where the file can be viewed and downloaded. This value is also called the file share link.

Small, 30.0

30.0

sharingType

String

The permission level of sharing. Values are:

Small, 30.0

30.0

• C—Collaborator • I—Sharing permission is determined by location. This generally occurs when the sharing permission is not set on the file, but on the library. This value is also used when the context user is the owner of the file. • N—No access • V—Viewer

SEE ALSO: File Shares Page

750

Chatter REST API Developer Guide

File Shares Page

File Shares Page Property

Type

currentPageUrl String

Description

Filter Group Available and Version Version

URL for the current page of file shares

Medium, 29.0

24.0

linkShare

File Share Link

URL of the file share link

Small, 30.0

30.0

shares

Shares[]

Collection of one or more file shares

Small, 29.0

24.0

nextPageUrl

String

URL for the next page of file shares

Small, 29.0

24.0

URL for the previous page of file shares

Medium, 29.0

24.0

previousPageUrl String

File Summary Description of a file. For all rendition properties, note the following: For shared files, renditions process asynchronously after upload. For private files, renditions process when the first file preview is requested, and aren’t available immediately after the file is uploaded. Property

Type

Description

Filter Group Available and Version Version

checkSum

String

MD5 checksum for the file.

Big, 29.0

26.0

contentSize

Integer

Size of the file in bytes.

Small, 29.0

24.0

contentHub Repository

Files Connect Repository

The external data source associated with this file, or null if it doesn’t point to an external file.

Small, 32.0

32.0

content ModifiedDate

Date

An ISO 8601 format date string, for example, Small, 32.0 2011-02-25T18:24:31.000Z. File-specific modified date, which is updated only for direct file operations, such as rename. Modifications to the file from outside of Salesforce can update this date.

32.0

contentUrl

String

If the file is a link, returns the URL, otherwise the string Small, 29.0 null.

24.0

createdDate

Date

ISO8601 date string when the file was created.

Small, 41.0

41.0

description

String

Description of the file.

Medium, 29.0

24.0

downloadUrl

String

URL to the file.

Small, 29.0

26.0

external DocumentUrl

String

The external URL this file points to, or null if it doesn’t Small, 32.0 point to an external file.

32.0

External file permission information, such as available Big, 35.0 groups, available permission types, and current sharing status, or null for non-external files or when

35.0

external External File FilePermission Permission Information Information

includeExternalFilePermissionsInfo

is false.

751

Chatter REST API Developer Guide

Property

Type

File Summary

Description

Filter Group Available and Version Version

flash String RenditionStatus

Specifies if a flash preview version of the file has been Big, 29.0 rendered.

24.0

fileExtension String

Extension of the file.

Small, 29.0

26.0

fileType

String

Type of file, such as PDF, PowerPoint.

Medium, 29.0

24.0

id

String

18-character ID of the file.

Small, 29.0

24.0

isInMyFileSync Boolean

true if the file is synced with Salesforce Files Sync; false otherwise.

Medium, 29.0

26.0

isMajorVersion Boolean

true if the file is a major version; false if the file is Medium, 31.0

31.0

a minor version. Major versions can’t be replaced. mimeType

String

moderationFlags Moderation Flags

MIME type of the file.

Medium, 29.0

Flags for this file. Community moderators can view and Big, 30.0 act on flagged items.

26.0 30.0

If the communityModeration property of the Features response body is false, this property is null. modifiedDate

Date

An ISO 8601 format date string, for example, 2011-02-25T18:24:31.000Z. Modifications to the file from within Salesforce update this date.

Small, 29.0

24.0

motif

Motif

Small, medium, and large icons indicating that the Small, 29.0 object is a file. The motif can also contain the object’s base color.

27.0

The icon is not a preview of the file. mySubscription Reference

If the context user is following this file, contains Medium, 29.0 information about the subscription, otherwise null.

23.0

name

String

Name of the file.

Small, 29.0

24.0

origin

String

Specifies the file source. Valid values are:

Big, 29.0

24.0

• Chatter—file came from Chatter • Content—file came from content • FileField—file came from a record or other form owner

User Summary

Owner of the file.

Small, 29.0

24.0

parentFolder

Reference

A reference to the parent folder.

Small, 29.0

28.0

pdfRendition Status

String

Specifies if a PDF preview version of the file has been rendered.

Big, 29.0

24.0

752

Chatter REST API Developer Guide

Property

Type

publishStatus String

File Summary

Description

Filter Group Available and Version Version

The publish status of the file. One of these values:

Small, 29.0

29.0

• PendingAccess—File is pending publishing. • PrivateAccess—File is private. • PublicAccess—File is public. renditionUrl

String

URL to the rendition resource for the file. For shared Medium, 29.0 files, renditions process asynchronously after upload. For private files, renditions process when the first file preview is requested, and aren’t available immediately after the file is uploaded.

26.0

renditionUrl 240By180

String

URL to the 240px by 180px rendition for the file, if Medium, 29.0 available. For shared files, renditions process asynchronously after upload. For private files, renditions process when the first file preview is requested, and aren’t available immediately after the file is uploaded.

29.0

renditionUrl 720By480

String

URL to the 720px by 480px rendition for the file, if Medium, 29.0 available. For shared files, renditions process asynchronously after upload. For private files, renditions process when the first file preview is requested, and aren’t available immediately after the file is uploaded.

29.0

repositoryFile String Id

The ID of the file in the external repository, or null if Small, 36.0 the file isn’t external.

36.0

repositoryFile String Url

The URL of the Chatter REST API resource giving access Small, 32.0 to the external repository file properties, or null if this file doesn’t point to an external file.

32.0

sharingOption String

Sharing option of the file. Values are:

Medium, 35.0

35.0

Medium, 41.0

41.0

Medium, 29.0

29.0

• Allowed—Resharing of the file is allowed. • Restricted—Resharing of the file is restricted. sharingPrivacy String

Specifies the sharing privacy of a file. Values are: • None—File is visible to anyone with record access. • PrivateOnRecords—File is private on records.

sharingRole

String

The sharing role of the file. One of these values: • Admin—Owner permission, but doesn’t own the file. • Collaborator—Viewer permission, and can edit, change permissions, and upload a new version of a file.

753

Chatter REST API Developer Guide

Property

Type

File Summary

Description

Filter Group Available and Version Version

• Owner—Collaborator permission, and can make a file private, and delete a file. • Viewer—Can view, download, and share a file. • WorkspaceManaged—Permission controlled by the library. systemModstamp Date

textPreview

String

thumb120By90 String RenditionStatus

ISO8601 date string indicating when a user or any Small, 41.0 automated system process, such as a trigger, updated the file.

41.0

Text preview of the file if available; null otherwise.

30.0

Big, 30.0

Specifies the rendering status of the 120 x 90 preview Small, 29.0 image of the file. One of these values:

24.0

• Processing—Image is being rendered. • Failed—Rendering process failed. • Success—Rendering process was successful. • Na—Rendering is not available for this image. thumb240By180 String RenditionStatus

Specifies the rendering status of the 240 x 180 preview Small, 29.0 image of the file. One of these values:

24.0

• Processing—Image is being rendered. • Failed—Rendering process failed. • Success—Rendering process was successful. • Na—Rendering is not available for this image. thumb720By480 String RenditionStatus

Specifies the rendering status of the 720 x 480 preview Small, 29.0 image of the file. One of these values:

24.0

• Processing—Image is being rendered. • Failed—Rendering process failed. • Success—Rendering process was successful. • Na—Rendering is not available for this image. title

String

Title of the file.

Small, 29.0

24.0

type

String

ContentDocument

Small, 29.0

24.0

url

String

URL for the file.

Small, 29.0

24.0

Version number of the file.

Medium, 29.0

24.0

versionNumber String

SEE ALSO: File Summary Page Folder Item

754

Chatter REST API Developer Guide

File Summary Page

File Summary Page Property

Type

currentPageUrl String

Description

Filter Group Available and Version Version

URL for the current page of files

Medium, 29.0

24.0

files

File Summary[]

Collection of one or more files

Small, 29.0

24.0

nextPageUrl

String

URL for the next page of files

Small, 29.0

24.0

URL for the previous page of files

Medium, 29.0

24.0

previousPageUrl String

Files Capability If a feed element has this capability, it has one or more file attachments. Property Name

Type

Description

Filter Group and Version

Available Version

items

Content[]

Collection of files.

Small, 36.0

36.0

Filter Group and Version

Available Version

SEE ALSO: Feed Element Capabilities

Files Connect Allowed Item Type Collection The item types allowed to be created in the repository folder. Property Name

Type

allowedItemTypes Files Connect Item

Type Summary[]

Description

Collection of item types that can be created Small, 35.0 in the repository folder.

35.0

Files Connect Field Definition Field definition for the item type. Property Name

Type

Description

Filter Group and Version

Available Version

displayName

String

Label or caption for the field.

Small, 35.0

35.0

isMandatory

Boolean

Specifies whether this field is mandatory for Small, 35.0 the item type.

35.0

maxLength

Integer

The maximum length of the value of the field.

35.0

755

Small, 35.0

Chatter REST API Developer Guide

Files Connect Item Type Detail

Property Name

Type

Description

Filter Group and Version

Available Version

name

String

Name of the field.

Small, 35.0

35.0

type

String

Specifies the data type of the value of the field. Values are:

Small, 35.0

35.0

• BooleanType • DateTimeType • DecimalType • HtmlType • IdType • IntegerType • StringType • UriType • XmlType

SEE ALSO: Files Connect Item Type Detail

Files Connect Item Type Detail Detailed information about an item type associated with a repository folder. The Files Connect Item Type Detail response body includes all the Files Connect Item Type Summary response body and this property. Property Name

Type

Description

Filter Group and Version

Available Version

fields

Files Connect Field Definition[]

A list of fields that can be set for the item type.

Small, 35.0

35.0

Description

Filter Group and Version

Available Version

Specifies support for content streaming. Values are:

Small, 35.0

35.0

Files Connect Item Type Summary Summary information about an item type associated with a repository folder. Property Name

Type

contentStream String Support

• ContentStreamAllowed • ContentStreamNotAllowed • ContentStreamRequired

756

Chatter REST API Developer Guide

Files Connect Permission

Property Name

Type

Description

Filter Group and Version

Available Version

description

String

Description of the item type.

Medium, 35.0

35.0

displayName

String

Display name of the item type.

Small, 35.0

35.0

id

String

ID of the item type.

Small, 35.0

35.0

Indicates whether the item type can have versions.

Small, 35.0

35.0

URL to the detailed information of the item Small, 35.0 type.

35.0

isVersionable Boolean

url

String

SEE ALSO: Files Connect Allowed Item Type Collection

Files Connect Permission A permission. Property Name

Type

directoryEntry One of:

Description

Filter Group and Version

Available Version

The detailed information of a directory entry. Medium, 35.0

35.0

• Repository Group Summary • Repository User Summary isUpdatable

Boolean

Specifies whether this permission can be updated.

Small, 35.0

35.0

rights

Repository Permission Type Collection[]

A collection of permission types.

Medium, 35.0

35.0

SEE ALSO: Files Connect Permission Collection

Files Connect Permission Collection A collection of permissions.

757

Chatter REST API Developer Guide

Files Connect Permission Type

Property Name

Type

Description

Filter Group and Version

Available Version

permissions

Files Connect Permission[]

Collection of permissions.

Small, 35.0

35.0

Filter Group and Version

Available Version

Files Connect Permission Type A permission type. Property Name

Type

Description

id

String

The internal ID of the permission type in the Medium, 35.0 repository.

35.0

label

String

The label as returned by the repository.

35.0

Medium, 35.0

SEE ALSO: External File Permission Information Repository Permission Type Collection

Files Connect Provider Type Information about the Files Connect provider. Property

Type

Description

Filter Group and Version

Available Version

label

String

Localized label of the provider type.

Small, 32.0

32.0

type

String

Provider type. One of these values:

Small, 32.0

32.0

• ContentHubBox • ContentHubGDrive • ContentHubSharepoint • ContentHubSharepointOffice365 • ContentHubSharepointOneDrive • SimpleUrl

SEE ALSO: Files Connect Repository

Files Connect Repository Information about a Files Connect repository.

758

Chatter REST API Developer Guide

Property

Type

authentication

Files Connect Repository Authentication

Description

Filter Group and Version

Available Version

Files Connect Repository authentication information. Repository Authentication

Small, 40.0

40.0

features

Files Connect Repository features. Repository Features

Small, 32.0

32.0

id

String

18-character ID of the external data source.

Small, 32.0

32.0

label

String

Repository label.

Small, 32.0

32.0

motif

Motif

The motif properties contain URLs for small, Small, 32.0 medium, and large icons that indicate the Salesforce record type. Common record types are files, users, and groups, but all record types have a set of motif icons. Custom object records use their tab style icon. All icons are available to unauthenticated users so that, for example, you can display the motif icons in an email. The motif can also contain the record type’s base color.

32.0

mySubscription

Reference

If the context user is following this record, information about the subscription; otherwise null.

Medium, 32.0

32.0

name

String

Repository name.

Small, 32.0

32.0

providerType

Files Connect Repository provider type. Provider Type

Small, 32.0

32.0

rootFolderItemsUrl String

URL to the repository root folder items, or null Small, 32.0 if the repository does not support browsing.

32.0

type

String

Type of record, ContentHubRepository. Small, 32.0

32.0

url

String

Chatter REST API resource URL for the Files Connect repository

32.0

SEE ALSO: Content Content Capability File Summary Files Connect Repository Collection

Files Connect Repository Authentication Authentication information for a repository.

759

Small, 32.0

Chatter REST API Developer Guide

Files Connect Repository Collection

Property Name

Type

Description

Filter Group and Version

Available Version

authFlowUrl

String

Depends on the authProtocol.

Small, 40.0

40.0

Specifies the authentication protocol used Small, 40.0 for the repository. Values are:

40.0

• NoAuthentication—null. • Oauth—URL to start the OAuth flow. • Password—URL to the authentication settings for external systems. authProtocol

String

• NoAuthentication—Repository doesn’t require authentication. • Oauth—Repository uses OAuth authentication protocol. • Password—Repository uses user name and password authentication protocol. userHas AuthSettings

Boolean

Specifies whether the user has credentials Small, 40.0 or the administrator configured the external data source to use the same set of credentials for every user (true). Otherwise, false.

40.0

SEE ALSO: Files Connect Repository

Files Connect Repository Collection A collection of Files Connect repositories. Property Name

Type

currentPageUrl String

nextPageUrl

String

Description

Filter Group and Version

Available Version

Chatter REST API URL identifying the current Medium, 32.0 page.

32.0

Chatter REST API URL identifying the next Small, 32.0 page, or null if there isn’t a next page. Check whether this value is null before getting another page. If a page doesn’t exist, a

32.0

ConnectApi.NotFoundException

error is returned.

760

Chatter REST API Developer Guide

Property Name

Type

previousPageUrl String

repositories

Files Connect Repository[]

Files Connect Repository Features

Description

Filter Group and Version

Available Version

Chatter REST API URL identifying the previous page, or null if there isn’t a previous page.

Medium, 32.0

32.0

Collection of repositories.

Small, 32.0

32.0

Files Connect Repository Features Information about the features of a Files Connect repository. Property

Type

Description

Filter Group and Version

Available Version

canBrowse

Boolean

Specifies whether the repository’s folder hierarchy Small, 32.0 can be browsed (true) or not (false).

32.0

canSearch

Boolean

Specifies whether the repository can be searched Small, 32.0 (true) or not (false).

32.0

SEE ALSO: Files Connect Repository

Flat Feed Property

Type

currentPageUrl String

Description

Filter Group Available and Version Version

URL for the current page of items

Medium, 29.0

25.0–26.0

items

Flat Feed Item[]

Collection of one or more flat feed items

Small, 29.0

25.0–26.0

nextPageUrl

String

URL for the next page of items

Small, 29.0

25.0–26.0

Flat Feed Item Property

Type

Description

Filter Group Available and Version Version

item

Depends on type

The flat feed item, depending on the value of type. Valid values are:

Small, 29.0

• If type is Comment—Comment • If type is FeedItem—Feed Item

761

25.0–26.0

Chatter REST API Developer Guide

Folder

Property

Type

Description

Filter Group Available and Version Version

type

String

The type of item. Valid values are:

Small, 29.0

25.0–26.0

• Comment • FeedItem

Folder Description of a folder. Property

Type

Description

createdDate

Date

ISO-8601 formatted date string specifying the creation Small, 30.0 date of the folder.

30.0

folderPaths

Folder Path[]

Collection of folder paths.

Medium, 40.0

40.0

id

String

18-character ID of the folder.

Small, 30.0

30.0

true if the folder and all folders in this folder are Small, 33.0 synced with Salesforce Files Sync; false otherwise.

33.0

isInMyFileSync Boolean

Filter Group Available and Version Version

modifiedDate

Date

ISO-8601 formatted date string specifying the last modified date of the folder.

Small, 30.0

30.0

motif

Motif

Small, medium, and large icon indicating the record’s Small, 30.0 type. The motif can also contain the record type’s base color.

30.0

If the context user is following this record, this property Medium, 30.0 contains information about the subscription; otherwise this property is null.

30.0

mySubscription Reference

name

String

Folder name.

Small, 30.0

30.0

parentFolder

Reference

Reference to the parent folder.

Small, 30.0

30.0

path

String

Path to the folder.

Small, 30.0

30.0

ISO8601 date string when a user or any automated system process, such as a trigger, updates the folder.

Small, 41.0

41.0

systemModstamp Date

type

String

Folder

Small, 30.0

30.0

url

String

Chatter REST API URL to this resource.

Small, 30.0

30.0

SEE ALSO: Folder Item

762

Chatter REST API Developer Guide

Folder Item

Folder Item Description of an item (file or folder) in a folder. Property

Type

Description

Filter Group Available and Version Version

file

File Summary

A file representation

Small, 30.0

30.0

folder

Folder

A folder representation

Small, 30.0

30.0

type

String

The type of item. Valid values are:

Small, 30.0

30.0

• File • Folder

SEE ALSO: Folder Item Page

Folder Item Page A paged collection of Folder Item response bodies. Property

Type

currentPageUrl String

Description

Filter Group Available and Version Version

Chatter REST API URL identifying the current page.

Medium, 30.0

30.0

items

Folder Item[]

A collection of folder items.

Small, 30.0

30.0

nextPageUrl

String

Chatter REST API URL identifying the next page, or Small, 30.0 null if there isn’t a next page. Check whether this value is null before getting another page. If a page doesn’t exist, a ConnectApi.NotFoundException error is returned.

30.0

Chatter REST API URL identifying the previous page, or Medium, 30.0 null if there isn’t a previous page.

30.0

previousPageUrl String

Folder Path A folder path. Property Name

Type

Description

Filter Group and Version

Available Version

folderId

String

ID of the folder.

Small, 40.0

40.0

763

Chatter REST API Developer Guide

Follower Page

Property Name

Type

Description

Filter Group and Version

Available Version

folderName

String

Name of the folder, or null for the root.

Small, 40.0

40.0

SEE ALSO: Folder

Follower Page Property

Type

currentPageUrl String followers

Subscription[]

mySubscription Reference

Description

Filter Group Available and Version Version

URL of the current page

Medium, 29.0

23.0

Collection of one or more subscriptions of those that follow a record

Small, 29.0

23.0 23.0–24.0

Note: This field is no longer available as of version 24.0. If the context user is following this user, contains information about the subscription, otherwise null.

nextPageUrl

String

previousPageUrl String

total

Integer

Chatter REST API URL identifying the next page, or Small, 29.0 null if there isn’t a next page. Check whether this value is null before getting another page. If a page doesn’t exist, a ConnectApi.NotFoundException error is returned.

23.0

Chatter REST API URL identifying the previous page, or Medium, 29.0 null if there isn’t a previous page.

23.0

Total number of followers

Small, 29.0

23.0

Following Counts Property

Type

Description

Filter Group Available and Version Version

people

Integer

Number of people the user is following

Small, 29.0

23.0

records

Integer

Number of records the user is following

Small, 29.0

23.0

Topics are a type of record that can be followed as of version 29.0.

764

Chatter REST API Developer Guide

Following Page

Property

Type

Description

Filter Group Available and Version Version

total

Integer

Total number of items the user is following

Small, 29.0

Description

Filter Group Available and Version Version

URL to the current page

Medium, 29.0

23.0

23.0

SEE ALSO: User Detail

Following Page Property

Type

currentPageUrl String following

Subscription[]

Collection of one or more subscriptions

Small, 29.0

23.0

nextPageUrl

String

URL of the next page

Small, 29.0

23.0

URL of the previous page

Medium, 29.0

23.0

Total number of records being followed

Small, 29.0

23.0

previousPageUrl String total

Integer

Forecasting Manager Represents a forecast manager, including their level above a specified user in the forecast hierarchy. Property Name

Type

Description

Filter Group and Version

Available Version

firstName

String

First name of the forecast manager at this role.

Small, 36.0

36.0

Level of this forecasting manager above the Small, 36.0 forecasting manager requested in the hierarchy tree.

36.0

hierarchyLevel Integer

lastName

String

Last name of the forecast manager at this role.

Small, 36.0

36.0

userId

String

User ID of the forecast manager user.

Small, 36.0

36.0

userRoleId

String

ID for the user role object attached to this profile.

Small, 36.0

36.0

SEE ALSO: Forecasting Manager Ancestors

765

Chatter REST API Developer Guide

Forecasting Manager Ancestors

Forecasting Manager Ancestors A list of forecast managers. Property Name

Type

Description

Filter Group and Version

Available Version

ancestors

Forecasting Manager[]

List of parent forecasting managers.

Small, 36.0

36.0

url

String

URL that generated the list of managers.

Small, 36.0

36.0

userRoleId

String

ID for the user role object attached to this profile.

Small, 36.0

36.0

Forecasting User A representation of a forecasting user. Property Name

Type

Description

Filter Group and Version

Available Version

firstName

String

First name of the forecasting user.

Big, 36.0

36.0

lastName

String

Last name of the forecasting user.

Big, 36.0

36.0

userId

String

ID of the forecasting user.

Big, 36.0

36.0

SEE ALSO: Forecasting User Collection

Forecasting User Access Indicates whether the context user has access to view the specified user’s forecast. Property Name

Type

Description

Filter Group and Version

Available Version

canAccess

Boolean

The value is true if the context user can access the forecast user, false if they can’t.

Small, 36.0

36.0

userId

String

The ID of the user being queried.

Small, 36.0

36.0

SEE ALSO: Forecasting User Access Collection

766

Chatter REST API Developer Guide

Forecasting User Access Collection

Forecasting User Access Collection A collection of forecast user access representations. Property Name

Type

Description

Filter Group and Version

Available Version

users

Forecasting User Access[]

A list of accessible forecasting users.

Big, 36.0

36.0

Forecasting User Collection A collection of forecasting users whose forecasts the context user can view. Property Name

Type

Description

Filter Group and Version

Available Version

jumpToUsers

Forecasting User[]

A collection of forecasting users that the context user can jump to.

Big, 36.0

36.0

url

String

The URL that generated the collection of users.

Small, 36.0

36.0

Generic Bundle Capability If a feed element has this capability, the feed element may be a group of other feed elements condensed into one. Note: Bundled posts contain feed-tracked changes. In Salesforce for Android and Salesforce for iOS, bundled posts are in record feeds only. Property Name

Type

Description

Filter Group and Version

Available Version

bundleType

String

Specifies the type of bundle. The value is GenericBundle.

Small, 31.0

31.0

page

Feed Element Page

A collection of feed elements.

Small, 31.0

31.0

The total number of feed elements that this Small, 31.0 bundle aggregates.

31.0

totalElements Integer

SEE ALSO: Feed Element Capabilities

Generic Feed Element A generic feed element.

767

Chatter REST API Developer Guide

Generic Feed Element

Property Name

Type

Description

Filter and Version Available Version

body

Feed Item Body

Information about the feed element.

Small, 22.0

22.0

capabilities

Feed Element Capabilities

A container for all capabilities that can be included with a feed element.

Medium, 31.0

31.0

createdDate

Date

An ISO 8601 format date string, for example, Small, 29.0 2011-02-25T18:24:31.000Z.

31.0

Feed elements are the top-level objects that Small, 31.0 a feed contains. The feed element type describes the characteristics of that feed element. One of these values:

31.0

feedElementType String

• Bundle—A container of feed elements. A bundle also has a body made up of message segments that can always be gracefully degraded to text-only values. • FeedItem—A feed item has a single parent and is scoped to one community or across all communities. A feed item can have capabilities such as bookmarks, canvas, content, comment, link, poll. Feed items have a body made up of message segments that can always be gracefully degraded to text-only values. • Recommendation—A recommendation is a feed element with a recommendations capability. A recommendation suggests records to follow, groups to join, or applications that are helpful to the context user. header

Feed Item Body

The header is the title of the post. This Medium, 31.0 property contains renderable plain text for all the segments of the message. If a client doesn’t know how to render a feed element type, it should render this text.

31.0

id

String

The ID for a feed element.

Small, 22.0

22.0

modifiedDate

Date

An ISO 8601 format date string, for example, Small, 29.0 2011-02-25T18:24:31.000Z.

31.0

parent

One of these response bodies:

The parent of the feed element.

28.0

• File Detail • File Summary

768

Medium, 29.0

Chatter REST API Developer Guide

Property Name

Type

Group

Description

Filter and Version Available Version

• Group • Group Detail • Record Summary • Record View • User Detail • User Summary relative CreatedDate

Date

The created date formatted as a relative, Small, 29.0 localized string, for example, “17m ago” or “Yesterday.”

31.0

url

String

Chatter REST API URL to this feed element. Small, 29.0

22.0

SEE ALSO: Pinned Feed Element Collection (Beta)

Group Property

Type

Description

Filter Group Available and Version Version

additional Label

String

An extra label for the group, for example, “Archived,” “Private,” or “Private With Customers.” If there isn’t an extra label, the value is null.

Small, 30.0

30.0

announcement

Announcement

An announcement for the group.

Big, 31.0

31.0

bannerPhoto

Banner Photo

The banner photo for the group.

Big, 36.0

36.0

canHave Boolean ChatterGuests

true if this group allows Chatter customers, false Small, 29.0

23.0

otherwise

community

Reference

Information about the community. Returns null if Medium, 29.0 group exists in the default community or communities aren’t enabled.

26.0

description

String

Text-only description of the group

23.0

emailTo String ChatterAddress

isArchived

Boolean

Big, 29.0

Group’s email address for posting to this group by email. Medium, 30.0

30.0

Returns null if Chatter emails and posting to Chatter by email aren’t both enabled in your organization. Specifies whether the group is archived (true) or not Big, 29.0 (false).

769

29.0

Chatter REST API Developer Guide

Property

Type

isAutoArchive Boolean Disabled

Group

Description

Filter Group Available and Version Version

Specifies whether automatic archiving is disabled for the group (true) or not (false).

Big, 29.0

29.0

isBroadcast

Boolean

Specifies whether the group is a broadcast group (true) or not (false). In a broadcast group, only group owners and managers can post to the group.

Big, 36.0

36.0

fileCount

Integer

Number of files posted to this group

Big, 29.0

24.0–27.0 The fileCount

property is in the Group Detail response body. id

String

18-character ID of the group

isArchived

Boolean

Specifies whether the group is archived (true) or not Big, 29.0 (false).

29.0

isAutoArchive Boolean Disabled

Specifies whether automatic archiving is disabled for the group (true) or not (false).

Big, 29.0

29.0

lastFeed Date ElementPostDate

Date of the most recent feed element posted to the group

Big, 31.0

31.0

lastFeedItem PostDate

Date

Small, 29.0

Date of the most recent feed item posted to the group. Big, 29.0

23.0

24.0–30.0

After API version 30.0, use lastFeedElementPostDate.

memberCount

Integer

Total number of group members

Small, 29.0

23.0

motif

Motif

Small, medium, and large icons indicating that the Small, 29.0 object is a group. The motif can also contain the record type’s base color.

27.0

The icon is not the group photo. myRole

String

Values are:

Small, 29.0

23.0

• GroupOwner • GroupManager • NotAMember • NotAMemberPrivateRequested • StandardMember mySubscription Reference

name

String

If the context user is a member of this group, contains Medium, 29.0 information about that subscription, otherwise null

23.0

Name of the group

23.0

Small, 29.0

770

Chatter REST API Developer Guide

Group Chatter Settings

Property

Type

Description

Filter Group Available and Version Version

owner

User Summary

Information about the owner of the group

Medium, 29.0

24.0

photo

Photo

Information about the group photo

Small, 29.0

23.0

type

String

CollaborationGroup

Small, 29.0

23.0

url

String

Relative URL string to the group

Small, 29.0

23.0

visibility

String

Values are:

Small, 29.0

23.0

• PrivateAccess—Only members of the group can see posts to this group. • PublicAccess—All users within the community can see posts to this group. • Unlisted—Reserved for future use.

SEE ALSO: User Group Page

Group Chatter Settings A user’s Chatter settings for a specific group. Property

Type

emailFrequency String

Description

Filter Group Available and Version Version

The frequency with which a group member receives email from a group. One of the following values:

Small, 29.0

• EachPost • DailyDigest • WeeklyDigest • Never • UseDefault The value UseDefault uses the user’s default global setting defined in User Chatter Settings. In communities, the Email on every post option is disabled once more than 10,000 members choose this setting for the group. All members who had this option selected are automatically switched to Daily digests.

771

27.0

Chatter REST API Developer Guide

Group Detail

Group Detail Property

Type

Description

Filter Group Available and Version Version

additional Label

String

An extra label for the group, for example, “Archived,” “Private,” or “Private With Customers.” If there isn’t an extra label, the value is null.

Small, 30.0

30.0

announcement

Announcement

The current announcement for this group.

Big, 31.0

31.0

bannerPhoto

Banner Photo

The banner photo for the group.

Big, 36.0

36.0

canHave Boolean ChatterGuests

true if this group allows Chatter customers, false Small, 29.0

23.0

otherwise

community

Reference

Information about the community. Returns null if Medium, 29.0 group exists in the default community or communities aren’t enabled.

26.0

description

String

Text-only description of the group

23.0

emailTo String ChatterAddress

Big, 29.0

Group’s email address for posting to this group by email. Medium, 30.0

30.0

Returns null if Chatter emails and posting to Chatter by email aren’t both enabled in your organization.

fileCount

Integer

Number of files posted to this group

Big, 29.0

28.0

id

String

18-character ID of the group

Small, 29.0

23.0

information

Group Information

The Information section of the group. If the group is Big, 29.0 private, this section is visible only to members. If the context user is not a member of the group or does not have Modify All Data or View All Data permission, the value is null.

28.0

isArchived

Boolean

Specifies whether the group is archived (true) or not Big, 29.0 (false).

29.0

Specifies whether automatic archiving is disabled for the group (true) or not (false).

Big, 29.0

29.0

Specifies whether the group is a broadcast group (true) or not (false). In a broadcast group, only group owners and managers can post to the group.

Big, 36.0

36.0

Date of the most recent feed element posted to the group

Big, 31.0

31.0

isAutoArchive Boolean Disabled isBroadcast

Boolean

lastFeed String ElementPostDate lastFeed ItemPostDate

String

Date of the most recent feed item posted to the group. Big, 29.0

24.0–30.0

After API version 30.0, use lastFeedElementPostDate.

memberCount

Integer

Total number of group members

772

Small, 29.0

23.0

Chatter REST API Developer Guide

Group Information

Property

Type

Description

Filter Group Available and Version Version

motif

Motif

Small, medium, and large icons indicating that the Small, 29.0 object is a group. The motif can also contain the record type’s base color.

27.0

The icon is not the group photo. myRole

String

Values are:

Small, 29.0

23.0

• GroupOwner • GroupManager • NotAMember • NotAMemberPrivateRequested • StandardMember mySubscription Reference

If the context user is a member of this group, contains Medium, 29.0 information about that subscription, otherwise null

23.0

name

String

Name of the group

Small, 29.0

23.0

owner

User Summary

Information about the owner of the group

Medium, 29.0

24.0

The number of pending requests to join a private group. Medium, 29.0 For public groups, the value is null.

29.0

pendingRequests Integer

photo

Photo

Information about the group photo

Small, 29.0

23.0

type

String

CollaborationGroup

Small, 29.0

23.0

url

String

Relative URL string to the group

Small, 29.0

23.0

visibility

String

Values are:

Small, 29.0

23.0

• PrivateAccess—Only members of the group can see posts to this group. • PublicAccess—All users within the community can see posts to this group. • Unlisted—Reserved for future use.

SEE ALSO: Group Page

Group Information Describes the “Information” section of a group. Information about groups, such as the group's members, photo, and the groups in the organization. Create and delete a group, add members to a group, and change the group photo.

773

Chatter REST API Developer Guide

Group Member

Property

Type

Description

Filter Group Available and Version Version

text

String

The text of the “Information” section of a group

Small, 29.0

28.0

title

String

The title of the “Information” section of a group

Small, 29.0

28.0

SEE ALSO: Group Detail

Group Member Property

Type

Description

Filter Group Available and Version Version

id

String

18-character ID of the group membership

Small, 29.0

23.0

lastFeed AccessDate

Date

The date and time at which the group member last accessed the group feed.

Small, 31.0

31.0

role

String

Values are:

Small, 29.0

23.0

• GroupOwner • GroupManager • NotAMember • NotAMemberPrivateRequested • StandardMember url

String

URL to this membership

Small, 29.0

23.0

user

User Summary

Information about the user who is subscribed to this group

Small, 29.0

23.0

Description

Filter Group Available and Version Version

URL to this page of members

Medium, 29.0

23.0

Small, 29.0

23.0

SEE ALSO: Group Member Page

Group Member Page Property

Type

currentPageUrl String members

Group Member[]

Collection of group members

myMembership

Reference

If the context user is a member of this group, returns Medium, 29.0 information about that membership, or returns null otherwise

774

23.0

Chatter REST API Developer Guide

Group Membership Request

Property

Type

Description

Filter Group Available and Version Version

nextPageUrl

String

URL to the next page of members

Small, 29.0

23.0

URL to the previous page of members

Medium, 29.0

23.0

Total number of group members

Small, 29.0

23.0

previousPageUrl String totalMember Count

Integer

Group Membership Request Property

Type

Description

Filter Group Available and Version Version

createdDate

String

An ISO formatted date string specifying the date of the Big, 29.0 membership request

27.0

id

String

ID for the group membership request object

Small, 29.0

27.0

lastUpdateDate String

An ISO formatted date string specifying the last time the request was updated

Small, 29.0

27.0

requestedGroup Reference

Information about the group the user is requesting to Big, 29.0 join

27.0

responseMessage String

A message to display to the user if their membership request is declined. The value of this property is used only when the value of the status property is Declined.

27.0

Big, 29.0

The maximum length is 756 characters. status

String

The status of the request to join a private group. Values Small, 29.0 are:

27.0

• Accepted • Declined • Pending url

String

URL to this group membership request object

Small, 29.0

27.0

user

User Summary

Information about the user requesting membership in Small, 29.0 a group

27.0

SEE ALSO: Group Membership Request Collection

775

Chatter REST API Developer Guide

Group Membership Request Collection

Group Membership Request Collection Property

Type

Description

Filter Group Available and Version Version

requests

Group Membership Information about all requests to join a private group Request

Small, 29.0

27.0

total

Integer

The total number of requests to join a private group

Small, 29.0

27.0

Type

Description

Filter Group Available and Version Version

URL to this page of groups

Medium, 29.0

23.0

Group Page Property

currentPageUrl String groups

Group Detail[]

Collection of group details

Small, 29.0

23.0

nextPageUrl

String

URL to the next page of groups

Small, 29.0

23.0

URL to the previous page of groups

Medium, 29.0

23.0

previousPageUrl String

Group Record A record associated with a group. Property

Type

Description

Filter Group Available and Version Version

id

String

18-character ID of the record associated with the group

Small, 33.0

33.0

record

Record Summary User Summary

Information about the record associated with the group

Small, 33.0

33.0

url

String

URL to the record associated with the group

Small, 33.0

33.0

SEE ALSO: Group Record Page

Group Record Page A paginated list of records associated with a group.

776

Chatter REST API Developer Guide

Icon

Property

Type

Description

Filter Group Available and Version Version

current PageUrl

String

URL to the current page

Medium, 33.0

nextPageUrl

String

URL to the next page. If there is no next page, returns Small, 3.0

33.0 33.0

null previous PageUrl

String

URL to the previous page. If there is no previous page, Medium, 3.0 returns null

33.0

records

Group Record[]

Collection of records associated with a group

Small, 33.0

33.0

totalRecord Count

Integer

Total number of records associated with a group

Small, 33.0

33.0

Property

Type

Description

Filter Group Available and Version Version

height

Integer

The height of the icon, in pixels

Small, 29.0

27.0

width

Integer

The width of the icon, in pixels

Small, 29.0

27.0

url

String

The URL of the icon. This URL is available to unauthenticated users. The URL doesn’t expire.

Small, 29.0

27.0

Icon

SEE ALSO: Canvas Capability Enhanced Link Capability Social Post Capability

Image File An image file. Property Name

Type

Description

Filter Group and Version

Available Version

masterDetail

Image File Detail

Original image’s details.

Small, 39.0

39.0

rendition Dimensions

Image File Detail[]

Original image’s available rendition dimensions.

Small, 39.0

39.0

Image File Detail Image file details.

777

Chatter REST API Developer Guide

Influence Thresholds

Property Name

Type

Description

Filter Group and Version

Available Version

height

Integer

Image’s height in pixels.

Small, 39.0

39.0

imageFormat

String

Image’s format.

Small, 39.0

39.0

orientation

String

Image’s EXIF orientation value, if present.

Small, 39.0

39.0

width

Integer

Image’s width in pixels.

Small, 39.0

39.0

SEE ALSO: Message Segment: Inline Image Image File

Influence Thresholds Property

Type

Description

Filter Group Available and Version Version

name

String

Description of this influencer category. For example:

Small, 29.0

24.0

Number expressed as a raw percentile that defines the Small, 29.0 bottom threshold for this influencer category. For example: 0.25 defines the cutoff for the Active Influencer category, which means it includes users with an influence rank equal to or greater than the 25th percentile (25%) and less than the next highest category threshold.

24.0

Active Influencer threshold

Double

Interactions Capability If a feed element has this capability, it has information about user interactions. Property Name

Type

Description

Filter Group and Version

Available Version

count

Long

The number of individual views, likes, and comments on a feed post.

Small, 37.0

37.0

SEE ALSO: Related Question Feed Element Capabilities

778

Chatter REST API Developer Guide

Invite

Invite An invitation. Property Name

Type

Description

Filter Group and Version

Available Version

email

String

Email address of the user.

Small, 39.0

39.0

status

String

Specifies the status of an invitation to join a group. Values are:

Small, 39.0

39.0

ID of the user.

Small, 39.0

39.0

• ActedUponUser—The user was added to the group. An email was sent asking the user to visit the group. • Invited—An email was sent asking the user to sign up for the org. • MaxedOutUsers—The group has the maximum allowed members. • MultipleError—The user wasn’t invited due to multiple errors. • NoActionNeededUser—The user is already a member of the group. • NotVisibleToExternalInviter—The user is not accessible to the user sending the invitation. • Unhandled—The user couldn’t be added to the group for an unknown reason. userId

String

SEE ALSO: Invite Collection

Invite Collection A collection of invitations. Property Name

Type

Description

Filter Group and Version

Available Version

invitations

Invite[]

Collection of invitations.

Small, 39.0

39.0

Knowledgeable People Represents a user that is knowledgeable about a specified topic.

779

Chatter REST API Developer Guide

Property

Type

Knowledgeable People Collection

Description

Filter Group Available and Version Version

isEndorsedByMe Boolean

Specifies if the knowledgeable user is endorsed for the Small, 30.0 topic by the context user, true if so, false otherwise

30.0

knowledgeableId String

ID of the knowledgeable record

Small, 30.0

30.0

numEndorsements Integer

Number of endorsements received by the knowledgeable user for the topic

Medium, 30.0

30.0

Specifies the reasons why the user is considered knowledgeable about the topic. Valid values are:

Medium, 30.0

30.0

Small, 30.0

30.0

reasons

String

• Influential—User was mentioned in posts or in comments on posts with the topic or received likes on comments on posts with the topic. • Endorsed—User received endorsement from another user for the topic. user

User Summary

User that is knowledgeable about the topic

SEE ALSO: Knowledgeable People Collection

Knowledgeable People Collection A collection of knowledgeable people response bodies. Property

Type

Description

Filter Group Available and Version Version

currentPageUrl String

Chatter REST API URL identifying the current page.

Medium, 30.0

knowledgeableUsers Knowledgeable

Collection of knowledgeable people response bodies Small, 30.0

30.0

Chatter REST API URL identifying the next page, or Small, 30.0 null if there isn’t a next page. Check whether this value is null before getting another page. If a page doesn’t exist, a ConnectApi.NotFoundException error is returned.

30.0

Chatter REST API URL identifying the previous page, or Medium, 30.0 null if there isn’t a previous page.

30.0

30.0

People[] nextPageUrl

String

previousPageUrl String

780

Chatter REST API Developer Guide

Knowledge Article Version

Knowledge Article Version A knowledge article version. Property Name

Type

Description

Filter Group and Version

Available Version

articleType

String

Type of the knowledge article.

Small, 36.0

36.0

id

String

ID of the knowledge article version.

Small, 36.0

36.0

knowledge ArticleId

String

ID of the corresponding knowledge article. Small, 36.0

36.0

Last published date of the knowledge article.

36.0

lastPublished Date Date

Small, 36.0

summary

String

Summary of the knowledge article contents. Medium, 36.0

36.0

title

String

Title of the knowledge article.

Small, 36.0

36.0

urlName

String

URL name of the knowledge article.

Small, 36.0

36.0

Filter Group and Version

Available Version

SEE ALSO: Knowledge Article Version Collection

Knowledge Article Version Collection A collection of knowledge article versions. Property Name

Type

Description

items

Knowledge Article Version[]

A collection of knowledge article versions. Small, 36.0

36.0

Lightning Extension Information Lightning extension information. Property Name

Type

Description

Filter Group and Version

Available Version

composition Component

String

Component to use in compose state.

Small, 40.0

40.0

extension String InformationType

Value is Lightning.

Small, 40.0

40.0

headerTextLabel String

Label for the extension’s header.

Small, 40.0

40.0

hoverTextLabel String

Label for hovering over the extension.

Small, 40.0

40.0

781

Chatter REST API Developer Guide

Property Name

Type

renderComponent String

Like

Description

Filter Group and Version

Available Version

Component to use in render or preview state.

Small, 40.0

40.0

SEE ALSO: Extension Definition

Like Property

Type

Description

Filter Group or Version

Available Version

id

String

18-character ID of the like

Small, 29.0

23.0

likedItem

Reference

A reference to the liked comment or feed element

Medium, 29.0

27.0

url

String

URL to this like

Small, 29.0

23.0

user

User Summary

Information about the user who liked this comment or Small, 29.0 feed element

23.0

SEE ALSO: Like Page

Like Message Body Property

Type

messageSegments Segments[]

Description

Filter Group Available and Version Version

Collection of message segments, based on type. Segments can be one or more of the following:

Medium, 29.0

27.0

Small, 29.0

27.0

• Message Segment: Entity Link • Message Segment: Resource Link • Message Segment: Text text

String

Text summary of the users who like the feed item or comment. For example, “You like this.” or “Renee Moreau, Gordon Johnson, and Pam Jones like this.”

SEE ALSO: Chatter Likes Capability Comment

782

Chatter REST API Developer Guide

Like Page

Like Page Property

Type

Description

Filter Group Available and Version Version

currentPageToken String

Token identifying the current page.

Medium, 37.0

37.0

currentPageUrl String

URL to the current page of likes.

Medium, 29.0

23.0

items

Like[]

Collection of likes.

Small, 32.0

32.0

likes

Like[]

Collection of likes.

Small, 29.0

23.0–31.0

Important: As of API version 32.0, use the items property. myLike

Reference

23.0–24.0

Note: This field is no longer available as of version 24.0. Either returns a reference to the specific like or returns null.

nextPageToken String

nextPageUrl

String

Token identifying the next page, or null if there isn’t Small, 37.0 a next page.

37.0

URL to the next page of likes.

23.0

Small, 29.0

previousPageToken String

Token identifying the previous page, or null if there Medium, 37.0 isn’t a previous page.

37.0

previousPageUrl String

URL to the previous page of likes.

Medium, 29.0

23.0

Total number of likes for the item.

Small, 29.0

23.0

total

Integer

SEE ALSO: Chatter Likes Capability Comment

Link Capability If a feed element has this capability, it has a link. Property Name

Type

Description

Filter Group and Version

url

String

Link URL. The URL can be to an external site. Small, 32.0

32.0

urlName

String

Description of the link.

32.0

SEE ALSO: Feed Element Capabilities

783

Small, 32.0

Available Version

Chatter REST API Developer Guide

List View Column

List View Column Describes a single column of a record’s related list. Describes how to lay out the column; doesn’t contain the column’s data. Property

Type

Description

Filter Group Available and Version Version

dataType

String

The object type for this column’s field. This is the object Medium, 29.0 type used in REST API and SOAP API.

29.0

fieldId

String

The fully qualified API field ID, for example, Contact.Name.

Big, 29.0

29.0

label

String

The localized label of this column.

Small, 29.0

29.0

name

String

The short name of the API field, for example, Name.

Medium, 29.0

29.0

SEE ALSO: List View Definition

List View Definition Defines a related list structure or a search list structure on a record view. There is no data in the list. Property

Type

Description

Filter Group Available and Version Version

columns

List View Column[]

The columns of fields shown in this list view.

Big, 29.0

29.0

label

String

The localized label of this list view.

Small, 29.0

29.0

objectType

List View Object

The definition of the type of the objects in this list view. Medium, 29.0

29.0

rowLimit

Integer

The maximum number of objects per page in this list Medium, 29.0 view. To view all objects in this related list, page through the data in pages no larger than this size. To build a SOQL statement from this describe, the SOQL statement must include a LIMIT value equal to this value or an error is thrown on execution.

29.0

sortColumns

List View Sort[]

The columns in which to sort this list view. The sort columns are given in the order of their priority (for example, primary sort, secondary sort, and so on).

29.0

SEE ALSO: Record View

List View Object Defines the type of record displayed in the rows of a related list.

784

Medium, 29.0

Chatter REST API Developer Guide

List View Record

Property

Type

Description

Filter Group Available and Version Version

fieldId

String

The API field ID that refers to the parent record. For example, if an Account record has a related list of Contact records, then in the Contact related list definition on the Account this value might be "Account".

Big, 29.0

type

String

The object type name for this object. This is the object Small, 29.0 type used in REST API and SOAP API.

29.0

29.0

SEE ALSO: List View Definition

List View Record The list view of a record. Property

Type

fields

Description

Filter Group Available and Version Version

The fields and values for the record displayed in this list. A collection of any of these:

Medium, 30.0

30.0

• Record Field • Record Field: Blank • Record Field: Compound • Record Field: Currency • Record Field: Date • Record Field: Percent • Record Field: Picklist • Record Field: Reference • Record Field: Reference with Date id

String

18-character ID of the object

Small, 29.0

23.0

motif

Motif

Small, medium, and large icons indicating the type of Small, 29.0 the object. The motif can also contain the object’s base color.

27.0

The icon is not a preview of the file. mySubscription Reference

name

String

If the context user is following this file, this contains Medium, 29.0 information about the subscription; otherwise returns null.

23.0

The localized name of this record.

23.0

785

Small, 29.0

Chatter REST API Developer Guide

List View Sort

Property

Type

Description

Filter Group Available and Version Version

type

String

A fixed type name for this object. Check this value to determine the shape of a response body.

Small, 29.0

23.0

url

String

The Chatter REST API URL resource for this object.

Small, 29.0

23.0

List View Sort Defines an ordinal of a sort order in a related list. Property

Type

Description

Filter Group Available and Version Version

column

String

The field ID on the related list column to sort.

Small, 29.0

29.0

order

String

The order in which to sort the column. One of these values:

Small, 29.0

29.0

• Ascending—Items are in ascending alphabetical order (A-Z). • Descending—Items are in descending alphabetical order (Z-A). • MostRecentlyViewed—Items are in descending chronological order by view. This sort order is valid only for Chatter feed streams.

SEE ALSO: List View Definition

Maintenance Information Information about the upcoming scheduled maintenance for the organization. Property Name

Type

Description

Filter Group and Version

Available Version

description

String

Description of the maintenance.

Small, 34.0

34.0

maintenance Title

String

Title of the maintenance.

Small, 34.0

34.0

maintenance Type

String

Specifies the type of maintenance. One of the following:

Small, 34.0

34.0

• Downtime—Downtime maintenance. • GenerallyAvailable—Maintenance with generally available mode.

786

Chatter REST API Developer Guide

Property Name

Type

Managed Topic

Description

Filter Group and Version

Available Version

• MaintenanceWithDowntime—Scheduled maintenance with downtime. • ReadOnly—Maintenance with read-only mode. message Date EffectiveTime

Effective time when users start seeing the maintenance message.

Small, 34.0

34.0

message Date ExpirationTime

Expiration time of the maintenance message.

Small, 34.0

34.0

Scheduled end of downtime. null for GenerallyAvailable and ReadOnly maintenance types.

Small, 34.0

34.0

scheduledEnd Date MaintenanceTime

Scheduled end of maintenance. null for Small, 34.0 Downtime maintenance type.

34.0

scheduledStart Date Downtime

Scheduled start of downtime. null for GenerallyAvailable and ReadOnly maintenance types.

Small, 34.0

34.0

scheduledStart Date MaintenanceTime

Scheduled start time of maintenance. Small, 34.0 null for Downtime maintenance type.

34.0

scheduledEnd Downtime

Date

SEE ALSO: Organization

Managed Topic Represents a managed topic in a community. Property Name

Type

Description

Filter Group and Version

Available Version

children

Managed Topic[]

Children managed topics of the managed topic; null if the depth request parameter isn’t specified or is 1.

Medium, 35.0

35.0

id

String

ID of managed topic.

Small, 32.0

32.0

managedTopic Type

String

Type of managed topic.

Small, 32.0

32.0

• Featured—Topics that are featured, for example, on the community home page, but don’t provide overall navigation.

787

Chatter REST API Developer Guide

Property Name

Type

Managed Topic Collection

Description

Filter Group and Version

Available Version

• Navigational—Topics that display in a navigational menu in the community. parent

Reference

Parent managed topic of the managed topic.

Medium, 35.0

35.0

topic

Topic

Information about the topic.

Small, 32.0

32.0

url

String

Chatter REST API URL to the managed topic. Small, 32.0

32.0

SEE ALSO: Managed Topic Collection

Managed Topic Collection A collection of managed topics in a community. Property Name

Type

Description

Filter Group and Version

Available Version

currentPageUrl String

Chatter REST API URL identifying the current Medium, 32.0 page.

32.0

managedTopics Managed Topic[]

Collection of managed topics.

Small, 32.0

32.0

Media Reference A media reference. Property Name

Type

Description

Filter Group and Version

Available Version

mediaUrl

String

URL to stream or download the media.

Small, 41.0

41.0

thumbnailUrl

String

URL of the media’s thumbnail, if one exists. Small, 41.0

41.0

SEE ALSO: Media Reference Capability

Media Reference Capability If a feed element has this capability, it has one or more media references.

788

Chatter REST API Developer Guide

Mention Completion

Property Name

Type

Description

Filter Group and Version

Available Version

media

Media Reference[]

Collection of media references.

Small, 41.0

41.0

SEE ALSO: Feed Element Capabilities

Mention Completion Information about a record that could be used to @mention a user or group. Property

Type

additionalLabel String

Description

Filter Group Available and Version Version

An additional label (if one exists) for the record represented by this completion, for example, “(Customer)” or “(Acme Corporation)”.

Big, 29.0

29.0

description

String

Description for the record represented by this completion

Medium, 29.0

29.0

name

String

Name for the record represented by this completion

Small, 29.0

29.0

outOfOffice

Out of Office

If the record represented by this completion is a user, Small, 40.0 an additional out-of-office message, if one exists, for the user.

40.0

photoUrl

String

URL to the photo or icon for the record represented by Medium, 29.0 this completion

29.0

recordId

String

18-character ID for the record represented by this completion

29.0

789

Small, 29.0

Chatter REST API Developer Guide

Mention Completion Page

Property

Type

Description

Filter Group Available and Version Version

userType

String

If the record represented by this completion is a user, Medium, 30.0 this value is the user type associated with that user; otherwise the value is null.

30.0

One of these values: • ChatterGuest—User is an external user in a private group. • ChatterOnly—User is a Chatter Free customer. • Guest—User is unauthenticated. • Internal—User is a standard organization member. • Portal—User is an external user in a customer portal, partner portal, or community. • System—User is Chatter Expert or a system user. • Undefined—User is a user type that is a custom object.

SEE ALSO: Mention Completion Page

Mention Completion Page A paginated list of Mention Completion response bodies. Property

Type

currentPageUrl String

Description

Filter Group Available and Version Version

URL of the current page

Medium, 29.0

29.0

mention Completions

Mention Completion[]

Collection of Mention Completion response bodies to Small, 29.0 use in a mention.

29.0

nextPageUrl

String

Chatter REST API URL identifying the next page, or Small, 29.0 null if there isn’t a next page. Check whether this value is null before getting another page. If a page doesn’t exist, a ConnectApi.NotFoundException error is returned.

29.0

Chatter REST API URL identifying the previous page, or Medium, 29.0 null if there isn’t a previous page.

29.0

previousPageUrl String

790

Chatter REST API Developer Guide

Mention Validation

Mention Validation Information about whether a proposed mention is valid for the context user. Property

Type

Description

Filter Group Available and Version Version

recordId

String

The ID of the mentioned record.

Small, 29.0

29.0

Specifies the type of validation error for a proposed mention, if any. One of these values:

Small, 29.0

29.0

validationStatus String

• Disallowed—The proposed mention is invalid and is rejected because the context user is trying to mention something that is not allowed. For example, a user who is not a member of a private group is trying to mention the private group. • Inaccessible—The proposed mention is allowed but the user or record being mentioned isn’t notified because they don't have access to the parent record being discussed. • Ok—There is no validation error for this proposed mention.

SEE ALSO: Mention Validations

Mention Validations Information about whether a set of mentions is valid for the context user. Property

Type

Description

Filter Group Available and Version Version

hasErrors

Boolean

Indicates whether at least one of the proposed Small, 29.0 mentions has an error (true), or not (false). For example, context users can’t mention private groups they don’t belong to. If such a group is included in the list of mention validations, hasErrors is true and the group has a validationStatus of Disallowed in its mention validation.

mention Validations

Mention Validation[] Information about whether a set of mentions is valid for the context user.

791

Medium, 29.0

29.0

29.0

Chatter REST API Developer Guide

Message

Message Property

Type

Description

Filter Group Available and Version Version

body

Feed Item Body

Text of this message

Small, 29.0

23.0

conversationId String

18-character ID of the conversation this message is part Big, 29.0 of

23.0

conversationUrl String

URL to the conversation this message is part of

Small, 29.0

23.0

id

String

18-character ID of the message

Small, 29.0

23.0

recipients

User Summary[]

Collection of one or more message recipients

Small, 29.0

23.0

Note: The collection of recipients is empty for the following resources because the conversation participants are already identified in the conversation’s members property in Conversation Detail and Conversation Summary. •

/chatter/users/me/ conversations



/chatter/users/me/ conversations/conversationId

sentDate

String

ISO8601 date string, for example, 2011-02-25T18:24:31.000Z

Small, 29.0

23.0

sender

User Summary

Information about the user who sent this message

Small, 29.0

23.0

Information about the community from which the message was sent

Medium, 32.0

32.0

Small, 29.0

23.0

sendingCommunity Reference

Returns null for the default community or if communities aren’t enabled. url

String

URL to this message

SEE ALSO: Conversation Summary Message Collection

792

Chatter REST API Developer Guide

Message Collection

Message Collection Property

Description

Filter Group Available and Version Version

currentPageToken String

Token identifying the current page.

Medium, 37.0

37.0

currentPageUrl String

Chatter REST API URL identifying the current page.

Medium, 29.0

23.0

Collection of one or more messages.

Small, 29.0

23.0

nextPageToken String

Token identifying the next page, or null if there isn’t Small, 37.0 a next page.

37.0

String

Chatter REST API URL identifying the next page, or Small, 29.0 null if there isn’t a next page. Check whether this value is null before getting another page. If a page doesn’t exist, a ConnectApi.NotFoundException error is returned.

23.0

messages

nextPageUrl

Type

Message[]

SEE ALSO: Conversation Detail

Message Segment: Entity Link Represents an entity, such as a user or a group. Property

Type

Description

Filter Group Available and Version Version

motif

Motif

A set of small, medium, and large icons that correspond Small, 29.0 to the entity type. The motif can also contain the entity type’s base color.

27.0

reference

Reference

Information about the entity

Small, 29.0

25.0

text

String

Plain text output for this segment

Small, 29.0

25.0

type

String

EntityLink

Small, 29.0

25.0

SEE ALSO: Feed Item Body Feed Item Preamble Message Body

Message Segment: Field Change Represents an inline field change.

793

Chatter REST API Developer Guide

Message Segment: Field Change Name

Example: An example of an inline field change is "First Name from Bob to Joe". This example segment consists of multiple segments. [ Text("Owner from "), FieldChangeValue("Bob Smith"), Text(" to "), FieldChangeValue("Dave Jones") ]

Property

Type

Description

Filter Group Available and Version Version

segments

Segments[]

Collection of message segments, based on type. Segments can be one or more of the following:

Medium, 29.0

23.0

Small, 29.0

23.0

Small, 29.0

23.0

• Message Segment: Entity Link • Message Segment: Field Change • Message Segment: Field Change Name • Message Segment: Field Change Value • Message Segment: Hashtag • Message Segment: Inline Image (version 35.0 and later) • Message Segment: Link • Message Segment: Markup Begin (version 35.0 and later) • Message Segment: Markup End (version 35.0 and later) • Message Segment: Mention • Message Segment: More Changes • Message Segment: Text text

String

Formatted text of the change. For example: "City from San Francisco to New Orleans"

type

String

Value is FieldChange

SEE ALSO: Feed Item Body Message Segment: More Changes

Message Segment: Field Change Name Represents an inline name of a field change, like “Name” or “Description.” Making this a separate segment makes it possible to give special user interface treatments to field names, for example, making a name field bold.

794

Chatter REST API Developer Guide

Message Segment: Field Change Value

Property

Type

Description

Filter Group Available and Version Version

text

String

Formatted text of the change. Possible values include: Small, 29.0

23.0

• Old name of the field • New name of the field type

String

Value is FieldChangeName

Small, 29.0

23.0

SEE ALSO: Feed Item Body

Message Segment: Field Change Value Represents an inline value of a field change, like "1" or "Bob Smith.” Making this a separate segment makes it possible to add special coding, for example, to wrap values in anchor tags. Property

Type

Description

Filter Group Available and Version Version

valueType

String

The value type. One of these values:

Big, 29.0

29.0

• NewValue—The new value of the field change. • OldValue—The old value of the field change. text

String

Formatted text of the change. Possible values include: Small, 29.0

23.0

• the words a blank value Note: This text is also localized. • the old value of the field • the new value of the field type

String

Value is FieldChangeValue

Small, 29.0

23.0

url

String

URL value if the field change is to a URL field (such as a web address)

Small, 29.0

23.0

SEE ALSO: Feed Item Body

Message Segment: Hashtag Represents an inline hashtag.

795

Chatter REST API Developer Guide

Message Segment: Inline Image

Property

Type

Description

Filter Group Available and Version Version

tag

String

Text of the hashtag without the hash symbol (#)

Small, 29.0

23.0

text

String

Text of the hashtag with the hash symbol (#)

Small, 29.0

23.0

topicUrl

String

URL for the topic in this format:

Small, 29.0

28.0

/services/data/.../topics?exactMatch=true&q=tag

type

String

Value is Hashtag

Small, 29.0

23.0

url

String

URL search for the tag in this format:

Small, 29.0

23.0

services/data/.../feed-elements?q=%23tag

SEE ALSO: Feed Item Body

Message Segment: Inline Image An inline image in the feed body. Property Name

Type

Description

Filter Group and Version

Available Version

altText

String

Alt text for the inline image.

Small, 35.0

35.0

contentSize

Integer

Size of the file in bytes.

Small, 35.0

35.0

Extension of the file, such as gif.

Small, 37.0

37.0

Big, 41.0

41.0

fileExtension String imageDetails

Image File Detail

Details for the image, or null if the file isn’t an image.

text

String

Alt text for the inline image or the ID of the Small, 35.0 inline image if no alt text is available.

35.0

thumbnails

File Preview Collection

Information about the available thumbnails Medium, 35.0 for the image.

35.0

type

String

InlineImage

Small, 35.0

35.0

url

String

URL to the latest version of the inline image. Small, 35.0

35.0

SEE ALSO: Feed Item Body

796

Chatter REST API Developer Guide

Message Segment: Link

Message Segment: Link Represents an inline link to a URL. Property

Type

Description

Filter Group Available and Version Version

text

String

Plain text of the URL.

Small, 29.0

23.0

type

String

Value is Link.

Small, 29.0

23.0

url

String

URL value of the link.

Small, 29.0

23.0

SEE ALSO: Feed Item Body Feed Item Preamble Message Body

Message Segment: Markup Begin Beginning of rich text markup. Property Name

Type

Description

Filter Group and Version

Available Version

htmlTag

String

The HTML tag for this markup.

Small, 35.0

35.0

markupType

String

Specifies the type of rich text markup.

Small, 35.0

35.0

Empty string, "", for segments of this type. Small, 35.0

35.0

• Bold—Bold tag. • Code—Code tag. • Italic—Italic tag. • ListItem—List item tag. • OrderedList—Ordered list tag. • Paragraph—Paragraph tag. • Strikethrough—Strikethrough tag. • Underline—Underline tag. • UnorderedList—Unordered list tag. To handle markupType values introduced in later API versions, clients can render the text value as a fallback. text

String

797

Chatter REST API Developer Guide

Message Segment: Markup End

Property Name

Type

Description

Filter Group and Version

Available Version

type

String

MarkupBegin

Small, 35.0

35.0

SEE ALSO: Feed Item Body

Message Segment: Markup End End of rich text markup. Property Name

Type

Description

Filter Group and Version

Available Version

htmlTag

String

The HTML tag for this markup.

Small, 35.0

35.0

markupType

String

Specifies the type of rich text markup.

Small, 35.0

35.0

• Bold—Bold tag. • Code—Code tag. • Italic—Italic tag. • ListItem—List item tag. • OrderedList—Ordered list tag. • Paragraph—Paragraph tag. • Strikethrough—Strikethrough tag. • Underline—Underline tag. • UnorderedList—Unordered list tag. To handle markupType values introduced in later API versions, clients can render the text value as a fallback. text

String

Empty string, "", for segments of this type. Small, 35.0

35.0

type

String

MarkupEnd

Small, 35.0

35.0

SEE ALSO: Feed Item Body

Message Segment: Mention Represents an inline @mention.

798

Chatter REST API Developer Guide

Message Segment: More Changes

Property

Type

Description

accessible

Boolean

Specifies whether the mentioned user or group can see Small, 29.0 the mention (true) or not (false).

23.0

name

String

Name of the mentioned user or group.

Small, 29.0

23.0

text

String

Plain text of the mention.

Small, 29.0

23.0

type

String

Value is Mention.

Small, 29.0

23.0

Information about the mentioned user or group. One Small, 29.0 of these response bodies:

29.0

record

Filter Group Available and Version Version

• Group • User Detail • User Summary user

User Summary

Information about the mentioned user, null if the context user doesn’t have access.

None

23.0–28.0 In versions before 29.0, if the mention is not a user, the mention is in a Message Segment: Text response body.

Important: In versions 29.0 and later, use the record property.

SEE ALSO: Feed Item Body

Message Segment: More Changes Property

Type

Description

Filter Group Available and Version Version

moreChanges

Message Segment: Field Change[]

The complete collection of tracked changes for a feed Big, 29.0 item.

29.0

moreChanges Count

Integer

Number of changes

Small, 29.0

23.0

text

String

Formatted text of the number of changes. For example: Small, 29.0

23.0

"2 other changes"

Note: This value is localized.

799

Chatter REST API Developer Guide

Message Segment: Resource Link

Property

Type

Description

Filter Group Available and Version Version

type

String

Value is MoreChanges

Small, 29.0

23.0

SEE ALSO: Feed Item Body

Message Segment: Resource Link Property

Type

Description

Filter Group Available and Version Version

text

String

Formatted text of this segment

Small, 29.0

23.0

type

String

Value is "ResourceLink"

Small, 29.0

23.0

url

String

URL value of the resource link

Small, 29.0

27.0

Filter Group Available and Version Version

Message Segment: Text Represents plain inline text. Property

Type

Description

text

String

Formatted text associated with the item. Possible values Small, 29.0 include:

23.0

• Formatted text of a feed item or comment. • The name of the field that has been changed with the word from. type

String

Value is Text.

Small, 29.0

SEE ALSO: Feed Item Body Feed Item Preamble Message Body

Moderation Audit Record Count Moderation audit record count.

800

23.0

Chatter REST API Developer Guide

Moderation Capability

Property Name

Type

Description

Filter Group and Version

auditAction ToCount

Map The number of actions audited for a user in Small, 40.0 a community. For String values of audit actions, see NetworkActivityAudit in the Object Reference for Salesforce and Force.com.

Available Version 40.0

Moderation Capability If a feed element has this capability, users in the community can flag the feed element for moderation. This response body also includes information about the flagged content. Property Name

Type

moderationFlags Moderation Flags

Description

Filter Group and Version

Available Version

Flags for this feed element. Community moderators can view and take action on flagged items.

Big, 31.0

31.0

SEE ALSO: Feed Element Capabilities

Moderation Flag Item Flag details on a feed item, comment, or file. Property Name

Type

Description

Filter Group and Version

Available Version

createdBy

String

ID of the user who flagged the item.

Small, 40.0

40.0

createdDate

Date

Date when the item was flagged.

Small, 40.0

40.0

id

String

ID of the moderation flag.

Small, 40.0

40.0

Specifies the type of moderation flag. Values Small, 40.0 are:

40.0

moderationType String

• FlagAsInappropriate—Flag for inappropriate content. • FlagAsSpam—Flag for spam. note

String

Note from user who flagged the item.

801

Small, 40.0

40.0

Chatter REST API Developer Guide

Moderation Flags

Property Name

Type

Description

Filter Group and Version

visibility

String

Specifies the visibility behavior of a flag for Small, 40.0 various user types. Values are:

Available Version 40.0

• ModeratorsOnly—The flag is visible only to users with moderation permissions on the flagged element or item. • SelfAndModerators—The flag is visible to the creator of the flag and to users with moderation permissions on the flagged element or item.

SEE ALSO: Moderation Flags Collection

Moderation Flags Moderation flags. Property

Type

Description

Filter Group Available and Version Version

flagCount

Integer

If the context user is a community moderator, the total Small, 29.0 number of flags on the post, comment, or file. If the context user isn’t a community moderator, value is null.

29.0

Flags on files is available starting in version 30.0. flagCount ByReason

Map

Number of moderation flags categorized by reason. Values for String are:

Small, 40.0

40.0

Small, 29.0

29.0

• FlaggedByRule—Moderation rule flagged the item. • FlaggedBySystem—Einstein flagged the item. • FlaggedByUserAsInappropriate—User flagged the item as inappropriate. • FlaggedByUserAsSpam—User flagged the item as spam. flaggedByMe

Boolean

Indicates whether the post, comment, or file was flagged by the context user (true) or not (false). Flags on files is available starting in version 30.0.

802

Chatter REST API Developer Guide

Moderation Flags Collection

Property

Type

Description

Filter Group Available and Version Version

flags

Moderation Flags Collection

Collection of flags.

Small, 40.0

40.0

SEE ALSO: File Summary Moderation Capability

Moderation Flags Collection Collection of flags on a feed item, comment, or file. Property Name

Description

Filter Group and Version

Available Version

currentPageToken String

Token identifying the current page.

Small, 40.0

40.0

currentPageUrl String

Chatter REST API URL identifying the current Small, 40.0 page.

40.0

List of flag details.

Small, 40.0

40.0

nextPageToken String

Token identifying the next page, or null Small, 40.0 if there isn’t a next page.

40.0

String

Chatter REST API URL identifying the next Small, 40.0 page, or null if there isn’t a next page. Check whether this value is null before getting another page. If a page doesn’t exist, a

40.0

flags

nextPageUrl

Type

Moderation Flag Item[]

ConnectApi.NotFoundException

error is returned. pageSize

Integer

Number of items per page.

Small, 40.0

40.0

SEE ALSO: Moderation Flags

Motif The motif properties contain URLs for small, medium, and large icons that indicate the Salesforce record type. Common record types are files, users, and groups, but all record types have a set of motif icons. Custom object records use their tab style icon. All icons are available to unauthenticated users so that, for example, you can display the motif icons in an email. The motif can also contain the record type’s base color.

803

Chatter REST API Developer Guide

Motif

Example: Note: The motif images are icons, not user uploaded images or photos. For example, every user has the same set of motif icons. Custom object records use their tab style icon, for example, the following custom object uses the “boat” tab style: "motif": { "color": "8C004C", "largeIconUrl": "/img/icon/custom51_100/boat64.png", "mediumIconUrl": "/img/icon/custom51_100/boat32.png", "smallIconUrl": "/img/icon/custom51_100/boat16.png", "svgIconUrl": null },

Users use the following icons: "motif": { "color": "1797C0", "largeIconUrl": "/img/icon/profile64.png", "mediumIconUrl": "/img/icon/profile32.png", "smallIconUrl": "/img/icon/profile16.png", "svgIconUrl": null },

Groups use the following icons: "motif": { "color": "1797C0", "largeIconUrl": "/img/icon/groups64.png", "mediumIconUrl": "/img/icon/groups32.png", "smallIconUrl": "/img/icon/groups16.png" },

Files use the following icons: "motif": { "color": "1797C0", "largeIconUrl": "/img/content/content64.png", "mediumIconUrl": "/img/content/content32.png", "smallIconUrl": "/img/icon/files16.png", "svgIconUrl": null },

Note: To view the icons in the previous examples, preface the URL with https://instance_name. For example, https://instance_name/img/icon/profile64.png. Property

Type

Description

Filter Group Available and Version Version

color

String

A hex value representing the base color of the record type, or null.

Small, 29.0

29.0

largeIconUrl

String

A large icon indicating the record type.

Small, 29.0

27.0

A medium icon indicating the record type.

Small, 29.0

27.0

mediumIconUrl String

804

Chatter REST API Developer Guide

Mute Capability

Property

Type

Description

Filter Group Available and Version Version

smallIconUrl

String

A small icon indicating the record type.

Small, 29.0

27.0

svgIconUrl

String

An icon in SVG format indicating the record type, or null if the icon doesn’t exist.

Small, 34.0

34.0

SEE ALSO: Article Summary Banner Capability File Summary Files Connect Repository Folder Group Detail Non-Entity Recommendation Recommended Object Record Summary Related Feed Post Repository Folder Summary Record View Related Question Repository File Summary User Detail User Summary

Mute Capability If a feed element has this capability, users can mute it. Muted feed elements are visible in the muted feed, and invisible in all other feeds that respect mute. Property Name

Type

Description

Filter Group and Version

isMutedByMe

Boolean

Indicates whether the context user muted Small, 35.0 the feed element.

SEE ALSO: Feed Element Capabilities

New User Audience Criteria The criteria for the new members type of recommendation audience.

805

Available Version 35.0

Chatter REST API Developer Guide

Non-Entity Recommendation

Property Name

Type

Description

Filter Group and Version

Available Version

maxDays InCommunity

Double

The maximum number of days since a user Small, 36.0 became a community member.

36.0

type

String

MaxDaysInCommunity

Small, 36.0

36.0

SEE ALSO: Recommendation Audience

Non-Entity Recommendation Represents a recommendation for a non-Salesforce entity, such as an application. This response body isn’t available in version 34.0 and later. In version 34.0 and later, the Recommendation response body is used for all recommendations. Property Name

Type

Description

Filter Group and Version

Available Version

displayLabel

String

Localized label of the non-entity object.

Small, 32.0

32.0

explanation

Explanation Summary

The recommendation explanation.

Big, 29.0

23.0

motif

Motif

Motif for the non-entity object.

Small, 32.0

32.0

Specifies the type of record being recommended.

Small, 32.0

32.0

recommendationType String

• apps • articles • files • groups • records • topics • users

Notification Member A notification member. Property Name

Type

Description

Filter Group and Version

Available Version

notification Frequency

String

Specifies the frequency with which a user receives email. In version 38.0 and later, EachPost is the only valid value.

Small, 38.0

38.0

806

Chatter REST API Developer Guide

OAuth User

Property Name

Type

Description

Filter Group and Version

Available Version

url

String

URL for the notification member.

Small, 38.0

38.0

Description

Filter Group and Version

Available Version

availableExternal OAuth Provider EmailService

The available OAuth service provider.

Small, 37.0

37.0

isAuthenticated Boolean

Specifies whether the user is authenticated Small, 37.0 (true) or not (false).

37.0

Description

Filter Group and Version

Available Version

The URL used for authorization.

Small, 37.0

37.0

The name of the OAuth service provider.

Small, 37.0

37.0

OAuth User Information about a user’s OAuth status. Property Name

Type

OAuth Provider The provider of the OAuth service. Property Name

Type

authorizationUrl String name

String

SEE ALSO: OAuth User

Organization Property

Type

accessTimeout Integer

Description

Filter Group Available and Version Version

Amount of time after which the system prompts users Small, 29.0 who have been inactive to log out or continue working

24.0

Information about features available in the organization Small, 29.0 or community

24.0

Information about a list of upcoming scheduled maintenances for the organization.

Medium, 34.0

34.0

Information[] name

String

Organization name

Small, 29.0

26.0

orgId

String

18-character ID for the organization

Small, 29.0

24.0

features

Features

maintenanceInfo Maintenance

807

Chatter REST API Developer Guide

Origin Capability

Property

Type

Description

Filter Group Available and Version Version

userSettings

User Settings

Information about the organization permissions for the Small, 29.0 user

24.0

Origin Capability If a feed element has this capability, it was created by a feed action. Property Name

Type

Description

Filter Group and Version

Available Version

actor

User Summary

The user who executed the feed action.

Small, 33.0

33.0

originRecord

Reference

A reference to the feed element containing Small, 33.0 the feed action.

33.0

SEE ALSO: Feed Element Capabilities

Out of Office User's out-of-office message. Property Name

Type

Description

Filter Group and Version

Available Version

message

String

Out-of-office message for the user.

Small, 40.0

40.0

SEE ALSO: User Summary Mention Completion

Phone Number A phone number. Property

Type

Description

Filter Group and Name

Available Version

label

String

Localized string indicating the phone type

Small, 30.0

30.0

number

String

NA

23.0–26.0

Note: This property is not available after version 26.0. Use the phoneNumber property instead. Phone number

808

Chatter REST API Developer Guide

Photo

Property

Type

Description

Filter Group and Name

Available Version

phoneNumber

String

Phone number

Small, 29.0

27.0

phoneType

String

Phone type. One of these values:

Small, 30.0

30.0

Small, 29.0

23.0–29.0

• Fax • Mobile • Work These values are not localized. type

String

Note: This property is not available after version 29.0. Use the phoneType property instead. Values are: • Fax • Mobile • Work

SEE ALSO: Datacloud Company Datacloud Contact User Detail

Photo Property

Type

Description

Filter Group Available and Version Version

fullEmailPhotoUrl String

A temporary URL to the large profile picture that expires Medium, 29.0 after 30 days. This URL is available to unauthenticated users.

27.0

largePhotoUrl String

URL to the large profile picture. The default width is 200 Medium, 29.0 pixels, while the length is scaled so the original image proportions are maintained.

23.0

mediumPhotoUrl String

URL to the medium profile picture. The default width is 160 pixels, and the height is scaled so the original image proportions are maintained.

Small, 37.0

37.0

photoVersionId String

18-character ID to that version of the photo.

Small, 29.0

24.0

smallPhotoUrl String

URL to the small profile picture. The default size is 64x64 Small, 29.0 pixels.

23.0

809

Chatter REST API Developer Guide

Property

Type

Pin Capability (Beta)

Description

Filter Group Available and Version Version

standardEmail String PhotoUrl

A temporary URL to the small profile picture that expires Small, 29.0 after 30 days. This URL is available to unauthenticated users.

27.0

String

URL to a resource that returns a Photo response body: Small, 29.0 for example, /services/data/v41.0 /chatter/users/005D0000001LL8OIAW/photo.

27.0

url

SEE ALSO: Group Detail Recommendation Definition User Detail User Summary

Pin Capability (Beta) If a feed element has this capability, users who have permission can pin it to a feed. Note: This release contains a beta version of pinned posts, which means it’s a high-quality feature with known limitations. Post pinning isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features. You can provide feedback and suggestions for pinned posts in the Trailblazer Community. Property Name

Type

Description

Filter Group and Version

Available Version

isPinnableByMe Boolean

Specifies whether the context user can pin Small, 41.0 or unpin the entity to the feed (true) or not (false).

41.0

Boolean

Specifies whether the entity is pinned Small, 41.0 (true) or not pinned (false) to the feed.

41.0

isPinned

SEE ALSO: Feed Element Capabilities

Pinned Feed Element Collection (Beta) Collection of pinned feed elements. Note: This release contains a beta version of pinned posts, which means it’s a high-quality feature with known limitations. Post pinning isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions

810

Chatter REST API Developer Guide

Platform Action

only on the basis of generally available products and features. You can provide feedback and suggestions for pinned posts in the Trailblazer Community. Property Name

Type

Description

Filter Group and Version

Available Version

elements

Feed Item[]

Collection of pinned feed elements.

Small, 41.0

41.0

or Generic Feed Element[]

Platform Action A platform action instance with state information for the context user. Action links are one type of platform action and are therefore represented as platform action response bodies. Property Name

Type

Description

Filter Group and Version

actionUrl

String

For action links of subtype Ui or Medium, 33.0 Download, direct the user to download or visit the UI from this link. Salesforce issues a Javascript redirect for the link in this format:

Available Version 33.0

/action-link-redirect/communityId/ actionLinkId?_bearer=bearerToken.

For Api and ApiAsync action links and for all platform actions, this value is null. Salesforce handles the callout to Api or and ApiAsync action links. To call an Api or an ApiAsync action link, you can also make a PATCH request to the /connect/action-links/actionLinkId resource and set status to PendingStatus. apiName

String

The API name. This value may be null.

Medium, 33.0

33.0

confirmation Message

String

If this action requires a confirmation and has Medium, 33.0 a status of NewStatus, this is a default localized message that should be shown to an end user prior to invoking the action. Otherwise, this is null.

33.0

created Records

Record Summary[]

The collection of records that this action Medium, 33.0 created after it was invoked by the context

33.0

811

Chatter REST API Developer Guide

Property Name

Type

Platform Action

Description

Filter Group and Version

Available Version

user. This collection is empty if the action hasn’t been performed yet by the context user or if the action doesn’t create a record. Only records created by the context user are shown. executingUser User Summary

groupDefault

Boolean

User who initiated execution of the platform Medium, 33.0 action.

33.0

true if this platform action is the default

33.0

Small, 33.0

or primary platform action in the platform action group; false otherwise. There can be only one default platform action per platform action group. iconUrl

String

The URL of the icon for the platform action. Medium, 33.0 This value may be null.

33.0

id

String

The ID of the platform action.

Small, 33.0

33.0

If the type is QuickAction and the subtype is Create, this value is null. label

String

The localized label for this platform action. Small, 33.0

33.0

modifiedDate

Date

ISO8601 date string, for example, 2011-02-25T18:24:31.000Z

Small, 33.0

33.0

A reference to the platform action group containing this platform action.

Small, 33.0

33.0

The execution status of the platform action. Small, 33.0 Values are:

33.0

platformAction Reference Group status

String

• FailedStatus—The action link execution failed. • NewStatus—The action link is ready to be executed. Available for Download and Ui action links only. • PendingStatus—The action link is executing. Choosing this value triggers the API call for Api and ApiAsync action links. • SuccessfulStatus—The action link executed successfully. For action links only, you can update the status by making a PATCH request to the /connect/action-links/actionLinksId

resource.

812

Chatter REST API Developer Guide

Platform Action

Property Name

Type

Description

Filter Group and Version

subtype

String

The subtype of a platform action or null. Small, 33.0

Available Version 33.0

If the type property is ActionLink, possible values are: • Api—The action link calls a synchronous API at the action URL. Salesforce sets the status to SuccessfulStatus or FailedStatus based on the HTTP status code returned by your server. • ApiAsync—The action link calls an asynchronous API at the action URL. The action remains in a PendingStatus state until a third party makes a request to /connect/action-links/actionLinkId

to set the status to SuccessfulStatus or FailedStatus when the

asynchronous operation is complete. • Download—The action link downloads a file from the action URL. • Ui—The action link takes the user to a web page at the action URL. type

String

The type of platform action. Values are: • ActionLink—An indicator on a feed element that targets an API, a web page, or a file, represented by a button in the Salesforce Chatter feed UI. • CustomButton—When clicked, opens a URL or a Visualforce page in a window or executes JavaScript. • InvocableAction • ProductivityAction—Productivity actions are predefined by Salesforce and are attached to a limited set of objects. You can’t edit or delete productivity actions. • QuickAction—A global or object-specific action. • StandardButton—A predefined Salesforce button such as New, Edit, and Delete.

813

Small, 33.0

33.0

Chatter REST API Developer Guide

Platform Action Group

Property Name

Type

Description

Filter Group and Version

Available Version

url

String

Chatter REST API resource URL for the platform action.

Small, 33.0

33.0

If the type is QuickAction and the subtype is Create, this value is null.

SEE ALSO: Platform Action Group

Platform Action Group A platform action group instance with state appropriate for the context user. Action link groups are one type of platform action group and are therefore represented as platform action group response bodies. Property Name

Type

Description

Filter Group and Version

category

String

Indicates the priority and relative locations Medium, 33.0 of platform actions. Values are:

Available Version 33.0

• Primary—The action link group is displayed in the body of the feed element. • Overflow—The action link group is displayed in the overflow menu of the feed element. id

String

An 18-character ID or an opaque string ID for the platform action group.

Small, 33.0

33.0

Small, 33.0

33.0

If the Platform Action type is QuickAction and the subtype is Create, this value is null. modifiedDate

Date

platformActions Platform Action[]

ISO8601 date string, for example, 2011-02-25T18:24:31.000Z.

The platform action instances for this group. Medium, 33.0 Within an action link group, action links are displayed in the order listed in the actionLinks property of the Action Link Group Definition Input request body. Within a feed item, action link groups are displayed in the order specified in the actionLinkGroupIds property of

814

33.0

Chatter REST API Developer Guide

Property Name

Type

Poll Capability

Description

Filter Group and Version

Available Version

Small, 33.0

33.0

the Associated Actions Capability Input request body. url

String

Chatter REST API resource URL for the platform action group. If the Platform Action type is QuickAction and the subtype is Create, this value is null.

SEE ALSO: Associated Actions Capability

Poll Capability If a feed element has this capability, the feed element can include a poll for voting. Property Name

Type

Description

choices

Feed Poll Choice[]

Collection of poll choices that make up the Small, 32.0 poll.

32.0

myChoiceId

String

18-character ID of the poll choice that the context user has voted for in this poll. Returns null if the context user has not voted.

Small, 32.0

32.0

Total number of votes cast on the feed poll Small, 32.0 element.

32.0

totalVoteCount String

Filter and Version Available Version

SEE ALSO: Feed Element Capabilities

Question and Answers Capability If a feed element has this capability, it has a question and comments on the feed element are answers to the question. Property Name

Type

Description

Filter and Version Available Version

bestAnswer

Comment

Comment selected as the best answer for the question.

Small, 32.0

32.0

bestAnswer SelectedBy

User Summary

User who selected the best answer for the Small, 32.0 question.

32.0

815

Chatter REST API Developer Guide

Property Name

Type

Question and Answers Suggestion Collection

Description

Filter and Version Available Version

canCurrent Boolean UserSelectOr RemoveBestAnswer

Indicates whether the context user can select or remove a best answer (true) or not (false).

Small, 32.0

32.0

candidateAnswers Candidate Answers

Status of candidate answers for the question.

Small, 41.0

41.0

Status escalatedCase Reference

If a question post is escalated, this is the case Medium, 33.0 to which it was escalated.

33.0

questionTitle String

Title for the question.

Small, 32.0

32.0

SEE ALSO: Feed Element Capabilities

Question and Answers Suggestion Collection Question and answers suggestions search result. Property Name

Type

Description

Filter Group and Version

Available Version

articles

Article Item[]

Collection of articles.

Small, 32.0

32.0

Collection of questions, which can be any of these:

Small, 32.0

32.0

Description

Filter Group and Version

Available Version

When the user last read the feed element.

Small, 40.0

40.0

Information about the user who read the feed element.

Small, 40.0

40.0

questions

• Generic Feed Element • Feed Item

Read By Information about who read the feed element and when. Property Name

Type

lastReadDateByUser Date user

User Summary

SEE ALSO: Read By Collection

816

Chatter REST API Developer Guide

Read By Capability

Read By Capability If a feed element has this capability, the context user can mark it as read. Property Name

Type

Description

Filter Group and Version

Available Version

isReadByMe

Boolean

Specifies whether the feed element has been read (true) or not (false) by the context user.

Small, 40.0

40.0

Last date when the feed element was Small, 40.0 marked read for the context user. Otherwise, null.

40.0

First page of information about who read the feed element and when.

Big, 40.0

40.0

Description

Filter Group and Version

Available Version

currentPageToken String

Token identifying the current page.

Medium, 40.0

40.0

currentPageUrl String

Chatter REST API URL identifying the current Medium, 40.0 page. The default is 25 items per page.

40.0

Collection of read-by information, including Big, 40.0 users and when they last read the feed element.

40.0

nextPageToken String

Token identifying the next page, or null Small, 40.0 if there isn’t a next page.

40.0

String

Chatter REST API URL identifying the next Small, 40.0 page, or null if there isn’t a next page. Check whether this value is null before getting another page. If a page doesn’t exist, a

40.0

lastReadDateByMe Date

page

Read By Collection

SEE ALSO: Feed Element Capabilities

Read By Collection A collection of information about who read the feed element and when. Property Name

items

nextPageUrl

Type

Read By[]

ConnectApi.NotFoundException

error is returned. previousPageToken String

Reserved for future use.

Medium, 40.0

40.0

previousPageUrl String

Reserved for future use.

Medium, 40.0

40.0

817

Chatter REST API Developer Guide

Recommendation

Property Name

Type

Description

Filter Group and Version

Available Version

total

Integer

Total number of users who read the feed element.

Small, 40.0

40.0

SEE ALSO: Read By Capability

Recommendation Represents a recommendation. Property

Type

Description

Filter Group Available and Version Version

actOnUrl

String

For user, file, group, topic, and record entity types, Small, 29.0 use this Chatter REST URL with a POST request to follow the recommended user, file, topic, or record, or join the recommended group. For example:

23.0

/services/data/v41.0/chatter/users /005D0000001AzOAIA0/following ?subjectId=005D0000001B4CvIAK

For recommended object entity types, such as custom recommendations, use the actionUrl property of the Platform Action response body to take action on the recommendation. action

String

Specifies the action to take on the recommendation. Values are:

Small, 29.0

• follow (V23.0) • join (V23.0) • view (V25.0) entity

Article Summary (version 37.0 and later)

The entity with which the receiver is recommended to Small, 32.0 take action.

File Summary Group Recommended Object (version 34.0 and later) Record Summary Topic (version 36.0 and later)

818

32.0

Chatter REST API Developer Guide

Property

Type

Recommendation Audience

Description

Filter Group Available and Version Version

Big, 29.0

User Summary explanation

Explanation Summary

The recommendation explanation.

object

File Summary

The object with which the receiver is recommended to Small, 29.0 take action.

Group User Summary Platform Action Group

recommendation String Type

23.0-31.0

Important: In version 32.0 and later, use the entity property.

Record Summary

platform ActionGroup

23.0

A platform action group instance with state appropriate Small, 34.0 for the context user.

34.0

Specifies the type of record being recommended.

32.0

Small, 32.0

• apps • articles • files • groups • records • topics • users

type

String

Not available after version 23.0.

url

String

URL to the recommendation.

23.0 -23.0 Small, 34.0

34.0

SEE ALSO: Recommendations Recommendations Capability

Recommendation Audience A recommendation audience. Property Name

Type

Description

Filter Group and Version

Available Version

criteria

Custom List Audience Criteria

The criteria for the recommendation audience type.

Small, 36.0

36.0

or New User Audience Criteria

819

Chatter REST API Developer Guide

Recommendation Audience Collection

Property Name

Type

Description

Filter Group and Version

Available Version

id

String

18-character ID of the recommendation audience.

Small, 35.0

35.0

memberCount

Integer

Small, 35.0

35.0 only

Big, 35.0

35.0 only

Important: This property is available only in version 35.0. In version 36.0 and later, this property is available in Custom List Audience Criteria. Number of members in the recommendation audience.

members

User Reference Collection

Important: This property is available only in version 35.0. In version 36.0 and later, this property is available in Custom List Audience Criteria. Members of the recommendation audience.

modifiedBy

User Detail

User who last modified the recommendation audience.

Small, 36.0

36.0

modifiedDate

Date

An ISO 8601 format date string, for example, Small, 36.0 2011-02-25T18:24:31.000Z.

36.0

name

String

Name of the recommendation audience.

Small, 35.0

35.0

url

String

URL for the recommendation audience.

Small, 35.0

35.0

Description

Filter Group and Version

Available Version

audienceCount Integer

The total number of recommendation audiences.

Small, 35.0

35.0

currentPageUrl String

URL to the current page.

Small, 35.0

35.0

URL to the next page.

Small, 35.0

35.0

URL to the previous page.

Small, 35.0

35.0

SEE ALSO: Recommendation Audience Collection

Recommendation Audience Collection A collection of recommendation audiences. Property Name

nextPageUrl

Type

String

previousPageUrl String

820

Chatter REST API Developer Guide

Property Name

Type

recommendation Recommendation Audience[] Audiences

Recommendation Definition

Description

Filter Group and Version

A collection of recommendation audiences. Small, 35.0

Available Version 35.0

Recommendation Definition Represents a custom recommendation definition. Property Name

Type

Description

Filter Group and Version

Available Version

actionUrl

String

The URL for acting on this recommendation. Small, 33.0

33.0

actionUrlName String

The text label for the action URL in the user Small, 34.0 interface.

34.0

explanation

String

Explanation of the recommendation definition.

Medium, 33.0

33.0

id

String

18-character ID of the recommendation definition.

Small, 33.0

33.0

name

String

Name of the recommendation definition. The name is displayed in Setup.

Medium, 33.0

33.0

photo

Photo

Photo of the recommendation definition.

Medium, 33.0

33.0

title

String

Title of the recommendation definition.

Small, 33.0

33.0

url

String

URL to the Chatter REST API resource for the Small, 33.0 recommendation definition.

33.0

SEE ALSO: Recommendation Definition Collection Scheduled Recommendation

Recommendation Definition Collection Represents a list of recommendation definitions. Property Name

Type

recommendation Recommendation Definition[] Definitions url

String

Description

Filter Group and Version

Available Version

A list of recommendation definitions.

Small, 33.0

33.0

URL to the Chatter REST API resource for the Small, 33.0 recommendation definition collection.

33.0

821

Chatter REST API Developer Guide

Recommendations

Recommendations A list of recommendations. Property Name

Type

Description

Filter Group and Version

Available Version

recommendations

Recommendation[]

Collection of recommendations.

Small, 29.0

23.0

Recommendations Capability If a feed element has this capability, it has a recommendation. Property Name

Type

Description

items

A collection of these A collection of recommendations. response bodies:

Filter Group and Version

Available Version

Small, 32.0

32.0

Filter Group and Version

Available Version

• Non-Entity Recommendation This response body isn’t available in version 34.0 and later. In version 34.0 and later, the Recommendation response body is used for all recommendations. • Recommendation

SEE ALSO: Feed Element Capabilities

Recommended Object An object that is recommended, such as a custom or static recommendation. Property Name

Type

Description

idOrEnum

String

ID of a recommendation definition for a Small, 34.0 custom recommendation or the enum value Today for static recommendations that don’t have an ID (version 35.0 and later).

822

34.0

Chatter REST API Developer Guide

Record Field

Property Name

Type

Description

Filter Group and Version

Available Version

motif

Motif

Motif of the recommended object.

Small, 34.0

34.0

name

String

Name of the recommended object.

Small, 29.0

22.0

type

String

RecommendedObject

Small, 29.0

22.0

Record Field A generic record field containing a label and text value. Property

Type

Description

Filter Group Available and Version Version

label

String

A localized string describing the record field.

Small, 29.0

29.0

text

String

The text value of the record field. All record fields have Small, 29.0 a text value. To ensure that all clients can consume new content, inspect the record field’s type property. If it isn’t recognized, render the text value as the default case.

29.0

type

String

Valid values are:

29.0

Small, 29.0

• Boolean • Email • Number • Phone • Text

Record Field: Blank A record field displayed as a place holder in a grid of fields. Property

Type

Description

Filter Group Available and Version Version

type

String

Blank

Small, 29.0

Record Field: Compound A record field that is a composite of subfields.

823

29.0

Chatter REST API Developer Guide

Property

Type

Record Field: Currency

Description

Filter Group Available and Version Version

A collection of subfields that make up the compound Big, 29.0 field. A collection of these response bodies:

fields

29.0

• Record Field • Record Field: Blank • Record Field: Compound • Record Field: Currency • Record Field: Date • Record Field: Percent • Record Field: Picklist • Record Field: Reference • Record Field: Reference with Date label

String

A localized string describing the record field.

Small, 29.0

29.0

text

String

The text value of the record field. All record fields have Small, 29.0 a text value. To ensure that all clients can consume new content, inspect the record field’s type property. If it isn’t recognized, render the text value as the default case.

29.0

type

String

Valid values are:

29.0

Small, 29.0

• Address • Compound • Location • Name

Record Field: Currency A record field containing a currency value. Property

Type

Description

Filter Group Available and Version Version

label

String

A localized string describing the record field.

Small, 29.0

29.0

text

String

The text value of the record field. All record fields have Small, 29.0 a text value. To ensure that all clients can consume new content, inspect the record field’s type property. If it isn’t recognized, render the text value as the default case.

29.0

Currency is formatted in the default currency of the organization.

824

Chatter REST API Developer Guide

Record Field: Date

Property

Type

Description

Filter Group Available and Version Version

type

String

Currency

Small, 29.0

29.0

Record Field: Date A record field containing a date. Property

Type

Description

Filter Group Available and Version Version

dateValue

Date

A date that a machine can read.

Medium, 29.0

29.0

label

String

A localized string describing the record field.

Small, 29.0

29.0

text

String

The text value of the record field. All record fields have Small, 29.0 a text value. To ensure that all clients can consume new content, inspect the record field’s type property. If it isn’t recognized, render the text value as the default case.

29.0

type

String

Valid values are:

29.0

Small, 29.0

• Date • DateTime • Time

Record Field: Percent A record field containing a percentage value. Property

Type

Description

Filter Group Available and Version Version

value

Double

The value of the percentage.

Medium, 29.0

29.0

label

String

A localized string describing the record field.

Small, 29.0

29.0

text

String

The text value of the record field. All record fields have Small, 29.0 a text value. To ensure that all clients can consume new content, inspect the record field’s type property. If it isn’t recognized, render the text value as the default case.

29.0

type

String

Percent

Small, 29.0

29.0

Record Field: Picklist A record field containing an enumerated value.

825

Chatter REST API Developer Guide

Record Field: Reference

Property

Type

Description

Filter Group Available and Version Version

label

String

A localized string describing the record field.

Small, 29.0

29.0

text

String

The text value of the record field. All record fields have Small, 29.0 a text value. To ensure that all clients can consume new content, inspect the record field’s type property. If it isn’t recognized, render the text value as the default case.

29.0

type

String

Picklist

Small, 29.0

29.0

Record Field: Reference A record field containing a reference to another object. Property

Type

Description

Filter Group Available and Version Version

label

String

A localized string describing the record field.

Small, 29.0

29.0

reference

Reference

The object referenced by the record field.

Medium, 29.0

29.0

text

String

The text value of the record field. All record fields have Small, 29.0 a text value. To ensure that all clients can consume new content, inspect the record field’s type property. If it isn’t recognized, render the text value as the default case.

29.0

type

String

Reference

Small, 29.0

29.0

Record Field: Reference with Date A record field containing a referenced object that acted at a specific time, for example, “Created By...”. Property

Type

Description

Filter Group Available and Version Version

dateValue

Date

A time at which the referenced object acted.

Medium, 29.0

29.0

label

String

A localized string describing the record field.

Small, 29.0

29.0

reference

Reference

The object referenced by the record field.

Medium, 29.0

29.0

text

String

The text value of the record field. All record fields have Small, 29.0 a text value. To ensure that all clients can consume new content, inspect the record field’s type property. If it isn’t recognized, render the text value as the default case.

826

29.0

Chatter REST API Developer Guide

Record Snapshot Capability

Property

Type

Description

Filter Group Available and Version Version

type

String

Valid values are:

Small, 29.0

29.0

• CreatedBy • LastModifiedBy

Record Snapshot Capability If a feed element has this capability, it contains all the snapshotted fields of a record for a single create record event. Property Name

Type

Description

Filter Group and Version

Available Version

recordView

Record View

A record representation that includes metadata and data so you can display the record easily.

Small, 32.0

32.0

SEE ALSO: Feed Element Capabilities

Record Summary Property

Type

Description

Filter Group Available and Version Version

entityLabel

Entity Label

Label of the record’s entity.

Small, 40.0

40.0

id

String

18-character ID of the record.

Small, 29.0

23.0

motif

Motif

Small, medium, and large icons indicating the tab style Small, 29.0 of the record. The motif can also contain the record type’s base color.

27.0

If the context user is following this record, contains Medium, 29.0 information about the subscription; otherwise returns null.

24.0

mySubscription Reference

name

String

The localized name.

Small, 29.0

23.0

type

String

Type of record, such as CustomObject or ContentDocument.

Small, 29.0

23.0

827

Chatter REST API Developer Guide

Record Summary List

Property

Type

Description

Filter Group Available and Version Version

url

String

Relative URL to this record.

Small, 29.0

23.0

SEE ALSO: Email Address Email Attachment Platform Action Record Summary List

Record Summary List Summary information about a collection of records in the organization, including custom objects. Property

Type

Description

Filter Group Available and Version Version

A collection of records. The collection can contain any Small, 30.0 of these response bodies:

records

30.0

• File Summary • Group • Record Summary • User Summary url

String

The URL to this collection of records.

Small, 30.0

30.0

Record View A view of any record in the organization, including a custom object record. This object is used if a specialized object, such as User or ChatterGroup, is not available for the record type. Contains data and metadata so you can render a record with one response. Property

Type

Description

Filter Available Group and Version Version

id

String

18-character ID of the object

Small, 29.0

23.0

motif

Motif

Small, medium, and large icons indicating the type Small, 29.0 of the object. The motif can also contain the object’s base color.

27.0

The icon is not a preview of the file. mySubscription Reference

If the context user is following this file, this contains information about the subscription, otherwise returns null.

828

Medium, 29.0 23.0

Chatter REST API Developer Guide

Record View Section

Property

Type

Description

Filter Available Group and Version Version

name

String

The localized name

Small, 29.0

relatedList Definitions

List View Definition[]

The related list definitions (metadata) for this object. These list definitions do not include the related list data.

Medium, 29.0 29.0

sections

Record View Section[]

A list of record view sections.

Small, 29.0

29.0

type

String

A fixed type name for this object. Check this value Small, 29.0 to determine the shape of a response body.

23.0

url

String

The Chatter REST API URL resource for this object. Small, 29.0

23.0

29.0

SEE ALSO: Record Snapshot Capability

Record View Section A section of record fields and values on a record detail. Property

Type

Description

Filter Group Available and Version Version

columnCount

String

The number of columns to use to lay out the fields in a record section.

Small, 29.0

29.0

columnOrder

String

The order of the fields to use in the fields property Small, 29.0 to lay out the fields in a record section.

29.0

• LeftRight—Fields are rendered from left to right. • TopDown—Fields are rendered from the top down. fields

The fields and values for the record contained in this section. A collection of these response bodies: • Record Field • Record Field: Blank • Record Field: Compound • Record Field: Currency • Record Field: Date • Record Field: Percent • Record Field: Picklist • Record Field: Reference • Record Field: Reference with Date

829

Small, 29.0

29.0

Chatter REST API Developer Guide

Reference

Property

Type

Description

heading

String

A localized label to display when rendering this section Small, 29.0 of fields.

29.0

Indicates whether the section can be collapsed to hide Small, 29.0 all the fields (true) or not (false).

29.0

isCollapsible Boolean

Filter Group Available and Version Version

SEE ALSO: Record View

Reference A reference to a record. Property

Type

Description

Filter Group Available and Version Version

id

String

The ID of the record being referenced, which could be Small, 29.0 an 18-character ID or some other string identifier.

23.0

url

String

The URL to the resource endpoint.

23.0

Small, 29.0

Related Feed Post A related feed post Property Name

Type

Description

Filter Group and Version

Available Version

id

String

18-character ID of the related feed post.

Small, 37.0

37.0

motif

Motif

Icon that identifies the related feed post. Small, 37.0 The motif can also contain the object’s base color.

37.0

If the context user is following the item, it Medium, 37.0 contains information about the subscription. Otherwise, it returns null.

37.0

mySubscriptions Reference

name

String

Name of the related feed post.

Small, 37.0

37.0

score

Double

Score of the related feed post that indicates Small, 37.0 how closely related it is to the context feed post.

37.0

title

String

Title of the related feed post.

Small, 37.0

37.0

type

String

Value is RelatedQuestion.

Small, 37.0

37.0

830

Chatter REST API Developer Guide

Related Feed Post Collection

Property Name

Type

Description

Filter Group and Version

Available Version

url

String

URL to the related feed post.

Small, 37.0

37.0

Description

Filter Group and Version

Available Version

Collection of related feed posts.

Small, 37.0

37.0

Description

Filter Group and Version

Available Version

Indicates whether the question has a best answer.

Small, 37.0

37.0

SEE ALSO: Related Feed Post Collection

Related Feed Post Collection A collection of related feed posts. Property Name

Type

relatedFeedPosts Related Feed Post[]

or Related Question[]

Related Question A related question Property Name

Type

hasBestAnswer Boolean

id

String

18-character ID of the related question.

Small, 37.0

37.0

interactions

Interactions Capability

The number of individual views, likes, and comments on a question.

Small, 38.0

38.0

motif

Motif

Icon that identifies the related question. The Small, 37.0 motif can also contain the object’s base color.

37.0

If the context user is following the item, it Medium, 37.0 contains information about the subscription. Otherwise, it returns null.

37.0

mySubscriptions Reference

name

String

Name of the related question.

Small, 37.0

37.0

score

Double

Score of the related feed post that indicates Small, 37.0 how closely related it is to the context feed post.

37.0

title

String

Title of the related feed post.

37.0

831

Small, 37.0

Chatter REST API Developer Guide

Repository Directory Entry Collection

Property Name

Type

Description

Filter Group and Version

Available Version

type

String

Value is RelatedQuestion.

Small, 37.0

37.0

url

String

URL to the related question.

Small, 37.0

37.0

Description

Filter Group and Version

Available Version

Collection of directory entries.

Small, 35.0

35.0

SEE ALSO: Related Feed Post Collection

Repository Directory Entry Collection A collection of directory entries. Property Name

Type

directoryEntries Repository Group

Summary[] Repository User Summary[]

Repository File Detail Detailed description of a repository file. The repository file detail response body includes all of the of the Repository File Summary response body.

Repository File Summary Description of a repository file. Property Name

Type

checkinComment String

Description

Filter Group and Version

Available Version

The checkin comment of the file.

Small, 32.0

32.0

contentSize

Integer

Length in bytes of the content of the file.

Small, 32.0

32.0

createdBy

String

Name of user who created the file.

Small, 32.0

32.0

createdDate

Date

Created date of the file.

Small, 32.0

32.0

description

String

File description.

Small, 32.0

32.0

downloadUrl

String

URL to the repository file content.

Small, 32.0

32.0

external ContentUrl

String

URL of this file’s content in the external system.

Small, 32.0

32.0

832

Chatter REST API Developer Guide

Repository Folder Detail

Property Name

Type

Description

Filter Group and Version

Available Version

external DocumentUrl

String

URL of this file in the external system.

Small, 32.0

32.0

external External File FilePermission Permission Information Information

External file permission information, such Big, 36.0 as available groups, available permission types, and current sharing status, or null when

36.0

includeExternalFilePermissionsInfo is false. id

String

ID of the file.

Small, 32.0

32.0

itemTypeUrl

String

URL to the item type information.

Small, 35.0

35.0

mimeType

String

Mime type of the file.

Small, 32.0

32.0

modifiedBy

String

Name of user who last modified the file.

Small, 32.0

32.0

modifiedDate

Date

Modified date of the file.

Small, 32.0

32.0

motif

Motif

Motif of the file.

Small, 32.0

32.0

name

String

Name of the file.

Small, 32.0

32.0

previewUrl Thumbnail

String

URL to the thumbnail (240 x 180 PNG) preview.

Small, 36.0

36.0

previewUrl ThumbnailBig

String

URL to the big thumbnail (720 x 480 PNG) preview.

Small, 36.0

36.0

previewUrl String ThumbnailTiny

URL to the tiny thumbnail (120 x 90 PNG) preview.

Small, 36.0

36.0

previewsUrl

String

URL to the previews.

Small, 36.0

36.0

repository

Reference

The file external repository.

Small, 32.0

32.0

title

String

Title of the file.

Small, 32.0

32.0

type

String

Record type, file.

Small, 32.0

32.0

url

String

Chatter REST API URL for this file.

Small, 32.0

32.0

versionId

String

ID of the file version in the external system. Small, 32.0

32.0

SEE ALSO: Repository Folder Item

Repository Folder Detail Details of a repository folder.

833

Chatter REST API Developer Guide

Repository Folder Item

Property Name

Type

Description

Filter Group and Version

Available Version

createdBy

String

Name of user who created the folder.

Small, 32.0

32.0

createdDate

Date

Created date of the folder.

Small, 32.0

32.0

description

String

Folder description.

Small, 32.0

32.0

externalFolderUrl String

Chatter REST API URL for this folder in the external system.

Small, 32.0

32.0

folderItemsUrl String

Chatter REST API URL that lists the files and Small, 32.0 folders in this folder.

32.0

id

String

ID of the folder.

Small, 32.0

32.0

itemTypeUrl

String

URL to the item type information.

Small, 35.0

35.0

modifiedBy

String

Name of user who last modified the folder. Small, 32.0

32.0

modifiedDate

Date

Last modified date of the folder.

Small, 32.0

32.0

motif

Motif

Motif of the folder.

Small, 32.0

32.0

name

String

Name of the folder.

Small, 32.0

32.0

path

String

The absolute path of the folder in the external system.

Small, 32.0

32.0

repository

Reference

The folder external repository.

Small, 32.0

32.0

type

String

Record type, folder.

Small, 32.0

32.0

url

String

Chatter REST API URL for this folder.

Small, 32.0

32.0

Filter Group and Version

Available Version

Repository Folder Item Description of a folder item. Property Name

Type

Description

file

Repository File Summary

If the folder item is a file, the file summary. Small, 32.0 If the folder item is a folder, null.

32.0

folder

Repository Folder Summary

If the folder item is a folder, the folder Small, 32.0 summary. If the folder item is a file, null.

32.0

type

String

The type of folder item: folder or file. Small, 32.0

32.0

SEE ALSO: Repository Folder Items Collection

834

Chatter REST API Developer Guide

Repository Folder Items Collection

Repository Folder Items Collection A collection of repository folder items. Property Name

Type

currentPageUrl String

Description

Filter Group and Version

Available Version

Chatter REST API URL identifying the current Medium, 32.0 page.

32.0

items

Repository Folder Item[]

Collection of items in a repository folder.

Small, 32.0

32.0

nextPageUrl

String

Chatter REST API URL identifying the next Small, 32.0 page, or null if there isn’t a next page. Check whether this value is null before getting another page. If a page doesn’t exist, a

32.0

ConnectApi.NotFoundException

error is returned. previousPageUrl String

Chatter REST API URL identifying the previous page, or null if there isn’t a previous page.

Medium, 32.0

32.0

Repository Folder Summary Summary of a repository folder. Property Name

Type

Description

Filter Group and Version

Available Version

createdBy

String

Name of user who created the folder.

Small, 32.0

32.0

createdDate

Date

Created date of the folder.

Small, 32.0

32.0

description

String

Folder description.

Small, 32.0

32.0

externalFolderUrl String

Chatter REST API URL for this folder in the external system.

Small, 32.0

32.0

folderItemsUrl String

Chatter REST API URL that lists the files and Small, 32.0 folders in this folder.

32.0

id

String

ID of the folder.

Small, 32.0

32.0

itemTypeUrl

String

URL to the item type information.

Small, 35.0

35.0

modifiedBy

String

Name of user who last modified the folder. Small, 32.0

32.0

modifiedDate

Date

Last modified date of the folder.

Small, 32.0

32.0

motif

Motif

Motif of the folder.

Small, 32.0

32.0

name

String

Name of the folder.

Small, 32.0

32.0

835

Chatter REST API Developer Guide

Repository Group Summary

Property Name

Type

Description

Filter Group and Version

Available Version

path

String

The absolute path of the folder in the external system.

Small, 32.0

32.0

repository

Reference

The folder external repository.

Small, 32.0

32.0

type

String

Record type, folder.

Small, 32.0

32.0

url

String

Chatter REST API URL for this folder.

Small, 32.0

32.0

SEE ALSO: Repository Folder Item

Repository Group Summary Detailed description of a group entry. Property Name

Type

Description

Filter Group and Version

Available Version

domain

String

Domain of the group.

Medium, 35.0

35.0

email

String

Email of the group.

Small, 35.0

35.0

groupType

String

Specifies the type of group. Values are:

Small, 35.0

35.0

• Everybody—Group is public to everybody. • EverybodyInDomain—Group is public to everybody in the same domain. • Unknown—Group type is unknown. id

String

ID of the group.

Small, 35.0

35.0

name

String

Name of the group.

Medium, 35.0

35.0

type

String

The type of entry. Value is GroupEntry. Medium, 35.0

35.0

SEE ALSO: External File Permission Information Files Connect Permission Repository Directory Entry Collection

Repository Permission Type Collection A collection of permission types.

836

Chatter REST API Developer Guide

Property Name

Type

permissionTypes Files Connect

Repository User Summary

Description

Filter Group and Version

Available Version

Collection of permission types.

Small, 35.0

35.0

Permission Type[]

Repository User Summary Detailed description of a user entry. Property Name

Type

Description

Filter Group and Version

Available Version

domain

String

Domain of the user.

Medium, 35.0

35.0

email

String

Email of the user.

Small, 35.0

35.0

firstName

String

First name of the user.

Medium, 35.0

35.0

id

String

ID of the user.

Small, 35.0

35.0

lastName

String

Last name of the user.

Medium, 35.0

35.0

type

String

The type of entry. Value is UserEntry.

Medium, 35.0

35.0

Description

Filter Group and Version

Available Version

reputationLevel Reputation Level

User’s reputation level.

Small, 32.0

32.0

reputationPoints Double

User's reputation points, which can be Small, 32.0 earned by performing different activities in the community.

32.0

A Chatter REST API URL to the reputation.

32.0

SEE ALSO: Files Connect Permission Repository Directory Entry Collection

Reputation Reputation for a user. Property Name

url

Type

String

SEE ALSO: User Detail User Summary

837

Small, 32.0

Chatter REST API Developer Guide

Reputation Level

Reputation Level Reputation level for a user. Property Name

Type

levelImageUrl String

Description

Filter Group and Version

Available Version

URL to the reputation level image.

Small, 32.0

32.0

levelName

String

Name of the reputation level.

Small, 32.0

32.0

levelNumber

Integer

Reputation level number, which is the Small, 32.0 numerical rank of the level, with the lowest level at 1. Administrators define the reputation level point ranges.

32.0

SEE ALSO: Reputation

Request Header An HTTP request header name and value pair. Property Name

Type

Description

Filter Group and Version

Available Version

name

String

The name of the request header.

Small, 33.0

33.0

value

String

The value of the request header.

Small, 33.0

33.0

Filter Group and Version

Available Version

SEE ALSO: Action Link Definition

Scheduled Recommendation Represents a scheduled recommendation. Property Name

Type

Description

channel

String

Specifies a way to tie recommendations Small, 36.0 together, for example, to display recommendations in specific places in the UI or to show recommendations based on time of day or geographic locations. Values are: • CustomChannel1—Custom recommendation channel. Not used by

838

36.0

Chatter REST API Developer Guide

Property Name

Type

Scheduled Recommendation

Description

Filter Group and Version

Available Version

default. Work with your community manager to define custom channels. For example, community managers can use Community Builder to determine where recommendations appear. • CustomChannel2—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • CustomChannel3—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • CustomChannel4—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • CustomChannel5—Custom recommendation channel. Not used by default. Work with your community manager to define custom channels. • DefaultChannel—Default recommendation channel. Recommendations appear by default on the Home and Question Detail pages of Customer Service (Napili) and Partner Central communities. They also appear in the feed in communities in the Salesforce mobile web and anywhere community managers add recommendations using Community Builder. enabled

Boolean

Indicates whether scheduling is enabled. If Small, 34.0 true, the recommendation is enabled and appears in communities. If false, recommendations in feeds in the Salesforce mobile web aren’t removed, but no new recommendations appear. In Customer Service (Napili) and Partner Central communities, disabled recommendations no longer appear.

34.0

id

String

18-character ID of the scheduled recommendation.

33.0

839

Small, 33.0

Chatter REST API Developer Guide

Scheduled Recommendation Collection

Property Name

Type

Description

Filter Group and Version

Available Version

rank

Integer

The rank determining the order of this scheduled recommendation.

Small, 33.0

33.0

recommendation String AudienceId

ID of the audience for the scheduled recommendation.

Small, 35.0

35.0

recommendation Recommendation Definition Definition Representation

Recommendation definition that this scheduled recommendation schedules.

Small, 33.0

33.0

URL to the Chatter REST API resource for the Small, 33.0 scheduled recommendation.

33.0

url

String

SEE ALSO: Scheduled Recommendation Collection

Scheduled Recommendation Collection Represents a list of scheduled recommendations. Property Name

Type

scheduled Scheduled Recommendations Recommendation[] url

String

Description

Filter Group and Version

Available Version

A list of scheduled recommendations.

Small, 33.0

33.0

URL to the Chatter REST API resource for the Small, 33.0 scheduled recommendation collection.

33.0

Share Captured Activity Result Represents the results of sharing a captured email or event. Property Name

Type

Description

Filter Group and Version

success

Boolean

Whether the share operation succeeded or Small, 39.0 not.

840

Available Version 39.0

Chatter REST API Developer Guide

Shares

Shares Property

Type

Description

Filter Group Available and Version Version

entity

Depends on sharing Returns information about the user, record, or group the file is shared with. Value is one of the following:

Small, 29.0

24.0

Small, 29.0

24.0

• Group • Record Summary • User Summary sharingType

String

The permission level of sharing. Values are: • C—collaborator • I—sharing permission is determined by location. This generally occurs when the sharing permission is not set on the file, but on the library instead. This value is also used when the context user is the same as owner of the file. • N—no access • V—viewer

SEE ALSO: File Shares Page

Social Account A social account on a social network. Property Name

Type

externalSocial String AccountId

Description

Filter Group and Version

Available Version

ID of the external social account, if available. Small, 38.0

38.0

handle

String

Social handle, screen name, or alias that identifies this account.

Small, 36.0

36.0

name

String

Name of the account as defined by the account's owner.

Small, 36.0

36.0

profileUrl

String

URL to the account's profile.

Small, 36.0

36.0

841

Chatter REST API Developer Guide

Property Name

Type

socialPersonaId String

Social Post Capability

Description

Filter Group and Version

Available Version

ID of the social persona account, if the external social account ID isn’t available.

Small, 39.0

39.0

Filter Group and Version

Available Version

SEE ALSO: Social Post Capability

Social Post Capability If a feed element has this capability, it can interact with a social post on a social network. Property Name

Type

Description

author

Social Account

Social account that authored the social post. Small, 36.0

36.0

content

String

Content body of the social post.

Medium, 36.0

36.0

deletedBy

User Summary

User who deleted the social post.

Small, 38.0

38.0

hiddenBy

User Summary

User who hid the social post.

Small, 41.0

41.0

icon

Icon

Icon of the social network.

Small, 36.0

36.0

id

String

ID associated with the social post Salesforce Small, 36.0 record.

36.0

isOutbound

Boolean

If true, the social post originated from the Small, 36.0 Salesforce application.

36.0

likedBy

String

External social account who liked the social Small, 40.0 post.

40.0

messageType

String

Message type of the social post. Values are: Small, 38.0

38.0

• Comment • Direct • Post • PrivateMessage • Reply • Retweet • Tweet name

String

Title or heading of the social post.

Small, 36.0

36.0

postUrl

String

External URL to the social post on the social Small, 36.0 network.

36.0

842

Chatter REST API Developer Guide

Social Post Capability

Property Name

Type

Description

Filter Group and Version

provider

String

Social network that this social post belongs Small, 36.0 to. Values are:

Available Version 36.0

• Facebook • GooglePlus • Instagram • KakaoTalk • Kik • Klout • Line • LinkedIn • Messenger • Other • Pinterest • QQ • Rypple • SinaWeibo • SMS • Snapchat • Telegram • Twitter • VKontakte • WeChat • WhatsApp • YouTube recipient

Social Account

Social account that is the recipient of the social post.

Small, 36.0

36.0

recipientId

String

ID of the recipient of the social post.

Small, 38.0

38.0

reviewScale

Double

Review scale of the social post.

Small, 40.0

40.0

reviewScore

Double

Review score of the social post.

Small, 40.0

40.0

status

Social Post Status

Status of the social post.

Small, 36.0

36.0

SEE ALSO: Feed Element Capabilities

843

Chatter REST API Developer Guide

Social Post Status

Social Post Status The status of a social post. Property Name

Type

Description

Filter Group and Version

Available Version

message

String

Status message.

Small, 36.0

36.0

type

String

Status type. Values are:

Small, 36.0

36.0

• ApprovalPending • ApprovalRecalled • ApprovalRejected • Deleted • Failed • Hidden • Pending • Replied • Sent • Unknown

SEE ALSO: Social Post Capability

Stamp A user stamp. Property Name

Type

Description

Filter Group and Version

Available Version

description

String

Description of the stamp.

Small, 39.0

39.0

id

String

ID of the stamp.

Small, 39.0

39.0

imageUrl

String

Image URL of the stamp.

Small, 39.0

39.0

label

String

Label of the stamp.

Small, 39.0

39.0

SEE ALSO: User Detail User Summary

Status Capability If a feed post or comment has this capability, it has a status that determines its visibility.

844

Chatter REST API Developer Guide

Property Name

Type

feedEntityStatus String

Subscription

Description

Filter Group and Version

Available Version

Specifies the status of the feed post or comment. Values are:

Small, 37.0

37.0

Small, 37.0

37.0

• PendingReview—The feed post or comment isn’t approved yet and therefore isn’t published or visible. • Published—The feed post or comment is approved and visible. isApprovable ByMe

Boolean

Specifies whether the context user can change the status of the feed post or comment.

SEE ALSO: Feed Element Capabilities Comment Capabilities

Subscription Property

Type

Description

Filter Group Available and Version Version

community

Reference

Information about the community. Returns null if subscription exists in default community or communities aren’t enabled.

Medium, 29.0

26.0

id

String

18-character ID of the subscription

Small, 29.0

23.0

subject

Depends

Information about the parent, that is, the thing or person being followed. Valid values are:

Small, 29.0

• Group (23.0) • Record Summary (23.0) • Topic (29.0) • User Summary (23.0) subscriber

Depends

Information about the subscriber, that is, the person following this item. Valid values are: • Group • User Summary

845

Small, 29.0

23.0

Chatter REST API Developer Guide

Subscription Page

Property

Type

Description

Filter Group Available and Version Version

url

String

Relative URL to this specific subscription

Small, 29.0

Description

Filter Group Available and Version Version

Returns the current page of subscriptions

Medium, 29.0

23.0

Returns the next page of subscriptions. If there is no next page, returns the string “null”

Small, 29.0

23.0

23.0

SEE ALSO: Follower Page Following Page Subscription Page

Subscription Page Property

Type

currentPageUrl String nextPageUrl

String

mySubscription Reference

Returns information about the subscription, or null Medium, 29.0 the context user is not subscribed.

23.0

previousPageUrl String

Returns the previous page of subscriptions. If there is no previous page, returns the string “null”

Medium, 29.0

23.0

subscriptions Subscription[]

Collection of subscriptions

Small, 29.0

23.0

Total number of subscriptions

Small, 29.0

23.0

total

Integer

Supported Emojis A collection of supported emojis. Property Name

Type

supportedEmojis Emoji Collection

Description

Filter Group and Version

Available Version

A collection of supported emojis.

Small, 39.0

39.0

Time Zone The user's time zone as selected in the user’s personal settings in Salesforce. This value does not reflect a device's current location. Property

Type

Description

Filter Group Available and Version Version

gmtOffset

Double

Signed offset, in hours, from GMT

Small, 30.0

846

30.0

Chatter REST API Developer Guide

Topic

Property

Type

Description

Filter Group Available and Version Version

name

String

Display name of this time zone

Small, 30.0

Property

Type

Description

Filter Group Available and Version Version

createdDate

String

ISO8601 date string, for example, 2011-02-25T18:24:31.000Z

Big, 29.0

28.0

description

String

Description of the topic

Big, 29.0

28.0

id

String

18-character ID of the topic

Small, 29.0

28.0

images

Topic Images

Images associated with the topic

Medium, 32.0

32.0

true if the topic is currently being deleted; false

Small, 33.0

33.0

30.0

SEE ALSO: User Settings

Topic

isBeingDeleted Boolean

otherwise. After the topic is deleted, when attempting to retrieve the topic, the response is 404: Not Found. name

String

Name of the topic

Small, 29.0

24.0

nonLocalized Name

String

Non-localized name of the topic

Medium, 36.0

36.0

talkingAbout

Integer

Number of people talking about this topic over the last Medium, 29.0 two months, based on factors such as topic additions and comments on posts with the topic

28.0

url

String

URL to the topic detail page

29.0

SEE ALSO: Managed Topic Topic Collection Topic Suggestion Topics Capability Topics People Are Knowledgeable About Topic Endorsement Topic Opt Out

847

Small, 29.0

Chatter REST API Developer Guide

Topic Collection

Topic Collection Property

Type

currentPageUrl String

Description

Filter Group Available and Version Version

Returns the current page of topics

Medium, 32.0

29.0

Small, 29.0–31.0 nextPageUrl

String

Returns the next page of topics. If there is no next page, Small, 29.0 returns the string “null”

29.0

topics

Topic[]

Collection of topics

24.0

Small, 29.0

SEE ALSO: File Detail

Topic Endorsement Represents one user endorsing another user for a single topic. Property

Type

Description

Filter Group Available and Version Version

endorsee

User Summary

User being endorsed

Small, 30.0

30.0

ID of the endorsement record

Small, 30.0

30.0

endorsementId String endorser

User Summary

User performing the endorsement

Small, 30.0

30.0

topic

Topic

Topic the user is being endorsed for

Small, 30.0

30.0

url

String

Chatter REST API resource URL for the endorsement record

Small, 30.0

30.0

SEE ALSO: Topic Endorsement Collection

Topic Endorsement Collection A collection of topic endorsement response bodies. Property

Type

currentPageUrl String

Description

Filter Group Available and Version Version

Chatter REST API URL identifying the current page.

Medium, 30.0

30.0

Small, 30.0

30.0

topicEndorsements Topic Endorsement[] Collection of topic endorsement response bodies

848

Chatter REST API Developer Guide

Topic Images

Property

Type

Description

nextPageUrl

String

Chatter REST API URL identifying the next page, or Small, 30.0 null if there isn’t a next page. Check whether this value is null before getting another page. If a page doesn’t exist, a ConnectApi.NotFoundException error is returned.

30.0

Chatter REST API URL identifying the previous page, or Medium, 30.0 null if there isn’t a previous page.

30.0

previousPageUrl String

Filter Group Available and Version Version

Topic Images Images associated with a topic. Property Name

Type

Description

Filter Group and Version

Available Version

coverImageUrl String

URL to a topic’s cover image, which appears Small, 32.0 on the topic page. Both topics and managed topics can have cover images.

32.0

featuredImageUrl String

URL to a managed topic’s featured image, Small, 32.0 which appears wherever you feature it, for example, on the communities home page.

32.0

SEE ALSO: Topic

Topic Opt Out An “opt out” from a topic. Indicates that a user doesn’t want to be identified as knowledgeable about a topic. Property

Type

Description

Filter Group Available and Version Version

id

String

ID of the topic opt out record

Small, 30.0

30.0

reason

String

The reason the user is opting out of the topic.

Small, 30.0

30.0

The only valid value is topicInfluenceHide. topic

Topic

Topic the user opted out of

Small, 30.0

30.0

url

String

Chatter REST API resource URL for the topic opt out

Small, 30.0

30.0

849

Chatter REST API Developer Guide

Topic Opt Out Collection

Property

Type

Description

Filter Group Available and Version Version

user

User Summary

User that opted out of the topic

Small, 30.0

Description

Filter Group Available and Version Version

Chatter REST API URL identifying the current page.

Medium, 30.0

30.0

Collection of topic opt out response bodies.

Small, 30.0

30.0

Description

Filter Group Available and Version Version

Topic that already exists or null for a new topic

Small, 29.0

28.0

Name of the topic

Small, 29.0

28.0

30.0

SEE ALSO: Topic Opt Out Collection

Topic Opt Out Collection A collection of topic opt out response bodies. Property

Type

currentPageUrl String topicOptOuts

Topic Opt Out[]

Topic Suggestion Property

Type

existingTopic Topic name

String

SEE ALSO: Topic Suggestion Collection

Topic Suggestion Collection Property

Type

Description

Filter Group Available and Version Version

topic Suggestions

Topic Suggestion[]

Collection of topic suggestion response bodies

Small, 29.0

28.0

Topics Capability If a feed element has this capability, the context user can add topics to it. Topics help users organize and discover conversations.

850

Chatter REST API Developer Guide

Property Name

Type

canAssignTopics Boolean

items

Topic[]

Topics People Are Knowledgeable About

Description

Filter and Version Available Version

true if a topic can be assigned to the feed Small, 32.0 element, false otherwise.

32.0

A collection of topics associated with this feed element.

32.0

Small, 32.0

SEE ALSO: Feed Element Capabilities

Topics People Are Knowledgeable About Represents a topic that a specified user is knowledgeable about. Property

Type

Description

Filter Group Available and Version Version

isEndorsedByMe Boolean

Specifies if the knowledgeable user is endorsed for the Small, 30.0 topic by the context user, true if so, false otherwise

30.0

knowledgeableId String

ID of the knowledgeable record

Small, 30.0

30.0

numEndorsements Integer

Number of endorsements received by the knowledgeable user for the topic

Medium, 30.0

30.0

Specifies the reasons why the user is considered knowledgeable about the topic. Valid values are:

Medium, 30.0

30.0

Small, 30.0

30.0

reasons

String[]

• Influential—User was mentioned in posts or in comments on posts with the topic or received likes on comments on posts with the topic. • Endorsed—User received endorsement from another user for the topic. topic

Topic

Topic that the user is knowledgeable about

SEE ALSO: Topics People Are Knowledgeable About Collection

Topics People Are Knowledgeable About Collection A collection of topics people are knowledgeable about response bodies. Property

Type

currentPageUrl String

Description

Filter Group Available and Version Version

Chatter REST API URL identifying the current page.

Medium, 30.0

851

30.0

Chatter REST API Developer Guide

Property

Type

knowledgeable Topics People Are Knowledgeable AboutTopic

Tracked Change Bundle Capability

Description

Filter Group Available and Version Version

Collection of topics people are knowledgeable about response bodies

Small, 30.0

30.0

Chatter REST API URL identifying the next page, or Small, 30.0 null if there isn’t a next page. Check whether this value is null before getting another page. If a page doesn’t exist, a ConnectApi.NotFoundException error is returned.

30.0

Chatter REST API URL identifying the previous page, or Medium, 30.0 null if there isn’t a previous page.

30.0

ID of the user who is knowledgeable about the topics. Small, 36.0

36.0

About[] nextPageUrl

String

previousPageUrl String

userId

String

Tracked Change Bundle Capability If a feed element has this capability, it has a group of other feed elements aggregated into one feed element called a bundle. This type of bundle aggregates feed tracked changes. Note: Bundled posts contain feed-tracked changes. In Salesforce for Android and Salesforce for iOS, bundled posts are in record feeds only. Property Name

Type

Description

Filter Group and Available Version Version

changes

Feed Tracked Change[]

Collection of feed tracked changes.

Small, 31.0

31.0

bundleType

String

Specifies the type of bundle. The value is Small, 31.0 TrackedChanges.

31.0

page

Feed Element Page A collection of feed elements.

Small, 31.0

31.0

totalElements

Integer

Small, 31.0

31.0

The total number of feed elements that this bundle aggregates.

SEE ALSO: Feed Element Capabilities

Tracked Changes Capability If a feed element has this capability, it contains all changes to a record for a single tracked change event.

852

Chatter REST API Developer Guide

Unauthenticated User

Property Name

Type

Description

Filter Group and Version

Available Version

changes

Feed Tracked Change[]

Collection of feed tracked changes.

Small, 32.0

32.0

SEE ALSO: Feed Element Capabilities

Unauthenticated User Property

Type

Description

Filter Group Available and Version Version

name

String

Either the name in the From field of the source email, Small, 29.0 or the email address from the source email.

24.0

type

String

UnauthenticatedUser

Small, 29.0

24.0

Up Down Vote Capability If a feed post or comment has this capability, users can vote it up or down. Property Name

Type

downVoteCount Long myVote

String

Description

Filter Group and Version

Available Version

Number of down votes.

Small, 41.0

41.0

Specifies the context user’s vote. Values are: Small, 41.0

41.0

• Down • None • Up upVoteCount

Long

Number of up votes.

SEE ALSO: Feed Element Capabilities Comment Capabilities

853

Small, 41.0

41.0

Chatter REST API Developer Guide

User Capabilities

User Capabilities Property

Type

Description

canChat

Boolean

Specifies if the context user can use Chatter Messenger Small, 29.0 with the subject user (true) or not (false)

29.0

Specifies if the context user can direct message the subject user (true) or not (false)

Small, 29.0

29.0

canDirectMessage Boolean

Filter Group Available and Version Version

canEdit

Boolean

Specifies if the context user can edit the subject user’s Small, 29.0 account (true) or not (false)

29.0

canFollow

Boolean

Specifies if the context user can follow the subject user’s Small, 29.0 feed (true) or not (false)

29.0

canViewFeed

Boolean

Specifies if the context user can view the feed of the subject user (true) or not (false)

Small, 29.0

29.0

canView FullProfile

Boolean

Specifies if the context user can view the full profile of Small, 29.0 the subject user (true) or only the limited profile (false)

29.0

isModerator

Boolean

Specifies if the subject user is a Chatter moderator or admin (true) or not (false)

Small, 29.0

29.0

Description

Filter Group Available and Version Since

SEE ALSO: User Profile

User Chatter Settings A user’s global Chatter settings. Property

Type

defaultGroup String EmailFrequency

The default frequency with which a user receives email Small, 29.0 from a group when they join it. Values are: • EachPost • DailyDigest • WeeklyDigest • Never In communities, the Email on every post option is disabled once more than 10,000 members choose this setting for the group. All members who had this option selected are automatically switched to Daily digests.

854

27.0

Chatter REST API Developer Guide

User Detail

User Detail If a context user doesn’t have permission to see a property, the property is set to null. Property

Type

Description

Filter Group Available and Version Version

aboutMe

String

Text from user's profile.

Big, 29.0

23.0

additional Label

String

An extra label for the user, for example, “Customer,” “Partner,” or “Acme Corporation.” If the user doesn’t have an extra label, the value is null.

Small, 30.0

30.0

address

Address

User’s address.

Big, 29.0

23.0

bannerPhoto

Banner Photo

User’s banner photo.

Big, 36.0

36.0

chatterActivity Chatter Activity

Chatter activity statistics.

Big, 29.0

23.0

chatterInfluence Chatter Influence

User’s influence rank.

Big, 29.0

23.0

community Nickname

String

User’s nickname in the community.

Medium, 32.0

32.0

companyName

String

Company name.

Small, 29.0

23.0

currentStatus User Status

23.0–25.0

Note: This property is no longer available as of version 25.0. User's current status.

displayName

String

User’s name that is displayed in the community. If nicknames are enabled, the nickname is displayed. If nicknames aren’t enabled, the full name is displayed.

Small, 32.0

32.0

email

String

User's email address.

Medium, 29.0

23.0

firstName

String

User's first name. In version 39.0 and later, if nicknames Small, 29.0 are enabled, firstName is null.

23.0

followersCount Integer

Number of users following this user.

Big, 29.0

23.0

followingCounts Following Counts

Information about items the user is following.

Big, 29.0

23.0

Big, 29.0

23.0

groupCount

Integer

Number of groups user is following.

hasChatter

Boolean

true if user has access to Chatter; false otherwise. Small, 31.0

31.0

id

String

18-character ID of the user.

Small, 29.0

23.0

isActive

Boolean

true if user is active, false otherwise.

Small, 29.0

23.0

isChatterGuest Boolean

Note: This property is no longer available as of version 26.0. Use the userType property instead. true if user is a Chatter customer, false otherwise.

855

23.0–25.0

Chatter REST API Developer Guide

User Detail

Property

Type

Description

Filter Group Available and Version Version

isInThis Community

Boolean

true if user is in the same community as the context Small, 29.0 user; false otherwise. Can be false for record

28.0

feed @mentions on posts with the scope “All Users.” lastName

String

User's last name. In version 39.0 and later, if nicknames Small, 29.0 are enabled, lastName is null.

23.0

managerId

String

18-character ID of the user’s manager.

Big, 29.0

23.0

managerName

String

Locale-based concatenation of manager's first and last Big, 29.0 names.

23.0

motif

Motif

Small, medium, and large icons indicating that the Small, 29.0 object is a user. The motif can also contain the object’s base color.

27.0

The motif icon is not the user’s profile picture. mySubscription Reference

If the context user is following this user, contains Medium, 29.0 information about the subscription, otherwise null.

23.0

name

String

Locale-based concatenation of first and last names. In Small, 29.0 version 39.0 and later, if nicknames are enabled, name is the nickname.

23.0

outOfOffice

Out of Office

Extra out-of-office message, if one exists, for the user.

Small, 40.0

40.0

phoneNumbers

Phone Number[]

Collection of user's phone numbers.

Big, 29.0

23.0

photo

Photo

Information about the user's photos.

Small, 29.0

23.0

reputation

Reputation

Reputation of the user in the community, which is determined by the number of points earned from events and actions performed in the community.

Big, 32.0

32.0

stamps

Stamp[]

Collection of the user’s stamps.

Small, 39.0

39.0

Number of thanks the user has received.

Big, 29.0

29.0

thanksReceived Integer title

String

Title of the user.

Small, 29.0

23.0

type

String

Value is User.

Small, 29.0

23.0

url

String

URL to the user's Chatter profile.

Small, 29.0

23.0

username

String

User name of the user, such as [email protected].

Small, 29.0

24.0

856

Chatter REST API Developer Guide

User Group Page

Property

Type

Description

Filter Group Available and Version Version

userType

String

Specifies the type of user. Valid values are:

Medium, 29.0

26.0

• ChatterGuest—User is an external user in a private group. • ChatterOnly—User is a Chatter Free customer. • Guest—User is unauthenticated. • Internal—User is a standard organization member. • Portal—User is an external user in a customer portal, partner portal, or community. • System—User is Chatter Expert or a system user. • Undefined—User is a user type that is a custom object.

SEE ALSO: User Summary Case Comment Capability Edit Capability Recommendation Audience User Page User Profile

User Group Page A paginated collection of groups a user is a member of. Property

Type

currentPageUrl String

Description

Filter Group Available and Version Version

URL to the current page

Medium, 29.0

23.0

groups

Group[]

Collection of groups for a user

Small, 29.0

23.0

nextPageUrl

String

URL to the next page, if there is no next page, returns Small, 29.0 the string “null”

23.0

URL to the previous page, if there is no previous page, Medium, 29.0 returns the string “null”

23.0

Total number of groups a user is a member of.

23.0

previousPageUrl String

total

Integer

This number is always the total number of groups a user is a member of, even when the request is a search and the response contains a subset of that total.

857

Small, 29.0

Chatter REST API Developer Guide

User Page

User Page Property

Description

Filter Group Available and Version Version

currentPageToken String

Token identifying the current page.

Medium, 37.0

37.0

currentPageUrl String

URL to the current page.

Medium, 29.0

23.0

nextPageToken String

Token identifying the next page, or null if there isn’t Small, 37.0 a next page.

37.0

String

URL to the next page. If there is no next page, returns Small, 29.0 null.

23.0

previousPageToken String

Token identifying the previous page, or null if there Medium, 37.0 isn’t a previous page.

37.0

previousPageUrl String

URL to the previous page. If there is no previous page, Medium, 29.0 returns null.

23.0

User Detail[]

Collection of user detail information.

Small, 29.0

24.0

Property

Type

Description

Filter Group Available and Version Version

capabilities

User Capabilities

The context user’s capabilities specific to the subject user’s profile

Medium, 29.0

29.0

id

String

The ID of the user attached to the profile

Small, 29.0

29.0

tabs

User Profile Tab[]

The tabs visible to the context user for that user type

Big, 29.0

29.0

url

String

The URL of the user’s profile

Small, 29.0

29.0

userDetail

User Detail

The details about the user attached to the profile

Small, 29.0

29.0

nextPageUrl

users

Type

User Profile

User Profile Tab Property

Type

Description

Filter Group Available and Version Version

id

String

The tab’s unique identifier or 18–character Id

Small, 29.0

29.0

isDefault

Boolean

Specifies if the tab appears first when clicking the user Small, 29.0 profile (true) or not (false)

29.0

tabType

String

Specifies the type of user profile tab:

29.0

• CustomVisualForce—Tab that displays data from a Visualforce page.

858

Small, 29.0

Chatter REST API Developer Guide

Property

Type

User Reference Collection

Description

Filter Group Available and Version Version

• CustomWeb—Tab that displays data from any external web-based application or web page. • Element—Tab that displays generic content inline. • Feed—Tab that displays the Chatter feed. • Overview—Tab that displays user details. tabUrl

String

The current tab’s content URL (for non built-in tab types)

Small, 29.0

29.0

SEE ALSO: User Profile

User Reference Collection A collection of user references. Property Name

Type

currentPageUrl String nextPageUrl

String

previousPageUrl String

Description

Filter Group and Version

Available Version

URL to the current page.

Small, 35.0

35.0

URL to the next page.

Small, 35.0

35.0

URL to the previous page.

Small, 35.0

35.0

userCount

Integer

Number of users in the collection.

Small, 35.0

35.0

users

Reference[]

A collection of user references.

Small, 35.0

35.0

SEE ALSO: Custom List Audience Criteria Recommendation Audience

User Settings Settings specific to a user. Property

Type

Description

Filter Group Available and Version Version

approvalPosts Boolean

User can approve workflows from Chatter posts.

Small, 29.0

27.0

canAccess Boolean PersonalStreams

User can access personal stream feeds.

Small, 40.0

40.0

859

Chatter REST API Developer Guide

User Settings

Property

Type

Description

Filter Group Available and Version Version

canFollow

Boolean

User can follow things.

Small, 29.0

24.0

canModify AllData

Boolean

User has Modify all Data permission.

Small, 29.0

24.0

canOwnGroups

Boolean

User can own groups.

Small, 29.0

24.0

canViewAllData Boolean

User has View all Data permission.

Small, 29.0

24.0

canViewAllGroups Boolean

User has View all Groups permission.

Small, 29.0

24.0

canViewAllUsers Boolean

User has View all Users permission.

Small, 29.0

24.0

canViewCommunity Boolean Switcher

User can see the community switcher menu.

Small, 34.0

34.0

canViewFull UserProfile

Boolean

User can see other user’s Chatter profile.

Small, 29.0

24.0

canView PublicFiles

Boolean

User can see all files that are public.

Small, 29.0

24.0

Currency symbol to use for displaying currency values. Small, 29.0 Applicable only when the multiCurrency property of the Features response body is false.

28.0

User is a Chatter customer.

Small, 29.0

24.0

Maximum number of files user can sync.

Small, 32.0

32.0

currencySymbol String

externalUser

Boolean

fileSyncLimit Integer fileSync StorageLimit

Integer

Maximum storage for synced files, in megabytes (MB). Small, 29.0

29.0

folderSync Limit

Integer

Maximum number of folders user can sync.

Small, 32.0

32.0

User is a member of the internal org.

Small, 29.0

26.0

hasAccess Boolean ToInternalOrg hasChatter

Boolean

User has access to Chatter.

Small, 31.0

31.0

hasFileSync

Boolean

User has Sync Files permission.

Small, 29.0

26.0

hasFieldService Boolean LocationTracking

User has Field Service Lightning GPS tracking enabled. Small, 41.0

41.0

hasFieldService Boolean MobileAccess

User has access to the Field Service Lightning mobile app.

Small, 41.0

41.0

hasFileSync Boolean ManagedClient AutoUpdate

Administrator for the user’s org allows file sync clients Small, 34.0 to update automatically.

34.0

User has access to REST API.

29.0

hasRestData ApiAccess

Boolean

860

Small, 29.0

Chatter REST API Developer Guide

User Status

Property

Type

Description

timeZone

Time Zone

The user's time zone as selected in the user’s personal Small, 30.0 settings in Salesforce. This value does not reflect a device's current location.

30.0

ISO code for the default currency. Applicable only when Small, 29.0 the multiCurrency property of the Features response body is true.

28.0

userDefault String CurrencyIsoCode

Filter Group Available and Version Version

userId

String

18-character ID of the user.

Small, 29.0

24.0

userLocale

String

Locale of user.

Small, 29.0

24.0

Property

Type

Description

Filter Group Available and Version Version

body

Feed Item Body[]

Body of the post

Small, 29.0

23.0–25.0

parentId

String

18-character ID

Small, 29.0

23.0–25.0

url

String

URL to this user status post

Small, 29.0

23.0–25.0

SEE ALSO: Organization

User Status

SEE ALSO: User Detail

User Summary The User Summary response body is a subset of the User Detail response body. Property

Type

Description

Filter Group Available and Version Version

additional Label

String

An extra label for the user, for example, “Customer,” “Partner,” or “Acme Corporation.” If the user doesn’t have an extra label, the value is null.

Small, 30.0

30.0

community Nickname

String

User’s nickname in the community.

Medium, 32.0

32.0

companyName

String

Name of the company.

Small, 29.0

23.0

861

Chatter REST API Developer Guide

User Summary

Property

Type

Description

Filter Group Available and Version Version

displayName

String

User’s name that is displayed in the community. If nicknames are enabled, the nickname is displayed. If nicknames aren’t enabled, the full name is displayed.

Small, 32.0

32.0

firstName

String

User's first name. In version 39.0 and later, if nicknames Small, 29.0 are enabled, firstName is null.

23.0

id

String

18-character ID of the user.

Small, 29.0

23.0

isActive

Boolean

true if user is active, false otherwise.

Small, 29.0

25.0

isChatter Guest

Boolean

23.0–26.0

Note: This property is no longer available as of version 26.0. Use the userType property instead. true if user is a Chatter customer, false otherwise

isInThis Community

Boolean

true if user is in the same community as the context Small, 29.0 user; false otherwise. Can be false for record

28.0

feed @mentions on posts with the scope “All Users.” lastName

String

User's last name. In version 39.0 and later, if nicknames Small, 29.0 are enabled, lastName is null.

23.0

motif

Motif

Small, medium, and large icons indicating that the Small, 29.0 object is a user. The motif can also contain the object’s base color.

27.0

The motif icon is not the user’s profile photo. mySubscription Reference

If the context user is following this user, contains Medium, 29.0 information about the subscription, otherwise null.

23.0

name

String

Locale-based concatenation of first and last names. In Small, 29.0 version 39.0 and later, if nicknames are enabled, name is the nickname.

23.0

outOfOffice

Out of Office

Extra out-of-office message, if one exists, for the user.

Small, 40.0

40.0

photo

Photo

Information about the user's photo.

Small, 29.0

23.0

reputation

Reputation

Reputation of the user in the community, which is determined by the number of points earned from events and actions performed in the community.

Big, 32.0

32.0

stamps

Stamp[]

Collection of the user’s stamps.

Small, 39.0

39.0

title

String

Title of the user.

Small, 29.0

23.0

type

String

Value is User.

Small, 29.0

23.0

url

String

URL to the user's Chatter profile.

Small, 29.0

23.0

862

Chatter REST API Developer Guide

User Summary

Property

Type

Description

Filter Group Available and Version Version

userType

String

Specifies the type of user. Valid values are:

Medium, 29.0

• ChatterGuest—User is an external user in a private group. • ChatterOnly—User is a Chatter Free customer. • Guest—User is unauthenticated. • Internal—User is a standard organization member. • Portal—User is an external user in a customer portal, partner portal, or community. • System—User is Chatter Expert or a system user. • Undefined—User is a user type that is a custom object.

863

26.0

Chatter REST API Developer Guide

Verified Capability

Example: Note: If the user's name is Chatter Expert and the return contains mostly null values, it indicates that the Chatter Expert user is either deactivated or taken over by an administrator, or the organization was created before Salesforce introduced the Chatter Expert user. This is a special user that offers tips, tricks, and sample posts to help users get started with Chatter.

SEE ALSO: User Detail Case Comment Capability Comment Conversation Detail Conversation Summary Dashboard Component Snapshot Favorite File Summary Group Detail Group Member Group Membership Request Knowledgeable People Like Message Segment: Mention Origin Capability Direct Message Member Collection Direct Message Membership Activity Message Platform Action Question and Answers Capability Social Post Capability Topic Endorsement Topic Opt Out

Verified Capability If a comment has this capability, users with permission can mark it as verified or unverified. Property Name

Type

isVerifiableByMe Boolean

isVerified

Boolean

Description

Filter Group and Version

Available Version

Specifies whether the context user has permission to mark comments as verified or unverified (true) or not (false).

Small, 41.0

41.0

true if the comment is marked as verified, Small, 41.0 otherwise false.

41.0

864

Chatter REST API Developer Guide

Property Name

Type

Workspace Permission

Description

Filter Group and Version

Available Version

lastVerifiedByUser User Summary

User who last marked the comment as Small, 41.0 verified or unverified, otherwise null. Also null if the context user doesn’t have permission to mark comments as verified or unverified.

41.0

lastVerifiedDate Date

Date when the comment was last marked Small, 41.0 as verified or unverified, otherwise null. Also null if the context user doesn’t have permission to mark comments as verified or unverified.

41.0

SEE ALSO: Comment Capabilities

Workspace Permission A user’s permissions for a workspace. Property Name

Type

Description

Filter Group and Version

Available Version

canAddFile Comments

Boolean

Specifies whether the user can add comments on files in the workspace.

Small, 39.0

39.0

canAddFiles

Boolean

Specifies whether the user can add files to Small, 39.0 the workspace.

39.0

canAddFilesOn Boolean BehalfOfOthers

Specifies whether the user can add files on Small, 39.0 behalf of others to the workspace.

39.0

canArchiveFiles Boolean

Specifies whether the user can archive files Small, 39.0 in the workspace.

39.0

canAttachOr Boolean ShareFilesToFeed

Specifies whether the user can attach or share files in the workspace to a feed.

Small, 39.0

39.0

canDeleteFiles Boolean

Specifies whether the user can delete files in the workspace.

Small, 39.0

39.0

Boolean

Specifies whether the user can create a Small, 39.0 content delivery from files in the workspace.

39.0

canFeatureFiles Boolean

Specifies whether the user can feature files Small, 39.0 in the workspace.

39.0

Boolean

Specifies whether the user can perform any Small, 39.0 action on the workspace or change the workspace membership.

39.0

canDeliver Content

canManage Workspace

865

Chatter REST API Developer Guide

Zone

Property Name

Type

Description

Filter Group and Version

Available Version

canModify FileComments

Boolean

Specifies whether the user can modify comments on files in the workspace.

Small, 39.0

39.0

canOrganize Boolean FilesAndFolders

Specifies whether the user can organize files Small, 39.0 and folders in the workspace.

39.0

canTagFiles

Boolean

Specifies whether the user can add tags to Small, 39.0 files in the workspace.

39.0

canView FileComments

Boolean

Specifies whether the user can view comments on files in the workspace.

39.0

Small, 39.0

Zone A Chatter Answers zone. Property

Type

Description

Filter Group Available and Version Version

description

String

The description of the zone

Big, 29.0

29.0

id

String

The zone ID

Small, 29.0

29.0

isActive

Boolean

Indicates that the zone is active

Small, 29.0

29.0

Indicates that the zone is available for Chatter Answers Small, 29.0

29.0

isChatterAnswers Boolean name

String

Name of the zone

Small, 29.0

29.0

url

String

Chatter REST API resource URL for the zone

Small, 30.0

30.0

visibility

String

Zone visibility type. One of these values:

Small, 29.0

29.0

If the zone is available in a portal or a community, this Small, 29.0 property contains the ID of the portal or community. If the zone is available to all portals, this property contains the value All.

29.0

• Community—Available in a community. • Internal—Available internally only. • Portal—Available in a portal. visibilityId

String

SEE ALSO: Zone Page

Zone Page A page of Chatter Answers zones.

866

Chatter REST API Developer Guide

Zone Search Page

Property

Type

Description

Filter Group Available and Version Version

zones

Zone[]

Collection of one or more zones

Small, 29.0

29.0

Chatter REST API URL identifying the current page.

Medium, 29.0

29.0

currentPageUrl String nextPageUrl

String

Chatter REST API URL identifying the next page, or Small, 29.0 null if there isn’t a next page. Check whether this value is null before getting another page. If a page doesn’t exist, a ConnectApi.NotFoundException error is returned.

29.0

Zone Search Page A page of results from a search within a Chatter Answers zone. Property

Description

Filter Group Available and Version Version

currentPageToken String

Token identifying the current page.

Medium, 29.0

29.0

currentPageUrl String

Chatter REST API URL identifying the current page.

Medium, 29.0

29.0

Small, 29.0

29.0

currentPageToken String

Token identifying the next page, or null if there isn’t Small, 29.0 a next page.

29.0

String

Chatter REST API URL identifying the next page, or Small, 29.0 null if there isn’t a next page. Check whether this value is null before getting another page. If a page doesn’t exist, a ConnectApi.NotFoundException error is returned.

29.0

items

nextPageUrl

Type

Zone Search Result[] Collection of search results

Zone Search Result The result of a search within a Chatter Answers zone. Property

Type

hasBestAnswer Boolean

Description

Filter Group Available and Version Version

Indicates whether or not the search result has a best answer

Small, 29.0

29.0

id

String

ID of the search result. The search result can be a question or an article.

Small, 29.0

29.0

title

String

Title of the search result

Small, 29.0

29.0

867

Chatter REST API Developer Guide

Chatter REST API Appendices

Property

Type

Description

Filter Group Available and Version Version

type

String

Type of the search result. One of these values:

Small, 29.0

29.0

Small, 29.0

29.0

• Article—Search results contain only articles. • Question—Search results contain only questions. voteCount

String

Number of votes given to the search result

SEE ALSO: Zone Search Page

Chatter REST API Appendices Use this appendix when working with action link button labels. IN THIS SECTION: Action Links Labels Use these labels for action link buttons.

Action Links Labels Use these labels for action link buttons. An action link is a button on a feed element. Clicking an action link can take a user to a Web page, initiate a file download, or invoke an API call to Salesforce or to an external server. An action link includes a URL and an HTTP method, and can include a request body and header information, such as an OAuth token for authentication. Use action links to integrate Salesforce and third-party services into the feed so that users can take action to drive productivity and accelerate innovation. Specify the key in the labelKey property of the Action Link Definition Input request body. When the action link is rendered, the UI uses labels for the “New,” “Pending,” “Success,” and “Failed” states as needed. Tip: If none of the predefined labels work for your action link, use a custom label. To use a custom label, create an action link template and define the label in the template. See Action Link Templates. Key

New

Pending

Success

Failed

Accept

Accept

Acceptance Pending

Accepted

Acceptance Failed

Activate

Activate

Activation Pending

Activated

Activation Failed

Add

Add

Add Pending

Added

Add Failed

Add to Calendar

Add to Calendar

Add to Calendar Pending Added to Calendar

Add to Calendar Failed

Add to Cart

Add to Cart

Add Pending

Added

Add Failed

Agree

Agree

Agree Pending

Agree

Agree Failed

868

Chatter REST API Developer Guide

Action Links Labels

Key

New

Pending

Success

Failed

Alert

Alert

Alert Pending

Alerted

Alert Failed

Answer

Answer

Answer Pending

Answered

Answer Failed

Approve

Approve

Approval Pending

Approved

Approval Failed

Assign

Assign

Assign Pending

Assigned

Assign Failed

Assist

Assist

Assistance Pending

Assisted

Assistance Failed

Attach

Attach

Attach Pending

Attached

Attach Failed

Authorize

Authorize

Authorization Pending

Authorized

Authorization Failed

Begin

Begin

Begin Pending

Started

Begin Failed

Book

Book

Book Pending

Booked

Book Failed

Buy

Buy

Buy Pending

Bought

Buy Failed

Call

Call

Call Pending

Called

Call Failed

Call Me

Call Me

Call Pending

Call Succeeded

Call Failed

Certify

Certify

Certifcation Pending

Certified

Certification Failed

Change

Change

Change Pending

Changed

Change Failed

Chat

Chat

Chat Pending

Chat Completed

Chat Failed

Check

Check

Check Pending

Checked

Check Failed

Clear

Clear

Clear Pending

Clear

Clear Failed

Clone

Clone

Clone Pending

Cloned

Clone Failed

Close

Close

Close Pending

Closed

Close Failed

Confirm

Confirm

Confirmation Pending

Confirmed

Confirmation Failed

Convert

Convert

Convert Pending

Converted

Convert Failed

Convert a Lead

Convert a Lead

Lead Conversion Pending Lead Converted

Lead Conversion Failed

Create

Create

Create Pending

Created

Create Failed

Deactivate

Deactivate

Deactivation Pending

Deactivated

Deactivation Failed

Decline

Decline

Decline Pending

Declined

Decline Failed

Delete

Delete

Delete Pending

Deleted

Delete Failed

Deny

Deny

Denial Pending

Denied

Denial Failed

Detach

Detach

Detach Pending

Detached

Detach Failed

Disagree

Disagree

Disagree Pending

Disagree

Disagree Failed

Dislike

Dislike

Dislike Pending

Disliked

Dislike Failed

869

Chatter REST API Developer Guide

Action Links Labels

Key

New

Pending

Success

Failed

Dismiss

Dismiss

Dismissal Pending

Dismissed

Dismissal Failed

Do

Do

Do Response Pending

Do

Do Response Failed

Donate

Donate

Donation Pending

Donated

Donation Failed

Down

Down

Down Response Pending Down

Down Response Failed

Download

Download

Download Pending

Downloaded

Download Failed

Edit

Edit

Edit Pending

Edited

Edit Failed

End

End

End Pending

Ended

End Failed

Endorse

Endorse

Endorsement Pending

Endorsed

Endorsement Failed

Enter

Enter

Enter Pending

Entered

Enter Failed

Escalate

Escalate

Escalation Pending

Escalated

Escalation Failed

Estimate

Estimate

Estimate Pending

Estimate

Estimate Failed

Exclude

Exclude

Exclude Pending

Excluded

Exclude Failed

Exit

Exit

Exit Pending

Exited

Exit Failed

Export

Export

Export Pending

Exported

Export Failed

File

File

File Pending

Filed

File Failed

Fill

Fill

Fill Pending

Filled

Fill Failed

Finish

Finish

Finish Pending

Finished

Finish Failed

Flag

Flag

Flag Pending

Flagged

Flag Failed

Flip

Flip

Flip Pending

Flipped

Flip Failed

Follow

Follow

Follow Pending

Followed

Follow Failed

Generate

Generate

Generate Pending

Generated

Generate Failed

Give

Give

Give Pending

Given

Give Failed

Help

Help

Help Pending

Helped

Help Failed

Hide

Hide

Hide Pending

Hidden

Hide Failed

High

High

High Response Pending

High

High Response Failed

Hold

Hold

Hold Pending

Hold Succeeded

Hold Failed

Import

Import

Import Pending

Imported

Import Failed

Include

Include

Include Pending

Included

Include Failed

Join

Join

Join Pending

Joined

Join Failed

Launch

Launch

Launch Pending

Launched

Launch Failed

870

Chatter REST API Developer Guide

Action Links Labels

Key

New

Pending

Success

Failed

Leave

Leave

Leave Pending

Left

Leave Failed

Like

Like

Like Pending

Liked

Like Failed

List

List

List Pending

Listed

List Failed

Log

Log

Log Pending

Logged

Log Failed

Log a Call

Log a Call

Log a Call Pending

Logged a Call

Log a Call Failed

Low

Low

Low Response Pending

Low

Low Response Failed

Mark

Mark

Mark Pending

Marked

Mark Failed

Maybe

Maybe

Maybe Response Pending Maybe

Maybe Response Failed

Medium

Medium

Medium Response Pending

Medium

Medium Response Failed

Meet

Meet

Meet Pending

Meet

Meet Failed

Message

Message

Message Pending

Message

Message Failed

Move

Move

Move Pending

Moved

Move Failed

Negative

Negative

Negative Response Pending

Negative

Negative Response Failed

New

New

New Pending

New

New Failed

No

No

No Response Pending

No

No Response Failed

OK

OK

OK Response Pending

OK

OK Response Failed

Open

Open

Open Pending

Opened

Open Failed

Order

Order

Order Pending

Ordered

Order Failed

Positive

Positive

Positive Response Pending

Positive

Positive Response Failed

Post

Post

Post Pending

Posted

Post Failed

Post Review

Post Review

Post Pending

Posted

Post Failed

Process

Process

Process Pending

Processed

Process Failed

Provide

Provide

Provide Pending

Provided

Provide Failed

Purchase

Purchase

Purchase Pending

Purchased

Purchase Failed

Quote

Quote

Quote Pending

Quoted

Quote Failed

Receive

Receive

Receive Pending

Received

Receive Failed

Recommend

Recommend

Recommend Pending

Recommended

Recommend Failed

Redo

Redo

Redo Response Pending Redo

871

Redo Response Failed

Chatter REST API Developer Guide

Action Links Labels

Key

New

Pending

Success

Failed

Refresh

Refresh

Refresh Pending

Refreshed

Refresh Failed

Reject

Reject

Rejection Pending

Rejected

Rejection Failed

Release

Release

Release Pending

Released

Release Failed

Remind

Remind

Reminder Pending

Reminded

Reminder Failed

Remove

Remove

Removal Pending

Removed

Removal Failed

Repeat

Repeat

Repeat Pending

Repeated

Repeat Failed

Report

Report

Report Pending

Reported

Report Failed

Request

Request

Request Pending

Requested

Request Failed

Reserve

Reserve

Reservation Pending

Reserved

Reservation Failed

Resolve

Resolve

Resolve Pending

Resolved

Resolve Failed

Respond

Respond

Response Pending

Responded

Response Failed

Restore

Restore

Restore Pending

Restored

Restore Failed

Review

Review

Review Pending

Reviewed

Review Failed

Revise

Revise

Revision Pending

Revised

Revision Failed

Save

Save

Save Pending

Saved

Save Failed

Schedule

Schedule

Schedule Pending

Scheduled

Schedule Failed

Sell

Sell

Sell Pending

Sold

Sell Failed

Send

Send

Send Pending

Sent

Send Failed

Send Email

Send Email

Send Email Pending

Email Sent

Send Email Failed

Share

Share

Share Pending

Shared

Share Failed

Ship

Ship

Shipment Pending

Shipped

Shipment Failed

Show

Show

Show Pending

Shown

Show Failed

Start

Start

Start Pending

Started

Start Failed

Stop

Stop

Stop Pending

Stopped

Stop Failed

Submit

Submit

Submit Pending

Submitted

Submit Failed

Subscribe

Subscribe

Subscribe Pending

Subscribed

Subscribe Failed

Test

Test

Test Pending

Tested

Test Failed

Thank

Thank

Thanks Pending

Thanked

Thanks Failed

Unauthorize

Unauthorize

Unauthorization Pending Unauthorized

Unauthorization Failed

Uncheck

Uncheck

Uncheck Pending

Uncheck Failed

872

Unchecked

Chatter REST API Developer Guide

Action Links Labels

Key

New

Pending

Success

Undo

Undo

Undo Response Pending Undo

Undo Response Failed

Unflag

Unflag

Unflag Pending

Unflagged

Unflag Failed

Unfollow

Unfollow

Unfollow Pending

Unfollowed

Unfollow Failed

Unlike

Unlike

Unlike Pending

Unliked

Unlike Failed

Unmark

Unmark

Unmark Pending

Unmarked

Unmark Failed

Unsubscribe

Unsubscribe

Unsubscribe Pending

Unsubscribed

Unsubscribe Failed

Up

Up

Up Response Pending

Up

Up Response Failed

Update

Update

Update Pending

Updated

Update Failed

Validate

Validate

Validate Pending

Validated

Validate Failed

Verify

Verify

Verify Pending

Verified

Verify Failed

View

View

View Pending

Viewed

View Failed

Visit

Visit

Visit Pending

Visit Successful

Visit Failed

Yes

Yes

Yes Response Pending

Yes

Yes Response Failed

873

Failed

INDEX @ me resources 363

A Access tokens 38 Action Link inputs 567 Action Link Definition inputs 559 Action Link Definition response body 653 Action Link Diagnostic 656 Action Link Group Definition inputs 564 Action link group definition resource 124 Action Link Group Definition response body 657 Action link group definitions resource 121 Action link group templates deleting 66 editing 65 packaging 66 Action Link Group Templates design 54 Action link groups resource 125 Action link resource 125 Action Link Template Binding Input 568 Action link templates creating 62 Action links invoking example 99 updating status example 99 Action Links authentication 49 create template example 95 define example 92, 95 labels 868 overview 49 post example 92, 95 security 49 templates 54 use cases 47 versioning 49 working with 45 Action Links Diagnostic Information 128 Action links resources 120, 508 Activity Reminder 130, 658 Activity Reminder Input 569 Activity Reminders 129

Activity Reminders Collection 659 Adding member to a group 435 Adding photo group 443 user 536 Address response body 659 Alternative 659 Alternative Input 569 Announcement 659 Announcement input 570 Announcement Page 660 Announcement resource 135 Announcements group 430 Announcements Resources 131 Appendices 868 Approval Capability 661 Approval Post Template Field response body 661 Article Item 662 Article Summary 662 Article Topic Assignment Job Input 572 Asset File 407, 663 Asset File Information 408 Associated Actions Capability inputs 572 Associated Actions Capability response body 664 Async Query 137–138, 664 Async Query Collection 667 Async Query Input 573 Attach input canvas app 575 existing content 576 feed poll 576 link 577 new file upload 578 Authentication 3

B Banner Capability Response Body 667 Banner Photo 668 Banner Photo Input 579 Batch Collection Input 579 Batch feed items 241 Batch information group-memberships resource 439 Batch Input 580

874

Index

Batch requests batch input 613 batch request input 614 Batch resource 141 Batch Result Item response body 668 Batch Results response body 670 Batching information groups 429 users 518 Bearer token 39 Bookmarks feed URL 251 resources 206 Bookmarks Capability Input 582 Bookmarks Capability Response Body 670

C Candidate Answers Status 670 Canvas apps attachment input 575 Canvas Capability 672 Canvas Capability Input 582 Case Comment Capability 670 Chatter activity get statistics for user example 105 Chatter Activity response body 672 Chatter Digests 148 Chatter Directory Resource 148 Chatter Directory response body 673 Chatter Extensions 150 Chatter feed elements 68 Chatter feed items 68 Chatter Feed Stream 154 Chatter Feed Streams 150 Chatter feeds 68 Chatter in Apex wildcards 21 Chatter Influence response body 673 Chatter Likes Capability Response Body 674 Chatter Resources 147 Chatter REST API cURL 6 Differences with other APIs 3 examples 76 named resources 5 resources 6 rich input 11 tasks 76 URLs 5

Chatter REST API (continued) using 2 Chatter Stream 674 Chatter Stream Collection 674 Chatter Stream Input 583 Clean Input 584 Clean Record Result Collection response body 675 Clean Record Result response body 675 Clean Records 139 Clean Resources data services 138 metrics 138 Clean Rule Clean Status Collection response body 678 Clean Rule Clean Status response body 677 Clean Rule Data Service Collection response body 676 Clean Rule Data Service Metrics 141 Clean Rule Data Service Metrics Collection response body 677 Clean Rule Data Service Metrics response body 676 Clean Rule Data Service response body 675 Clean Rule Data Services 140 Clean Rule Statuses 141 ClientInfo response body 678 Comment Capabilities input 587 Comment Capabilities Response Body 680 Comment Capability, Status 160 Comment Capability, Up Down Vote 161 Comment Capability, Verified 162 Comment Page response body 681 Comment response body 679 Comments access 157 delete 157 editability 158 editing example 101 input 585 likes 159 on feed items 244 posting example 84 posting example with existing contnet 85 posting example with inline image 88 posting rich-text code block example 87 posting rich-text example 86 resources 156 Comments Capability Response Body 682 Comments Capability, Editability 158 communities OAuth 44 request example 78

875

Index

Communities building URL 5 list of 164 specific community information 164 working with 66 Communities direct message moderation feed resources 257 Communities Home Feed resources 260 URL 261 Communities Knowledge Resources 165 Communities moderation feed feed elements 266 feed items 267 Communities Moderation Feed resources 264 URL 265 Communities Moderation resources 167 Communities Moderation User Audit Statistics 175 Communities resources 163 Community Page response body 683 Community response body 682 Community Summary 683 Community Trending Articles 165 Community Trending Articles for a Topic 166 Company feed feed elements 271 feed items 273 getting updated feed elements example 104 resources 269 URL 270 Connect resource 176 Connect Directory response body 684 Content 684 Content Capability 686 Content Capability Input 587 Conversation Detail response body 688 Conversation Summary Collection response body 689 Conversation Summary response body 689 Conversation Unread Count response body 690 Conversations input 653 unread count 521 CORS 41 Custom List Audience Criteria 690 Custom List Audience Criteria Input 588 Custom Recommendations create example 106

Custom Recommendations (continued) schedule example 106 target audiences example 106

D Dashboard component snapshot input 590 resource 177 Dashboard Component Snapshot 690 Dashboard Component Snapshot Capability 691 Data format 3 Datacloud Company 691 Datacloud Company Collection 693 Datacloud Company Information 179 Datacloud Company Order Informatoin 181 Datacloud Contact 694 Datacloud Contact Collection 695 Datacloud Contact Import 180 Datacloud Contact Import Input 589 Datacloud Contact Information 180 Datacloud Contact Order Information 182 Datacloud Import 695 Datacloud Import Status 696 Datacloud Order 696 Datacloud OrderId Information 181 Datacloud Orders 183 Datacloud Purchase Usage Collection 697 Datacloud Resources 179 Datacloud Usage 184 Deleting photo group 443 user 536 Digest Job 697 Digest Job Input 591 Direct Message Capability 698 Direct Message Capability Input 592 Direct Message Member Collection 698 Direct Message Membership Activity 699 Direct Message Membership Activity Collection 699 Direct Message Moderation Feed URL 258 Direct messages feed resources 275 Direct Messages Feed URL 275

E Edit Capability 700 Email Address response body 701

876

Index

Email Attachment 701 Email Merge Field 701 Email Merge Field Collection 702 Email Merge Field Services 188 Email Message Capability 702 Emoji 703 Emoji Collection 703 Emojis 149 Encoding 3 Enhanced Link Capability 703 Entity Label 704 Enviroment Hub My Domain Validation 185 Environment Hub My Domain Validation 704 Environment Hub OAuth Url 705 Environment Hub OAuth URL Generator 187 Environment Hub resources 184 Environment Hub Sign-up Member Validation 186, 705 Environment Hub SSO User Mapping Generator 187 Environment Hub SSO User Mapping Input 592 Environment Hub SSO User Mapping Validation 706 Error Message response body 706 Error responses 28 Error with Output response body 706 Examples approve private group request 110 create custom recommendations 106 create group 108 create topic hierarchy 115 define action links 92, 95 edit comment 101 edit feed post 100 edit question post 101 edit question title 101 filter response body 78 follow record 112 following list 105 get @mention proposals 92 get another user’s feed 79 get Chatter activity statistics for user 105 get feed with internal feed items only 104 get following recommendations 106 get group feed 79 get my news feed 79 get record feed 112 get updated feed elements 104 get user information, batch 114 invoke action link 99 Java 329 join group 110

Examples (continued) like feed item 102 like feed item, batch 102 link post 329 make communities request 78 managed topics in communities 115 post @mention 89 post a batch of feed elements with binary file 89 post action links 92, 95 post binary file to Files home 89 post comment 84 post comment with binary file 89 post comment with existing content 85 post comment with inline image 88 post feed element with binary file 89 post feed element with existing content 81 post feed element with inline image 84 post feed item 80 post feed item with binary file 89 post group photo 89 post multiple @mentions 90 post rich-text comment 86 post rich-text comment with code block 87 post rich-text feed element 81 post rich-text feed element with code block 83 post to a group 111 post user photo 89 reject private group request 110 request to join private group 110 schedule custom recommendations 106 search feed 105 send private message 114 share feed item 103 stop following ecord 112 target audiences for custom recommendations 106 update action link status 99 update group photo 109 update user photo 113 update user profile 113 upload binary file to Files home 89 upload group photo 89 upload user photo 89 uploading binary files 11 Explanation Details response body 707 Explanation Summary response body 709 Extension 711 Extension Definition 712 Extension Definition Collection 712 Extension Input 593

877

Index

Extensions Capability 713 Extensions Capability Input 594 External Email Services 189 External File Permission Information 713

F Favorite input 598 Favorite response body 714 Favorites feed feed elements 283 feed items 281 list of favorites 278 resources 277 specific favorite 279 Favorites Page response body 715 Features common 44 Features response body 715 Feed Directory Item response body 719 Feed Directory response body 718 Feed Element 202 Feed Element Capabilities Input 595 Feed Element Capabilities Response Body 721 Feed Element Page Response Body 724 Feed elements about 68 company feed 266, 271 favorites feed 283 files feed 286 groups feed 301 key prefix filtered feed 297 layout 68 news feed 314 people feed 336 posting 68 posting example with existing content 81 posting example with inline image 84 posting rich-text code block example 83 posting rich-text example 81 record feed 342 rendering 68 to feed 365 user profile feed 376 Feed Elements 192 Feed Elements Batch 199, 202 Feed Elements Bookmarks Capability 206 Feed Elements Capabilities 204 Feed Elements Capability 225

Feed Elements Capability Bundle 208 Feed Elements Capability Chatter Likes 210 Feed Elements Capability, Approval 205, 228 Feed Elements Capability, Associated Actions 205 Feed Elements Capability, Banner 206 Feed Elements Capability, Batch Read By 233 Feed Elements Capability, Bundle 207 Feed Elements Capability, Canvas 209 Feed Elements Capability, Case Comment 209 Feed Elements Capability, Content 217 Feed Elements Capability, Dashboard Component 217 Feed Elements Capability, Direct Message 218 Feed Elements Capability, Direct Message Members 219 Feed Elements Capability, Direct Message Membership Activity 220 Feed Elements Capability, Direct Message Original Members 220 Feed Elements Capability, Editability 221 Feed Elements Capability, Email Message 222 Feed Elements Capability, Enhanced Link 222 Feed Elements Capability, Extensions 222 Feed Elements Capability, Feed Entity Share 223 Feed Elements Capability, Files 223 Feed Elements Capability, Interactions 224 Feed Elements Capability, Link 224 Feed Elements Capability, Media References 225 Feed Elements Capability, Mute 227 Feed Elements Capability, Poll 229 Feed Elements Capability, Read By 231 Feed Elements Capability, Read By Items 232 Feed Elements Capability, Recommendations 234 Feed Elements Capability, Record Snapshot 235 Feed Elements Capability, Social Post 235 Feed Elements Capability, Status 236 Feed Elements Capability, Tracked Changes 238 Feed Elements Capability, Up Down Vote 239 Feed Elements Comments Capability 211 Feed Elements Comments Capability Items 212 Feed Elements Likes Capability 210 Feed Elements Question and Answers Capability 230 Feed elements resources resources 189 Feed Elements Topics Capability 237 Feed Enabled Entity Summary 726 Feed Entity Is Editable 726 Feed Entity Not Available Summary 727 Feed Entity Share Capability 728 Feed Entity Share Capability Input 597 Feed Item Attachment: Approval response body 735 Feed Item Attachment: Basic Template response body 736

878

Index

Feed Item Attachment: Canvas Template response body 736 Feed Item Attachment: Case Comment response body 737 Feed Item Attachment: Content response body 738 Feed Item Attachment: Dashboard response body 740 Feed Item Attachment: Email Message response body 740 Feed Item Attachment: Link response body 741 Feed Item Attachment: Poll response body 741 Feed Item Attachment: Record Snapshot response body 742 Feed Item Attachment: Tracked Change response body 742 Feed Item Body response body 742 Feed Item Page response body 743 Feed Item Preamble Message Body response body 744 Feed Item response body 728 Feed Item Summary 744 Feed Item Topic input 603 Feed Item Topics response body 746 Feed items about 68 accessing 243 bookmarking 243 company feed 267, 273 deleting 243 favorites feed 281 files feed 288 groups feed 303 input 598 key prefix filtered feed 293 layout 68 like, batch 102 liking example 102 news feed 317 people feed 338 posting 68 posting example 80 record feed 346 rendering 68 sharing example 103 to feed 367 topics feed 373 user profile feed 378 Feed Modified Info response body 747 Feed Poll Choice response body 747 Feed response body 717 Feed Tracked Change response body 748 Feed-items resources accessing specific feed item 243 batch 241 comments 244

Feed-items resources (continued) likes 246 polls 247 query 242 resources 241 topics 248 Feeds about 68 bookmarks resources 251 communities direct message moderation resources 257 communities home resources 260 communities moderation 264 company resources 269 direct messages resources 275 editing post example 100 favorites resources 277 files resources 285 filter resources 291 groups resources 299 landing 306 list resource 284 mute resources 307 news resource 311 pending review 331 people resources 334 record resource 341 streams resources 360 to resources 363 topics resources 370 user-profile resources 376 users resource 513 File Detail response body 748 File ID Input 606 File Image 409 File Preview 412, 749 File Preview Collection 749 File Preview URL 750 File Previews 412 File Share Link response body 750 File Shares input 608 File Shares Page response body 751 File Summary Page response body 755 File Summary response body 751 Files group files 434 input 604 posting binary example 89 sync 74

879

Index

Files (continued) topic files 503 uploading binary example 11, 89 working with 74 Files Capability 755 Files Capability Input 607 Files Connect Allowed Item Type Collection 755 Files Connect Field Definition 755 Files Connect Field Value Input 608 Files Connect Item Input 609 Files Connect Item Type Detail 756 Files Connect Item Type Summary 756 Files Connect Permission 757 Files Connect Permission Collection 757 Files Connect Permission Collection Input 610 Files Connect Permission Input 610 Files Connect Permission Type 758 Files Connect Provider Type Response Body 758 Files Connect Repository resource 393 Files Connect Repository Authentication 759 Files Connect Repository Collection 760 Files Connect Repository Directory Entries 393 Files Connect repository features response body 761 Files Connect Repository File 393 Files Connect Repository File Content 395 Files Connect Repository File Preview 396 Files Connect Repository File Previews 395 Files Connect Repository Folder 397 Files Connect Repository Folder Item Types 397 Files Connect Repository Folder Items 398 Files Connect Repository for a File 402 Files Connect Repository Item Type 400 Files Connect Repository List 392 Files Connect Repository Permission Types 402 Files Connect Repository Permissions 400 Files Connect Repository Resources 391 Files Connect repository response body 758 Files feed feed elements 286 feed items 288 flat feed 290 getting updated feed elements example 104 resources 285 URL 285 Files resources content 408 file information in batch 414 rendition 413

Files resources (continued) shares 409 shares link 411 specific file information 403 user files, filtered by groups 526 user files, filtered by sharing 527 user files, general 522 Filter feed flat feed 296 getting updated feed elements example 104 key prefix 292 key prefix feed elements 297 key prefix feed items 293 list of filters 292 resources 291 Filter response bodies 22 Filters exclude 23 groups 22 include 25 Flat feed files feed 290 filtered feed 296 groups feed 305 news feed 330 people feed 339 record feed 358 to feed 368 user-profile feed 389 Flat Feed Item response body 761 Flat Feed response body 761 Folder input 611 Folder Item input 612 Folder Item Page response body 763 Folder Item response body 763 Folder Path 763 Folder response body 762 Follower Page response body 764 Followers on records 476 users resources 528 Following input 612 records 529 stop following record example 112 users 529 Following Counts response body 764

880

Index

Following Page response body 765 Forecasting Jump-To-User 419 Forecasting Manager 765 Forecasting Manager Ancestors 766 Forecasting Manager Ancestors - Specific User 420 Forecasting Manager Ancestors Query 420 Forecasting User 766 Forecasting User Access 421, 766 Forecasting User Access Collection 767 Forecasting User Collection 767 Forecasts resources 418

G Generic Bundle Capability Response Body 767 Generic Feed Element 767 Group input 617 Group Banner Photo 432 Group chatter settings input 616 Group Chatter Settings response body 771 Group Detail response body 772 Group Information response body 773 Group Invites 448 Group member input 619 Group Member Page response body 774 Group Member response body 774 Group Membership Request Collection response body 776 Group Membership Request response body 775 Group Membership Request Update input 619 Group Page response body 776 Group Record Input 620 Group Record Page response body 776 Group Record response body 776 Group Records Resources 446 Group response body 769 Group-memberships batch resource 439 Group-memberships resource 439 Groups approve private group request example 110 create group example 108 join example 110 posting example 111 reject private group request example 110 requesting membership 438 requesting membership in a private group 437 requesting status for membership requests 437

Groups (continued) requesting to join private group example 110 topic groups 505 updating group photo example 109 Groups feed feed elements 301 feed items 303 flat feed 305 getting updated feed elements example 104 resources 299 URL 300 Groups Feed get group feed example 79 Groups resources announcements information 430 batching information 429 files information 434 groups in organization 422 information 426 members 435 members requests for private groups 437 membership request 438 photo 443 records 445 settings 447 topics 448

H Hash tags message segment input 626 HTML encoding 3

I Icon response body 777 Image File 777 Image File Detail 777 Influence resource 449 Influence Thresholds response body 778 Inputs Action Link 567 Action Link Definition 559 Action Link Group Definition 564 Action Link Template Binding Input 568 Activity Reminder Input 569 Alternative Input 569 Announcement input 570 Article Topic Assignment Job Input 572 Associated Actions Capability 572

881

Index

Inputs (continued) Async Query Input 573 attachment: existing content 576 attachment: feed poll 576 attachment: link 577 attachment: new file upload 578 Banner Photo Input 579 batch 613 Batch Collection Input 579 Batch Input 580 batch request 614 Bookmarks Capability Input 582 canvas app 575 Canvas Capability Input 582 Chatter Stream Input 583 clean input 584 comment capabilities 587 comments 585 Content Capability Input 587 conversation 653 Custom List Audience Criteria Input 588 dashboard component snapshot 590 data integration rule input 584 Datacloud Contact Import Input 589 Datacloud Order 590 Digest Job Input 591 Direct Message Capability Input 592 Environment Hub SSO User Mapping 592 Extension Input 593 Extensions Capability Input 594 favorite 598 Feed Element Capabilities 595 Feed Entity Share Capability Input 597 feed item 598 feed item topic 603 feed poll input 603 File ID Input 606 file input 604 file shares 608 Files Capability Input 607 Files Connect Field Value Input 608 Files Connect Item Input 609 Files Connect Permission Collection Input 610 Files Connect Permission Input 610 folder 611 folder item 612 following 612 group 617 group chatter settings 616

Inputs (continued) group member 619 group membership request update 619 Group Record Input 620 Invite Collection Input 620 Link Capability Input 621 managed topic 621 managed topic position collection 623 managed topic position input 625 message body 626 Message Segment Input: Inline Image 627 Message Segment Input: Markup Begin 628 Message Segment Input: Markup End 628 message segment: hash tag 626 message segment: link 627 message segment: mention 629 message segment: text 630 messages 651 moderation flag 630 Mute Capability Input 631 New User Audience Criteria Input 631 Notification Member Input 632 PATCH 11 photo 633 Pin Capability Input 633 Poll Capability Input 634 POST 11 Push Notification 635 PUT 11 Question and Answers Capability Input 635 Read By Capability Input 636 Recommendation Audience Input 637 Recommendation Definition Input 639 Request Header 640 Scheduled Recommendation Input 641 share 644 share captured activity input 644 Status Capability Input 645 Stream Subscription Input 645 topic 647 topic assignment 646 topic endorsement 646 Topic Names Input 647 Topics Capability Input 648 Up Down Vote Capability Input 649 user 650 user chatter settings 649 User ID Collection Input 650 user message: recipient 652

882

Index

Inputs (continued) user message: recipient list 652 Verified Capability Input 653 Interactions Capability 778 Invite 779 Invite Collection 779 Invite Collection Input 620

J Java example 329 JavaScript 41 JSON 3

K Knowledge Article Version 781 Knowledge Article Version Collection 781 Knowledgeable People Collection response body 780 Knowledgeable People response body 779

L landing feed resources 306 Lightning Extension Information 781 Like Message Body response body 782 Like Page response body 783 Like response body 782 Likes access 450 delete 450 on comments 159 on feed item 246 resource 450 Limits 3–4 Link Capability 783 Link Capability Input 621 Link post examples 329 Links attachment input 577 message segment input 627 List View Definition response body 784 List View Record response body 785 List View response body 784 Localization 3

M Maintenance Information 786 Managed topic collection 788 Managed topic input 621 Managed Topic Position Collection Input 623

Managed Topic Position Input 625 Managed topic resource 457 Managed topic response body 787 Managed topics resource 450–451 Media Reference 788 Media Reference Capability 788 Members of a group 435 Mention Completion Page response body 790 Mention Completion response body 789 Mention Validation response body 791 Mention Validations response body 791 Mentions get proposals example 92 message segment input 629 posting example 89 posting multiple @mentions example 90 resources 459 Mentions completions resources 457–458 Message body input 626 Message Collection response body 793 Message response body 792 Message segment input hash tag 626 link 627 mention 629 text 630 Message Segment Input: Inline Image 627 Message Segment Input: Markup Begin 628 Message Segment Input: Markup End 628 Message Segment: Entity Link response body 793 Message Segment: Field Change Name response body 794 Message Segment: Field Change response body 793 Message Segment: Field Change Value response body 795 Message Segment: Hashtag response body 795 Message Segment: Inline Image 796 Message Segment: Link response body 797 Message Segment: Markup Begin 797 Message Segment: Markup End 798 Message Segment: Mention response body 798 Message Segment: More Changes response body 799 Message Segment: Resource Link response body 800 Message Segment: Text response body 800 Messages input 651 sending private message example 114 user messages, specific 535 Moderation Audit Record Count 800 Moderation Capability Response Body 801

883

Index

Moderation Flag input 630 Moderation Flag Item 801 Moderation Flags Collection 803 Moderation Flags response body 802 Motif response body 803 Motifs batch motifs resource 461 resource 461 Motifs resources 460 Mute feed URL 308 resources 307 Mute Capability 805 Mute Capability Input 631

N New file upload 578 New User Audience Criteria 805 New User Audience Criteria Input 631 News feed feed elements 314 feed items 317 flat feed 330 get my news feed example 79 getting updated feed elements example 104 resources 311 URL 311 Non-Entity-Recommendation 806 Notification Member 806 Notification Member Input 632

O OAuth authentication 42 user-agent flow 36 web server flow 31 Oauth Provider Information response body 807 Oauth User Information response body 807 Organization resource 176 Organization response body 807 Origin Capability 808 Out of Office 808 Outputs Announcement 659 Announcement Page 660

P PATCH input 11 Pending review feed URL 332 Pending Review Feed resources 331 People feed feed elements 336 feed items 338 flat feed 339 getting updated feed elements example 104 resources 334 URL 335 Phone Number response body 808 Photo group 443 input 633 user 536 Photo response body 809 Pin Capability 810 Pin Capability Input 633 Pinned Feed Element Collection 810 Platform Action Group response body 814 Platform Action response body 811 Poll Capability Input 634 Poll Capability Response Body 815 Polls attachment input 576 feed poll input 603 on feed items 247 POST input 11 Push Notification Input 635 Push Notifications Resource 462 PUT input 11

Q Query feed items 242 Question And Answers Capability 815 Question and Answers Capability Input 635 Question and Answers Suggestion Collection 816 Question and Answers Suggestions Resource 463 Questions editing post example 101 editing title example 101 Quickstart access token 42 Developer Edition 42 OAuth 42 prerequisites 42

884

Index

R Rate Limits 4 Read By 816 Read By Capability 817 Read By Capability Input 636 Read By Collection 817 Recipient input 652 list input 652 Recommendation Audience 467, 819 Recommendation Audience Collection 820 Recommendation Audience Input 637 Recommendation Audience Members 469 Recommendation Audience Resources 464 Recommendation Audiences 465 Recommendation Definition 472, 821 Recommendation Definition Collection 821 Recommendation Definition Input 639 Recommendation Definition Photo 474 Recommendation Definition Resources 470 Recommendation Definitions 470 Recommendation response body 818 RecommendationCollectionRepresentation 822 Recommendations get following recommendations example 106 specific action 541 specific action and key prefix 548 specific action and object category 544 specific action and object ID 551 specific action and object type 552 Recommendations Capability 822 Recommended Object 822 Record feed feed elements 342 feed items 346 flat feed 358 get internal feed items only example 104 getting updated feed elements example 104 resources 341 URL 341 Record Field response body 823 Record Field: Blank response body 823 Record Field: Compound response body 823 Record Field: Currency response body 824 Record Field: Date response body 825 Record Field: Percent response body 825 Record Field: Picklist response body 825 Record Field: Reference response body 826 Record Field: Reference with Date response body 826

Record Pinned Feed Elements 359 Record Snapshot Capability 827 Record Summary List response body 828 Record Summary response body 827 Record View response body 828 Record View Section response body 829 Records Chatter group records 445 followers 476 following 529 following example 112 get record feed 112 resources 476 Reference response body 830 Refresh tokens 38 Related Feed Post 830 Related Feed Post Collection 831 Related List Column response body 784 Related List Sort response body 786 Related Question 831 Related Questions 240 Repository Directory Entry Collection 832 Repository file detail representation 832 Repository File Summary 832 Repository Folder Detail 833 Repository Folder Item 834 Repository Folder Items Collection 835 Repository folder summary 835 Repository Group Summary 836 Repository Permission Type Collection 836 Repository User Summary 837 Reputation Level response body 838 Reputation response body 837 Request bodies Action Link 567 Action Link Definition 559 Action Link Group Definition 564 Action Link Template Binding Input 568 Activity Reminder Input 569 Alternative Input 569 Article Topic Assignment Job Input 572 Associated Actions Capability 572 Async Query Input 573 attachment: canvas app 575 attachment: existing content 576 attachment: feed poll 576 attachment: link 577 attachment: new file upload 578 Banner Photo Input 579

885

Index

Request bodies (continued) batch 613 Batch Collection Input 579 Batch Input 580 batch request 614 Bookmarks Capability Input 582 Canvas Capability Input 582 Chatter Stream Input 583 clean input 584 comment capabilities 587 comments 585 Content Capability Input 587 conversation 653 Custom List Audience Criteria Input 588 dashboard component snapshot 590 data integration rule input 584 Datacloud Contact Import Input 589 datacloud order 590 Digest Job Input 591 Direct Message Capability Input 592 Environment Hub SSO user mapping 592 Extension Input 593 Extensions Capability Input 594 favorite 598 Feed Element Capabilities 595 Feed Entity Share Capability Input 597 feed item 598 feed item topic 603 feed poll input 603 File ID Input 606 file input 604 file shares 608 Files Capability Input 607 Files Connect Field Value Input 608 Files Connect Item Input 609 Files Connect Permission Collection Input 610 Files Connect Permission Input 610 folder 611 folder item 612 following 612 group 617 group chatter settings 616 group member 619 group membership request update 619 Group Record Input 620 InviteCollection Input 620 Link Capability Input 621 managed topic 621 Managed topic position collection 623

Request bodies (continued) managed topic position input 625 message body 626 Message Segment Input: Inline Image 627 Message Segment Input: Markup Begin 628 Message Segment Input: Markup End 628 message segment: hash tag 626 message segment: link 627 message segment: mention 629 message segment: text 630 messages 651 moderation flag 630 Mute Capability Input 631 New User Audience Criteria Input 631 Notification Member Input 632 photo 633 Pin Capability Input 633 Poll Capability Input 634 Push Notification 635 Question and Answers Capability Input 635 Read By Capability Input 636 Recommendation Audience Input 637 Recommendation Definition Input 639 Request Header 640 Scheduled Recommendation Input 641 share 644 share captured activity input 644 Status Capability Input 645 Stream Subscription Input 645 topic 647 topic assignment 646 topic endorsement 646 Topic Names Input 647 Topics Capability Input 648 Up Down Vote Capability Input 649 user chatter settings 649 User ID Collection Input 650 user input 650 user message: recipient 652 user message: recipient list 652 Verified Capability Input 653 Request Header 838 Request Header Input inputs 640 Requesting membership in a group 438 Requesting membership in a private group 437 Resources action links 120, 508 action links diagnostic information 128

886

Index

Resources (continued) Activity Reminder 130 Activity Reminders 129 announcement 135 Announcements 131 asset file 407 asset file information 408 async queries 137–138 batch 141 batch motifs 461 bookmarks 206 chatter 147 Chatter digests 148 chatter directory 148 Chatter Extensions 150 Chatter Feed Stream 154 Chatter Feed Streams 150 clean 138 clean records 139 clean rule data service metrics 141 clean rule data services 140 clean rule statuses 141 Comment Capability, Status 160 Comment Capability, Up Down Vote 161 Comment Capability, Verified 162 comments 156 communities 163 communities direct message moderation feed 257 communities home feed 260 communities knowledge 165 Communities Moderation 167 communities moderation feed 264 Communities Moderation User Audit Statistics 175 community information 164 Community Trending Articles 165 Community Trending Articles for a Topic 166 company feed 269 connect 176 dashboard component snapshot 177 data integration rule data service metrics 141 data integration rule data services 140 data integration rule statuses 141 datacloud 179 datacloud company information 179 datacloud company order information 181 datacloud contact import 180 datacloud contact information 180 datacloud contact order information 182 datacloud orderId information 181

Resources (continued) datacloud orders 183 datacloud usage 184 direct messages feed 275 email merge field services 188 emojis 149 Environment Hub 184 Environment Hub My Domain validation 185 Environment Hub OAuth URL generator 187 Environment Hub sign-up member validation 186 Environment Hub SSO user mapping generator 187 error responses 28 external email services 189 favorites 277 feed element 202 feed elements 189, 192 feed elements batch 199, 202 feed elements bookmarks capability 206 feed elements capabilities 204 feed elements capability 225 feed elements capability bundle elements 208 Feed elements capability chatter likes 210 feed elements capability, approval 205 feed elements capability, associated actions 205 feed elements capability, banner 206 Feed Elements Capability, Batch Read By 233 feed elements capability, bundle 207 feed elements capability, canvas 209 feed elements capability, case comment 209 feed elements capability, content 217 feed elements capability, dashboard component 217 Feed Elements Capability, Direct Message 218 Feed Elements Capability, Direct Message Members 219 Feed Elements Capability, Direct Message Membership Activity 220 Feed Elements Capability, Direct Message Original Members 220 feed elements capability, editability 221 feed elements capability, email message 222 feed elements capability, enhanced link 222 feed elements capability, Extensions 222 feed elements capability, Feed Entity Share 223 feed elements capability, files 223 feed elements capability, interactions 224 feed elements capability, link 224 feed elements capability, media references 225 Feed Elements Capability, Mute 227 feed elements capability, origin 228 feed elements capability, poll 229

887

Index

Resources (continued) Feed Elements Capability, Read By 231 Feed Elements Capability, Read By Items 232 feed elements capability, recommendations 234 feed elements capability, record snapshot 235 feed elements capability, social post 235 feed elements capability, status 236 feed elements capability, tracked changes 238 Feed Elements Capability, Up Down Vote 239 feed elements comments capability 211 feed elements comments capability items 212 feed elements likes capability 210 feed elements question and answers capability 230 feed elements topics capability 237 feed-items 241 feeds 284 File Image 409 File Preview 412 file previews 412 files 415 Files Connect repository 393 Files Connect Repository Directory Entries 393 Files Connect repository file 393 Files Connect repository file content 395 Files Connect Repository File Preview 396 Files Connect Repository File Previews 395 Files Connect Repository Folder 397 Files Connect Repository Folder Item Types 397 Files Connect repository folder items 398 Files Connect Repository for a File 402 Files Connect Repository Item Type 400 Files Connect repository list 392 Files Connect Repository Permission Types 402 Files Connect Repository Permissions 400 files feed 285 filter feed 291 folders 415 followers on records 476 Forecasting Jump-To-User 419 Forecasting Manager Ancestors - Specific User 420 Forecasting Manager Ancestors Query 420 Forecasting User Access 421 Group Banner Photo 432 Group Invites 448 group records 446 groups feed 299 influence 449 landing feed 306 likes 450

Resources (continued) list of communities 164 managed topic 457 managed topics 451 mentions completions 457–458 mentions validations 459 motifs 460–461 mute 307 organization 176 pending review feed 331 people feed 334 push notifications 462 question and answers suggestions 463 recommendation audience 467 recommendation audience members 469 recommendation audiences 465 recommendation definition 472 recommendation definition photo 474 recommendation definitions 470 Record Pinned Feed Elements 359 records 476 related questions 240 scheduled recommendation 485 scheduled recommendations 479 share captured activity 489 streams feed 360 subscriptions 490 Subscriptions Notifications 490 Top Viewed Articles for a Topic 166 Topic and Article Assignment Rules 496 Topic and Article Assignments 495 topics feed 370 topics on records 477 Topics Pinned Feed Elements 374 update 138 update records 139 user profile 508 User Profiles Banner Photo 509 user profiles photo 511 user reputation 553 Workspace Permissions 177 zone search results 558 Response bodies Action Link Definition 653 Action Link Diagnostic 656 Action Link Group Definition 657 Activity Reminder 658 Activity Reminders Collection 659 Address 659

888

Index

Response bodies (continued) Alternative 659 Approval Capability 661 Approval Post Template Field 661 Article Item 662 Article Summary 662 Asset File 663 Associated Actions Capability 664 Async Query 664 Async Query Collection 667 Banner Capability 667 Banner Photo 668 Batch Result Item 668 Batch Results 670 Bookmarks Capability 670 Candidate Answers Status 670 Canvas Capability 672 Case Comment Capability 670 Chatter Activity 672 Chatter Directory 673 Chatter Influence 673 Chatter Likes Capability 674 Chatter Stream 674 Chatter Stream Collection 674 Clean eule clean status 677 clean record result 675 clean record result collection 675 Clean Rule Data Service 675 Clean Rule Data Service Collection 676 clean rule data service metrics 676 clean rule data service metrics collection 677 clean rule status collection 678 ClientInfo 678 Comment 679 Comment Page 681 Comments Capability 682 CommentsCapabilities 680 Community 682 Community Page 683 Community Summary 683 Connect Directory 684 Content 684 Content Capability 686 Conversation Detail 688 Conversation Summary 689 Conversation Summary Collection 689 Conversation Unread Count 690 Custom List Audience Criteria 690 Dashboard Component Snapshot 690

Response bodies (continued) Dashboard Component Snapshot Capability 691 Datacloud Company 691 Datacloud Company Collection 693 Datacloud Contact 694 Datacloud Contact Collection 695 Datacloud Import 695 Datacloud Import Status 696 Datacloud Order 696 Datacloud Purchase Usage Collection 697 Digest Job 697 Direct Message Capability 698 Direct Message Member Collection 698 Direct Message Membership Activity 699 Direct Message Membership Activity Collection 699 Edit Capability 700 Email Address 701 Email Attachment 701 Email Merge Field 701 Email Merge Field Collection 702 Email Message Capability 702 emoji 703 Emoji Collection 703 Enhanced Link Capability 703 Entity Label 704 Environment Hub My Domain validation 704 Environment Hub OAuth URL 705 Environment Hub sign-up member validation 705 Environment Hub SSO user mapping validation 706 Error Message 706 Error with Output 706 excluding properties 23 Explanation Details 707 Explanation Summary 709 Extension 711 Extension Definition 712 Extension Definition Collection 712 Extensions Capability 713 External File Permission Information 713 Favorite 714 Favorites Page 715 Features 715 Feed 717 Feed Directory 718 Feed Directory Item 719 Feed Element Capabilities 721 Feed Element Page 724 Feed Enabled Entity Summary 726 Feed Entity Is Editable 726

889

Index

Response bodies (continued) Feed Entity Not Available Summary 727 Feed Entity Share Capability 728 Feed Item 728 Feed Item Attachment: Approval 735 Feed Item Attachment: Basic Template 736 Feed Item Attachment: Canvas Template 736 Feed Item Attachment: Case Comment 737 Feed Item Attachment: Content 738 Feed Item Attachment: Dashboard 740 Feed Item Attachment: Email Message 740 Feed Item Attachment: Link 741 Feed Item Attachment: Poll 741 Feed Item Attachment: Record Snapshot 742 Feed Item Attachment: Tracked Change 742 Feed Item Body 742 Feed Item Page 743 Feed Item Preamble Message Body 744 Feed Item Summary 744 Feed Item Topics 746 Feed Modified Info 747 Feed Poll Choice 747 Feed Tracked Change 748 File Detail 748 File Preview 749 File Preview Collection 749 File Preview URL 750 File Share Link 750 File Shares Page 751 File Summary 751 File Summary Page 755 Files Capability 755 Files Connect Allowed Item Type Collection 755 Files Connect Field Definition 755 Files Connect Item Type Detail 756 Files Connect Item Type Summary 756 Files Connect Permission 757 Files Connect Permission Collection 757 Files Connect Permission Type 758 Files Connect repository 758 Files Connect Repository Authentication 759 Files Connect repository collection 760 Files Connect repository features 761 filtering 22 filtering example 78 filtering properties 22–23, 25 Flat Feed 761 Flat Feed Item 761 Folder 762

Response bodies (continued) Folder Item 763 Folder Item Page 763 Folder Path 763 Follower Page 764 Following Counts 764 Following Page 765 Forecasting Manager 765 Forecasting Manager Ancestors 766 Forecasting User 766 Forecasting User Access 766 Forecasting User Access Collection 767 Forecasting User Collection 767 Generic Bundle Capability 767 Generic Feed Element 767 Group 769 Group Chatter Settings 771 Group Detail 772 Group Information 773 Group Member 774 Group Member Page 774 Group Membership Request 775 Group Membership Request Collection 776 Group Page 776 Group Record 776 Group Record Page 776 group records list 776 Icon 777 Image File 777 Image File Detail 777 including properties 25 Influence Thresholds 778 Interactions Capability 778 Invite 779 Invite Collection 779 Knowledge Article Version 781 Knowledge Article Version Collection 781 Knowledgeable People 779 Knowledgeable People Collection 780 Lightning Extension Information 781 Like 782 Like Message Body 782 Like Page 783 Link Capability 783 List View Definition 784 List View Object 784 List View Record 785 Maintenance Information 786 managed topic 787

890

Index

Response bodies (continued) managed topic collection 788 Media Reference 788 Media Reference Capability 788 Mention Completion 789 Mention Completion Page 790 Mention Validation 791 Mention Validations 791 Message 792 Message Collection 793 Message Segment: Entity Link 793 Message Segment: Field Change 793 Message Segment: Field Change Name 794 Message Segment: Field Change Value 795 Message Segment: Hashtag 795 Message Segment: Inline Image 796 Message Segment: Link 797 Message Segment: Markup Begin 797 Message Segment: Markup End 798 Message Segment: Mention 798 Message Segment: More Changes 799 Message Segment: Resource Link 800 Message Segment: Text 800 Moderation Audit Record Count 800 Moderation Capability 801 Moderation Flag Item 801 Moderation Flags 802 Moderation Flags Collection 803 Motif 803 Mute Capability 805 New User Audience Criteria 805 Non-Entity Recommendation 806 Notification Member 806 Oauth Provider Information 807 Oauth User Information 807 Organization 807 Origin Capability 808 Out of Office 808 Phone Number 808 Photo 809 Pin Capability 810 Pinned Feed Element Collection 810 Platform Action 811 Platform Action Group 814 Poll Capability 815 Question And Answers Capability 815 Question and Answers Suggestion Collection 816 Read By 816 Read By Capability 817

Response bodies (continued) Read By Collection 817 Recommendation 818 Recommendation Audience 819 Recommendation Audience Collection 820 Recommendation Definition 821 Recommendation Definition Collection 821 RecommendationCollectionRepresentation 822 Recommendations Capability 822 Recommended Object 822 Record Field 823 Record Field: Blank 823 Record Field: Compound 823 Record Field: Currency 824 Record Field: Date 825 Record Field: Percent 825 Record Field: Picklist 825 Record Field: Reference 826 Record Field: Reference with Date 826 Record Snapshot Capability 827 Record Summary 827 Record Summary List 828 Record View 828 Record View Section 829 Reference 830 Related Feed Post 830 Related Feed Post Collection 831 Related List Column 784 Related List Sort 786 Related Question 831 Repository Directory Entry Collection 832 repository file detail representation 832 repository file summary 832 Repository Folder Detail 833 repository folder item 834 repository folder items collection 835 repository folder summary 835 Repository Group Summary 836 Repository Permission Type Collection 836 Repository User Summary 837 Reputation 837 Reputation Level 838 Request Header 838 Scheduled Recommendation 838 Scheduled Recommendation Collection 840 share captured activity result 840 Shares 841 Social Account 841 Social Post Capability 842

891

Index

Response bodies (continued) Social Post Status 844 Stamp 844 Status Capability 844 Subscription 845 Subscription Page 846 Supported Emojis 846 Time Zone 846 Topic 847 Topic Collection 848 Topic Endorsement 848 Topic Endorsement Collection 848 Topic images 849 Topic Opt Out 849 Topic Opt Out Collection 850 Topic Suggestion 850 Topic Suggestion Collection 850 Topics Capability 850 Topics People Are Knowledgeable About 851 Topics People Are Knowledgeable About Collection 851 Tracked Change Bundle Capability 852 Tracked Changes Capability 852 Unauthenticated User 853 Up Down Vote Capability 853 User Capabilities 854 User Chatter Settings 854 User Detail 855 User Group Page 857 User Page 858 User Profile 858 User Profile Tab 858 User Reference Collection 859 User Settings 859 User Status 861 User Summary 861 Verified Capability 864 Workspace Permission 865 Zone 866 Zone Page 866 Zone Search Page 867 Zone Search Result 867 Response Bodies Files Connect provider type 758 Rich input 11

S Scheduled Recommendation 485, 838 Scheduled Recommendation Collection 840 Scheduled Recommendation Input 641

Scheduled Recommendation Resources 479 Scheduled Recommendations 479 Search feed items 242 Settings group 447 users 553 Share input 644 Share Captured Activity 489 Share Captured Activity Input 644 Share Captured Activity Result 840 Shares response body 841 Social Account 841 Social Post Capability 842 Social Post Status 844 SOQL 137–138, 664 Stamp 844 Status Capability 844 Status Capability Input 645 Stream Subscription Input 645 Streams feed resources 360 Streams Feed URL 360 Subscribing to a group 435 Subscription Page response body 846 Subscription response body 845 Subscriptions resource 490 Subscriptions Notifications 490 Supported Emojis 846

T Tasks approve private group request 110 create custom recommendations 106 create group 108 create topic hierarchy 115 define action link templates 95 define action links 92, 95 edit comment 101 edit feed post 100 edit question post 101 edit question title 101 filter response body 78 follow record 112 get @mention proposals 92 get another user’s feed 79 get Chatter activity statistics for user 105

892

Index

Tasks (continued) get feed with internal feed items only 104 get following recommendations 106 get group feed 79 get list of records user follows 105 get my news feed 79 get record feed 112 get updated feed elements 104 get user information, batch 114 invoke action link 99 join group 110 like feed item 102 like feed item, batch 102 make communities request 78 managed topics in communities 115 post @mention 89 post a batch of feed elements with binary file 89 post action links 92, 95 post binary file to Files home 89 post comment 84 post comment with binary file 89 post comment with existing content 85 post comment with inline image 88 post feed element with binary file 89 post feed element with existing content 81 post feed element with inline image 84 post feed item 80 post feed item with binary file 89 post group photo 89 post multiple @mentions 90 post rich-text comment 86 post rich-text comment with code block 87 post rich-text feed element 81 post rich-text feed element with code block 83 post to a group 111 post user photo 89 reject private group request 110 request to join private group 110 schedule custom recommendations 106 search feed 105 send private message 114 share feed item 103 stop following record 112 target audiences for custom recommendations 106 update action link status 99 update group photo 109 update user photo 113 update user profile 113 upload binary file to Files home 89

Tasks (continued) upload group photo 89 upload user photo 89 Text message segment input 630 Time Zone response body 846 To feed feed elements 365 feed items 367 flat feed 368 resources 363 URL 363 Tokens 38–39 Top Viewed Articles for a Topic 166 Topic input 647 Topic and Article Assignment Rules 496 Topic and Article Assignments 495 Topic Assignment input 646 Topic Collection response body 848 Topic endorsement input 646 Topic Endorsement Collection response body 848 Topic Endorsement response body 848 Topic Hierarchy create example 115 Topic images response body 849 Topic Names Input 647 Topic Opt Out Collection response body 850 Topic Opt Out response body 849 Topic resource 499 Topic response body 847 Topic Suggestion Collection response body 850 Topic Suggestion response body 850 Topics on feed items 248 Topics Capability Input 648 Topics Capability Response Body 850 Topics feed feed items 373 resources 370 Topics Feed URL 370 Topics on records resource 477 Topics People Are Knowledgeable About Collection response body 851 Topics People Are Knowledgeable About response body 851

893

Index

Topics Pinned Feed Elements 374 Topics resource endorse people 501 endorsements 503 files information 503 groups information 505 knowledgeable people 506 knowledgeable people opt out 507 knowledgeable people opt outs 507 list of topics 493 related topics 506 topic suggestions 497 trending topics 498 Tracked Change Bundle Capability Response Body 852 Tracked Changes Capability 852

U Unauthenticated User response body 853 Up Down Vote Capability 853 Up Down Vote Capability Input 649 Update Resources data services 138 metrics 138 Updating photo group 443 user 536 Uploading binary files 11 URLs 5 Usage Limits 4 User Capabilities response body 854 User chatter settings input 649 User Chatter Settings response body 854 User Detail response body 855 User Group Page response body 857 User ID Collection Input 650 User Page response body 858 User profile resources 508 User profile feed feed elements 376 feed items 378 User Profile feed get another user’s feed example 79 User Profile response body 858 User Profile Tab response body 858 User Profiles Banner Photo 509 User Profiles Photo 511 User Reference Collection 859

User Reputation Resource 553 User Settings response body 859 User Status response body 861 User Summary response body 861 User-agent OAuth flow 36 User-profile feed flat feed 389 resources 376 URL 376 Users updating photo example 113 updating profile example 113 Users resources batching information 518 change status of conversations 519 conversations 518 conversations, specific 519 conversations, unread count 521 files, filtered by groups 526 files, filtered by sharing 527 files, general 522 followers 528 following 529 groups 531 knowledgeable about topics 532 knowledgeable about topics, batch users 532 messages 533 messages, specific 535 photo 536 recommendations 538 recommendations for specific action 541 recommendations for specific action and object ID 551 recommendations for specific action and object type 552 recommendations, specific action and key prefix 548 recommendations, specific action and object category 544 search conversations 519 topics 556 user information 515 user profile information 516 user settings 553 user status 555

V Verified Capability 864 Verified Capability Input 653

W web server OAuth flow 31 Wildcards 21

894

Index

Workspace Permission 865 Workspace Permissions Resource 177

Z Zone Page response body 866 Zone response body 866

Zone Search Page response body 867 Zone Search Result response body 867 Zones 556 Zones resources list of zones in organization 557 specific zonezone information 557 zone search results 558

895