v1

latestOpenAPI 3.1.0MIT2026-07-243952451019.0 KB
Courses::Enrollment

List Enrollments

List enrollments for a course

get/courses/{course_id}/enrollments

Path parameters

course_idinteger required

Query parameters

afterstring

ID of item after which the collection should be returned. More examples and info about pagination in our guides.

sort_order'asc' | 'desc'

Sort order of a list response. Use 'desc' to reverse the default 'asc' (ascending) sort order. Examples in our guides.

sort_property'id' | 'updated_at'

Sort property of a list response. The default is id and thus the created_at order. If you sort by other properties, we additionally sort by id implicitly as a secondary sort property, so that you can rely on the sort order to be deterministic even if the main sort property ends up with the same values.

contact_idstring

A comma-separated list of contact IDs to filter by.

idstring

A comma-separated list of enrollment IDs to filter by.

Filter by available properties in query params, like this: api/v2/resources?filter[id]=value&filter[another_property]=value1,value2. Check our Filtering guide for examples and all about filtering here.

{
  "contact_id": "1,42",
  "id": "1,2,3"
}

Response

OK

idinteger

Enrollment ID

public_idstring nullable

Enrollment public ID

contact_idinteger

Contact ID

course_idinteger

Course

created_atstring date-time nullable

Added

updated_atstring date-time nullable

Updated

suspendedboolean nullable

Suspended

suspension_reasonstring nullable

Suspension Reason

current_pathstring nullable

Current Path

origination_source_typestring nullable

Origination Source Type

origination_source_idinteger

Origination Source ID

Example response

[
  {
    "id": 1,
    "public_id": "kvqOCw",
    "contact_id": 3,
    "course_id": 2,
    "created_at": "2025-01-01T00:00:00.000Z",
    "updated_at": "2025-01-01T00:00:00.000Z",
    "suspended": false,
    "suspension_reason": "Call in to reapply after robot incident",
    "current_path": "/enrollments/17cadca5ec21c9c4aede396f1e2104138b4897e43a1a974026bd0fb407556d2c65",
    "origination_source_type": "Membership",
    "origination_source_id": 3,
    "contact": {
      "$ref": "#/components/schemas/ContactShortAttributes/example"
    }
  }
]