Groupmembers

Add Group Member

post

Add a user to the group members. Only administrators and managers of the group are allowed to perform this action. If attempted to add a user multiple times to a group, nothing will happen and their original membership record will be returned.

Example:

  curl -X POST -H "X-Session-ID: 0123456789" -H "Content-Type: application/json" --data @data.json "https://lor.instructure.com/api/groups/1234/members"
  data.json:
  {
    "userId": "4LjxagScJoIlBACBRTI1XLXzCtTRn1CPDBLhWPEP:canvas-lmsf1ca849dd34eaef8040de8ffa7fe7fd5983e57e2",
    "isManager": true
  }
Authorizations
Path parameters
idstringRequired

The group id

Body
userIdstringOptional

The identifier for the user to add to the group

isManagerbooleanOptional

Whether or not this user is a manager of the group

Responses
201
The newly created group membership
application/json
post
POST /api/groups/{id}/members HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 121

{
  "userId": "4LjxagScJoIlBACBRTI1XLXzCtTRn1CPDBLhWPEP:canvas-lmsf1ca849dd34eaef8040de8ffa7fe7fd5983e57e2",
  "isManager": true
}
{
  "id": "text",
  "groupId": "text",
  "userId": "text",
  "userName": "text",
  "userEmail": "text",
  "isManager": true
}

List Group Members

get

Gets a list of all the members in the group. Only Administrators and group managers are allowed to perform this action.

Example: curl -H "X-Session-ID: 0123456789" "https://lor.instructure.com/api/groups/1234/members"

Authorizations
Path parameters
idstringRequired

The group id

Responses
200
An array of the group members
application/json
get
GET /api/groups/{id}/members HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Accept: */*
{
  "items": [
    {
      "id": "text",
      "groupId": "text",
      "userId": "text",
      "userName": "text",
      "userEmail": "text",
      "isManager": true
    }
  ]
}

Update Group Member

put

Update a member of the group by membership id. Can be used to change group managers. Only Administrators and group managers are allowed to perform this action. A manager cannot update their own management status.

Example:

  curl -X PUT -H "X-Session-ID: 01234567890" -H "Content-Type: application/json" --data @data.json "https://lor.instructure.com/api/groups/1234/members/56789"```
  data.json:
  {
    "isManager": true
  }
Authorizations
Path parameters
idstringRequired

The group id

memberIdstringRequired

The group membership id

Body
isManagerbooleanOptional

Whether or not this user is a manager of the group

Responses
200
The updated group membership
application/json
put
PUT /api/groups/{id}/members/{memberId} HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 18

{
  "isManager": true
}
{
  "id": "text",
  "groupId": "text",
  "userId": "text",
  "userName": "text",
  "userEmail": "text",
  "isManager": true
}

Remove Group Member

delete

Removes a member from the group by membership id. Only Administrators and group managers are allowed to perform this action. A manager cannot remove themself from the group.

Example: curl -X DELETE -H "X-Session-ID: 01234567890" "https://lor.instructure.com/api/groups/1234/members/56789"

Authorizations
Path parameters
idstringRequired

The group id

memberIdstringRequired

The group membership id

Responses
204
No Content
delete
DELETE /api/groups/{id}/members/{memberId} HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Accept: */*

No content

Last updated

Was this helpful?