Less Annoying CRM logo Less Annoying CRM LACRM
Settings Functions

Groups

Groups allow you to segment your contacts so you can easily pull up a list of related contacts. When interacting with groups via the API, it's important to understand that there are two sets of functions. This page describes the group settings functions, which are used for managing the groups themselves. The functions on this page are rarely used, because once a group has been created, you normally don't need to mess with it. If you're trying to attach groups to contacts or see which contacts are in which groups, you should use the Group Memberships functions.

Create a group

This function creates a new group in the CRM. Once a group has been created, you can create a group membership to attach the group to a contact.

How to call this function
Function name
CreateGroup
Parameters
Name Text Required

The name of the group. Group names must be unique, so this can't match an existing group name.

Sharing Enum Default: Private
Valid options: Public, Private, Teams

Who should be able to see this group? By default, groups are private and can only be seen by the user who creates the group (Note: This doesn't mean the contacts in the group are private, just the group and group memberships are private). If you're an admin, you can make it public so all users can see the group (again, this won't impact contact permissions) or assign the group to another user. If you're using the teams feature, you can limit group access to only members of specific teams.

TeamIds Array of Uids Default: []

If you passed Team as the sharing option, you must also pass at least one TeamId so we know which team(s) can see this group.

Response
{
"GroupId": "3985446500629725774470024161676"
}

Edit a group

This function edits an existing group.

How to call this function
Function name
EditGroup
Parameters
GroupId Uid Required

The Id of the group you want to edit.

Name Text

The name of the group. Group names must be unique, so this can't match an existing group name.

Sharing Enum
Valid options: Public, Private, Teams

Who should be able to see this group? By default, groups are private and can only be seen by the user who creates the group (Note: This doesn't mean the contacts in the group are private, just the group and group memberships are private). If you're an admin, you can make it public so all users can see the group (again, this won't impact contact permissions) or assign the group to another user. If you're using the teams feature, you can limit group access to only members of specific teams.

TeamIds Array of Uids

If you passed Team as the sharing option, you must also pass at least one TeamId so we know which team(s) can see this group.

Response
This function doesn't return anything. If there's no error message returned, that means the call was completed successfully.

Delete a group

This function deletes an existing group.

How to call this function
Function name
DeleteGroup
Parameters
GroupId Uid Required

The Id of the group you want to delete.

Response
This function doesn't return anything. If there's no error message returned, that means the call was completed successfully.

Get a group

This function gets information about an individual group. Note: This doesn't get any information about the contacts in a group. For that, you'll want to get the group memberships.

How to call this function
Function name
GetGroup
Parameters
GroupId Uid Required

The Id of the group you want to retrieve.

Response
{
"GroupId": "3985446500632031617479237473958",
"Name": "VIP Clients",
"Sharing": "Public",
"TeamIds": [
"3985446500634337460488451410317",
"3985446500634337460488452707498",
"3985446500634337460488451257226"
]
}

List all groups

This function gets a list of all your groups. Note: This doesn't get any information about the contacts in each group. For that, you'll want to get the group memberships.

How to call this function
Function name
GetGroups
Parameters
ReturnNumberOfContacts Bool Default: false

If set to true, will also return the number of contacts in each group. This will make the query significantly slower, so only use if you need the extra information.

MaxNumberOfResults Number Default: 500

How many results should be returned from a single API call? The max value is 10,000. If you need to return more results, call this API function again, but increment the Page parameter.

Page Number Default: 1

If there are more results than MaxNumberOfResults, you can call this function again with an incremented Page value to get the next page of results. For example, if there are 700 results, but you're only requesting 500 at a time, you could call this function with Page=2 to get the remaining 200 results.

Response
{
"HasMoreResults": false,
"Results": [
{
"GroupId": "3985446500636643303497666135546",
"Name": "VIP Clients",
"Sharing": "Public",
"TeamIds": [
"3985446500636643303497665130180",
"3985446500636643303497666448368",
"3985446500636643303497665702241"
]
},
{...},
{...}
]
}