Salesforce Files

Use Connect REST API to work with Salesforce Files.

Use Salesforce Files to upload, store, find, follow, share, and collaborate on files in the cloud.

ResourceHTTP MethodTask
/chatter/feed-elementsGETSearch all feed elements in an organization.
/chatter/feed-elementsPOSTPost a feed element.
/chatter/feeds/files/me/feed-elementsGETReturns all feed elements posted with files by people or groups that the context user follows.
/chatter/feeds/news/me/feed-elementsGETAll 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-elementsGETReturns 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-elementsGETReturns feed elements created by the user, parented by the user, and where the user is mentioned. In Experience Cloud sites only, this feed also contains feed elements on which the user commented. This feed is different than the news feed, which returns more feed items, including group updates. You can post to the user-profile feed. You can get another user’s user profile feed.
/connect/files/{fileId}GETGet information about a specified file, including references to external files.
/connect/files/{fileId}POSTUpload a new version of an existing file, including references to external files.
/connect/files/{fileId}PATCHRename a file or move a file to a different folder.
/connect/files/{fileId}DELETEDelete a file.
/connect/files/{fileId}/assetPOSTCreate an asset file.
/connect/file-assets/{assetId}GETGet information about an asset file.
/connect/file-assets/{assetId}PATCHChange the visibility of an asset file for unauthenticated users.
/connect/file-assets/{fullyQualifiedName}/contentGETGet the streamed content of an asset file.
/connect/file-assets/{fullyQualifiedName}/renditionGETGet up to 25 streamed renditions of an asset file. A rendition is a binary preview of the file.
/connect/file-assets/batch/{assetIds}GETGet information about a comma-separated list of up to 100 asset files.
/connect/files/{fileId}/contentGETReturns the content of the file, including references to external files. The content is streamed as the body of the response.
/connect/files/{fileId}/file-sharesGETGet the users, groups, or records with which a file has been shared.
/connect/files/{fileId}/file-sharesPOSTShare a file with users.
/connect/files/{fileId}/imageGETGet information about a file image.
/connect/files/{fileId}/file-shares/linkGETGet a file’s share link.
/connect/files/{fileId}/file-shares/linkPUTCreate a file’s share link.
/connect/files/{fileId}/file-shares/linkDELETEDelete a file’s share link.
/connect/files/{fileId}/previewsGETGet information about a file’s supported previews.
/connect/files/{fileId}/previewsPATCHGenerate up to 500 pages in a file preview.
/connect/files/{fileId}/previews/{previewFormat}GETGet up to 500 pages in a file preview or get a specific page in a preview.
/connect/files/{fileId}/renditionGETA 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}GETGet information about a list of files, specified by file IDs.
/connect/files/batch/{fileIds}DELETEDelete a list of files.
/connect/folders/{folderId}GETGet information about the specified folder.
/connect/folders/{folderId}PATCHMove or rename a folder.
/connect/folders/{folderId}DELETEDelete a folder.
/connect/folders/{folderId}/itemsGETGet information about the contents of a folder.
/connect/folders/{folderId}/itemsPOSTAdd a file to a folder and create a folder.
/chatter/groups/{groupId}/filesGETGet information about the files posted to the specified group.
/connect/topics/{topicId}/filesGETReturns information about the five files most recently posted to the specified topic.
/connect/files/users/{userId}GETGet 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/{userId}POSTUpload a file, including references to external files, to the Files home.
/connect/files/users/me/filter/groupsGETGet information about files posted to groups that the specified user is a member of.
/connect/files/users/me/filter/shared-with-meGETGet information about files that have been shared with the specified user.

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

To work with repository files, see Files Connect Repository Resources.