Groupmembers

Add Group Member

post
/api/groups/{id}/members

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
x-session-idstringRequired

Session authentication. The session ID can be provided in any of the following ways: [Cookie: 'session'] [Header: 'x-session-id'] [Query parameter: 'session-id'] [Query parameter: first value of 'state'] [Body property: 'sessionId']

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
chevron-right
201

The newly created group membership

application/json
idstringOptional

The unique identifier for the group membership

groupIdstringOptional

The identifier for the group this member belongs to

userIdstringOptional

The identifier for the user added to the group

userNamestringOptional

The name of the added user

userEmailstringOptional

The email address of the user

isManagerbooleanOptional

Whether or not this user is a manager of the group

post
/api/groups/{id}/members

List Group Members

get
/api/groups/{id}/members

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
x-session-idstringRequired

Session authentication. The session ID can be provided in any of the following ways: [Cookie: 'session'] [Header: 'x-session-id'] [Query parameter: 'session-id'] [Query parameter: first value of 'state'] [Body property: 'sessionId']

Path parameters
idstringRequired

The group id

Responses
get
/api/groups/{id}/members

Update Group Member

put
/api/groups/{id}/members/{memberId}

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
x-session-idstringRequired

Session authentication. The session ID can be provided in any of the following ways: [Cookie: 'session'] [Header: 'x-session-id'] [Query parameter: 'session-id'] [Query parameter: first value of 'state'] [Body property: 'sessionId']

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
put
/api/groups/{id}/members/{memberId}

Remove Group Member

delete
/api/groups/{id}/members/{memberId}

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
x-session-idstringRequired

Session authentication. The session ID can be provided in any of the following ways: [Cookie: 'session'] [Header: 'x-session-id'] [Query parameter: 'session-id'] [Query parameter: first value of 'state'] [Body property: 'sessionId']

Path parameters
idstringRequired

The group id

memberIdstringRequired

The group membership id

Responses
delete
/api/groups/{id}/members/{memberId}

No content

Last updated

Was this helpful?