🚀 Heads up: Our API Docs Have Moved!
We have relocated to Instructure Developer Documentation Portal. 🎉 Please update your bookmarks. This page will automatically redirect after July 1, 2026.

Cohort Members API

List, add and remove the people in a cohort.

A CohortMembership object looks like:

// One person's place in one cohort.
{
  // the ID of the membership
  "id": 9001,
  // the cohort the membership belongs to
  "cohort_id": 4002,
  // the member
  "user_id": 17,
  // the root account of the cohort
  "root_account_id": 1,
  // the status of the membership
  "workflow_state": "active",
  // the SIS import that last touched the membership, if any
  "sis_batch_id": 12,
  // when the user was added
  "created_at": "2026-01-15T10:00:00Z",
  // when the membership was last updated
  "updated_at": "2026-01-15T10:00:00Z",
  // the member's latest request in this root account; null without the view
  // analytics permission
  "last_activity_at": "2026-01-20T08:30:00Z",
  // whether the member leads this cohort or one of its ancestors
  "is_leader": false,
  // the member's active institutional tags visible from the cohort's account, as
  // id and name; empty unless institutional tags are enabled and the caller can
  // view them
  "institutional_tags": [{"id":5,"name":"Honors"}],
  // the member's role in this cohort as id and label: the cohort role they lead
  // this cohort or one of its ancestors with, or Member with a null id. A member
  // leading through several assignments gets the one on the nearest cohort, and
  // the earliest assignment there
  "role": {"id":12,"label":"Cohort Leader"},
  // the member's display fields: id, name, sortable_name, short_name, email (null
  // without read_email_addresses), sis_user_id (null without read_sis or
  // manage_sis), login_id (null without view_user_logins), time_zone (a Rails
  // time zone name), last_login (null without the view analytics permission),
  // account_status (active, suspended or deleted, from logins in this root
  // account), and avatar_url when avatars are enabled
  "user": {"id":17,"name":"Dana Okafor","sortable_name":"Okafor, Dana","short_name":"Dana","email":"dana@example.com","sis_user_id":"S17","login_id":"dana","time_zone":"Mountain Time (US \u0026 Canada)","last_login":null,"account_status":"active"}
}

A CohortMemberEnrollment object looks like:

// One course enrollment of a cohort member.
{
  // the ID of the enrollment
  "id": 301,
  // the enrolled user
  "user_id": 17,
  // the course
  "course_id": 55,
  // the section
  "course_section_id": 71,
  // the root account of the enrollment
  "root_account_id": 1,
  // the base enrollment type
  "type": "StudentEnrollment",
  // the name of the enrollment role
  "role": "StudentEnrollment",
  // the ID of the enrollment role
  "role_id": 3,
  // the date-aware state of the enrollment: a started or invited enrollment reads
  // completed once its course, term or section dates have passed, and
  // pending_active or pending_invited before they begin
  "enrollment_state": "active",
  // when the enrollment was created
  "created_at": "2026-01-15T10:00:00Z",
  // when the enrollment was last updated
  "updated_at": "2026-01-15T10:00:00Z",
  // the member's latest activity in the course; null when there is none
  "last_activity_at": "2026-01-20T08:30:00Z",
  // the course as id and name
  "course": {"id":55,"name":"Biology 101"}
}

List cohort members CohortMembersController#index

GET /api/v1/accounts/:account_id/cohorts/:cohort_id/members

Scope: url:GET|/api/v1/accounts/:account_id/cohorts/:cohort_id/members
Return the memberships of a cohort, newest first. Paginated.

Request Parameters:

Parameter Type Description
workflow_state[] string Which memberships to return. Repeat to pass several states. all returns both active and deleted. Defaults to active.

Allowed values: active, deleted, all

sort string The field to sort by. Defaults to created_at. user_name and user_sortable_name sort on the member's user. last_activity_at sorts on the member's latest login activity in the root account, with no activity last in either order, and requires the view analytics permission.

Allowed values: created_at, user_name, user_sortable_name, last_activity_at

order string The sort direction. Defaults to desc.

Allowed values: asc, desc

search_term string A partial, case-insensitive match against the member's name, sortable name or short name, and in the cohort's root account against SIS ID when the caller can read SIS data, email when the caller can read email addresses, and login ID when the caller can view logins. Must be at least 2 characters.
include_descendants boolean Also return the memberships of active cohorts beneath this one. Each row is one membership, so a user in several cohorts appears once per cohort. Defaults to false.
Returns a list of CohortMembership objects

List a user's cohorts CohortMembersController#user_index

GET /api/v1/users/:user_id/cohort_memberships

Scope: url:GET|/api/v1/users/:user_id/cohort_memberships
List the active cohorts that a user is a member or a leader of, ordered by cohort name. Paginated. A cohort appears once even when the user is both. role is the user's own leader role on that cohort, or Member when they only belong to it; leadership inherited from a parent cohort is not repeated on the cohorts beneath it. Only cohorts the caller can view are listed. The caller needs manage_cohorts_view on an account or a leader assignment; otherwise 403. 404 when the caller can see none of the user's cohorts and cannot view the user.

Request Parameters:

Parameter Type Description
per_page integer The number of cohorts per page. See the pagination section of the API documentation.

Example Response:

[{ "cohort_id": 4002, "user_id": 901, "root_account_id": 1, "is_member": true, "is_leader": false, "role": { "id": null, "label": "Member" }, "cohort": { "id": 4002, "name": "Internal Medicine", ... } }]

Add members to a cohort CohortMembersController#create

POST /api/v1/accounts/:account_id/cohorts/:cohort_id/members

Scope: url:POST|/api/v1/accounts/:account_id/cohorts/:cohort_id/members
Add existing users to a cohort. Ids that cannot be added are reported under skipped. Skip reasons are already_member, user_not_found, user_not_in_root_account and not_in_leader_scope. A cohort leader without an account grant can only add users who already belong to the cohort subtree they lead, and every id outside that subtree is reported as not_in_leader_scope.

Request Parameters:

Parameter Type Description
user_ids[] Required integer The users to add, 1 to 100 ids. Each user needs an active login in the cohort's root account. Repeated ids are added once.

Example Response:

{ "added": [CohortMembership], "skipped": [{ "user_id": 18, "reason": "already_member" }] }

Remove a member from a cohort CohortMembersController#destroy

DELETE /api/v1/accounts/:account_id/cohorts/:cohort_id/members/:user_id

Scope: url:DELETE|/api/v1/accounts/:account_id/cohorts/:cohort_id/members/:user_id
Soft-delete a user's active membership in this cohort. Memberships in child cohorts are not changed. Adding the user again reactivates the same membership.

Request Parameters:

Parameter Type Description
user_id Required integer The member to remove, as a local or global id.
Returns a CohortMembership object

Remove members from a cohort CohortMembersController#bulk_destroy

DELETE /api/v1/accounts/:account_id/cohorts/:cohort_id/members

Scope: url:DELETE|/api/v1/accounts/:account_id/cohorts/:cohort_id/members
Soft-delete the active memberships of several users in this cohort. Memberships in child cohorts and course enrolments are not changed. Adding a user again reactivates the same membership. Ids that cannot be removed are reported under skipped. Skipped entries repeat the id as it was sent; a numeric id comes back as an integer. Skip reasons are not_a_member and user_not_found.

Request Parameters:

Parameter Type Description
user_ids[] Required string The users to remove, 1 to 100 ids. Each is a local or global id, "self", or an SIS id such as sis_user_id:abc, as in other Canvas APIs. Repeated references to one user remove it once.

Example Response:

{ "removed": [CohortMembership], "skipped": [{ "user_id": 18, "reason": "not_a_member" }] }

List a cohort member's enrollments CohortMembersController#enrollments

GET /api/v1/accounts/:account_id/cohorts/:cohort_id/members/:user_id/enrollments

Scope: url:GET|/api/v1/accounts/:account_id/cohorts/:cohort_id/members/:user_id/enrollments
Return the course enrollments of one active cohort member in the courses of the cohort's account and its sub-accounts, newest first. Paginated. Responds 404 when the user is not an active member of the cohort.

Request Parameters:

Parameter Type Description
state[] string Which enrollment states to return, matched against the date-aware state that enrollment_state reports. Repeat to pass several states. Defaults to all eight.

Allowed values: active, invited, pending_active, pending_invited, creation_pending, completed, inactive, rejected

user_id Required string The member, as a local or global id, shard~id, self, or an SIS id such as sis_user_id:abc, as in other Canvas APIs.
Returns a list of CohortMemberEnrollment objects