The API is included on the Business plan. See plans.
A role object is one role in a group, with its name, its permissions, and its benefits. Roles are read only: admins create and edit roles in Heylo. To read or change who holds a role, see role members.
Operations
- Fetch roles:
POST https://api.heylo.com/apiv1-fetchwithtypeset to"communityRoles"
Role object
A field with no value is left out.
Attributes
benefits(object): what members with the role receive.eventDiscountPercent(number): the share taken off paid event prices, from0to1, so0.2is 20% off.paidMembershipExempt(boolean):truewhen members with the role do not pay for membership.
color(string): the color of the role's badge.communityId(string): the ID of the group the role belongs to.description(string): the role description.icon(string): the name of the role's icon.id(string): the unique ID of the role.name(string): the role name.networkId(string): the ID of the organization the role belongs to, for a role shared across an organization's groups.permissions(object): what members with the role can do. Each permission istruewhen granted and left out otherwise.admin(boolean): full admin permissions.announcements(boolean): send announcements and blasts.approveJoinRequests(boolean): view and manage join requests.benefitsWrite(boolean): create, edit, and remove benefits.checkInsRead(boolean): see event check-in counts and leaderboards.eventsCreate(boolean): create and manage their own events.eventsWrite(boolean): manage all events.invitesCreate(boolean): invite others to the group or to an event.memberInsightsRead(boolean): view member questionnaire responses.membersWrite(boolean): manage all members.pagesWrite(boolean): create, edit, and remove links.topicsCreate(boolean): create and moderate their own chats.topicsWrite(boolean): manage all chats.
roleType(string):"admin","member", or"custom". Roles an admin creates are"custom".
json
{
"benefits": {"eventDiscountPercent": 0.2},
"communityId": "HEYLO_GROUP_ID",
"description": "Leads the Saturday long run.",
"id": "HEYLO_ROLE_ID",
"name": "Pace leader",
"permissions": {"checkInsRead": true, "eventsCreate": true},
"roleType": "custom"
}
Fetch roles
Returns every role in a group.
POST https://api.heylo.com/apiv1-fetch
Parameters
communityId(string, required): the group ID.type(string, required):"communityRoles".
Returns
roles(array): the group's role objects.
bash
curl -X POST https://api.heylo.com/apiv1-fetch \
-H "Authorization: Bearer HEYLO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"communityId": "HEYLO_GROUP_ID", "type": "communityRoles"}'
json
{
"roles": [
{
"communityId": "HEYLO_GROUP_ID",
"id": "HEYLO_ROLE_ID",
"name": "Pace leader",
"roleType": "custom"
}
]
}