Reach 360: Groups API

Article Last Updated

This article applies to:

What This API Endpoint Does

With the Groups API you create or delete a group and update a group's name. Admins see these changes reflected on the People tab. You also use this endpoint to retrieve a list of groups or details of a specific group.

Endpoints

  • POST /groups - create a new group
  • GET /groups - list groups
  • GET /groups/{groupId} - get details of a group by group id
  • PUT /groups/{groupId} - update a group by group id
  • DELETE /groups/{groupId} - delete a group by group id

Group Object

  • id (string) - the unique identifier of the group
  • membersUrl (string) - URL to list group's members from the API
  • reportersUrl (string) - URL to list reporters for group from the API
  • managersUrl (string) - URL to list managers for group from the API
  • name (string) - the name of the group
  • url (string) - URL to fetch the group's details from the API

Create Group

POST /groups

Request Parameters (JSON)

  • name (string, required) - the name of the group

Example Response

{ 
 "id": "example-group-id", 
 "membersUrl": "https://api.reach360.com/groups/example-group-id/users",
"reportersUrl": "https://api.reach360.com/groups/example-group-id/reporters",
"managersUrl": "https://api.reach360.com/groups/example-group-id/managers",  "name": "Example Group", "url": "https://api.reach360.com/groups/example-group-id" }

Endpoint-specific Error Codes

  • code: 'duplicate_name' - cannot create group because a group with the specified name already exists

List Groups

GET /groups

Request Parameters (Query String)

  • limit (integer, optional) - the maximum number of results to return in a single response (see Pagination); must be between 1 and 100 (defaults to 50)
  • name (string, optional) - Return groups with the specified name.

Example Response

{ 
 "groups": [ 
   { 
    "id": "example-group-id-1", 
    "membersUrl": "https://api.reach360.com/groups/example-group-id/users",
"reportersUrl": "https://api.reach360.com/groups/example-group-id-1/reporters",
  "managersUrl": "https://api.reach360.com/groups/example-group-id-1/managers",     "name": "Example Group" "url": "https://api.reach60.com/groups/example-group-id-1" }, ... ], "nextUrl": "https://url-for-next-page-of-results" }

Retrieve Group by ID

GET /groups/{groupId}

Example Response

{ 
  "id": "example-group-id", 
  "membersUrl": "https://api.reach360.com/groups/example-group-id/users",
  "reportersUrl": "https://api.reach360.com/groups/example-group-id/reporters",
  "managersUrl": "https://api.reach360.com/groups/example-group-id/managers",   "name": "Example Group" "url": "https://api.reach360.com/groups/example-group-id" }

Endpoint-specific Error Codes

  • group_not_found - cannot retrieve group because group does not exist

Update Group by ID

PUT /groups/{groupId}

Request Parameters (JSON)

  • name (string, required) - the name of the group

Success Response

204 "No Content"

Endpoint-specific error codes:

  • group_not_found - cannot update group because group does not exist
  • read_only_group - cannot make changes to the specified group (Example: you cannot modify the "Everyone" group)

Delete Group by ID

DELETE /groups/{groupId}

Success Response

204 "No Content"

Endpoint-specific error codes:

  • group_not_found - cannot delete group because group does not exist
  • read_only_group - cannot delete the specified group (Example: you cannot modify the "Everyone" group)