Web.API Controller Class for Group Entities: Groups and Contacts
GET https://account.sf-api.com/sf/v3/Groups
Retrieves all Distribution Groups this user has permissions to View in this account
Returns: a list of Groups this user has access to
POST https://account.sf-api.com/sf/v3/Groups
{
"Name":"Name",
"IsShared":true,
"Contacts":[{"Email":"user.one@domain.com"},{"Email":"user.two@domain.com"}]
}
Creates a new group. The Post body must include the specification of the group.
| group | Group | Specification of the group for creation |
Returns: the new group instance
PATCH https://account.sf-api.com/sf/v3/Groups(id)
{
"Name":"Name",
"IsShared":true,
}
Updates an existing group. This operation will ignore the provided clients list. Use the \Contacts navigation link to add/remove elements from a group
| id | String | The group identifier |
| group | Group | The partial group object containing the modified fields for updating |
Returns: the modified group object
POST https://account.sf-api.com/sf/v3/Groups(id)/Contacts
[{"Email":"user.one@domain.com"},{"Id":"abcd"}]
Adds a list of contacts to a group The contact list may contain either contact ID (same as User ID) or Email.
| id | String | A group identifier |
| contacts | Contact[] | A list of contacts |
Returns: The updated list of contacts for this group
DELETE https://account.sf-api.com/sf/v3/Groups(id)/Contacts
[{"Email":"user.one@domain.com"},{"Id":"abcd"}]
Removes contacts from a group The contact list may contain either contact ID (same as User ID) or Email. This method will ignore missing references in the provided list - i.e., if an email in the contacts list is not present in the group, it will be ignored. The method will not enforce that ID and Email match inside a single Contact instance: Id will be looked up first, then Email.
| id | String | A group identifier |
| contacts | Contact[] | A list of contacts |
Returns: The updated list of contacts for this group
GET https://account.sf-api.com/sf/v3/Groups(id)/ExportDocument?token=123
| id | String | A group identifier |
| documentType | DocumentType | Used to specify DocumentType format for export, default value is Xlsx |
| token | String | Token from call to Groups(id)/ExportDocument?getSignedUrl=true |
Returns: Exports List of Contact (s) in a given group as SpreadSheet or CSV
GET https://account.sf-api.com/sf/v3/Users(id)/Groups
Returns all groups the user is associated. This is currently limited to the authenticated user.
| id | String | User Id |
Returns: Feed of Groups