Update enrollment
Toggles a student's enrollment in a class between Active and Inactive. Teachers cannot create or delete enrollments here - only the student or parent can initiate those.
PATCH
/++update_enrollment
Classes & Enrollment
Authentication
Requires an authenticated (logged-in) account. Also requires a registered Integrator subscription.
This endpoint requires the calling application to be registered as an Integrator. Every call must identify the registration via a registration_id parameter (or an X-Client-Id header), and authenticate using one of the following methods, selected with the subscription_method parameter:
-
referer— The request's HTTP Referer header must match one of the domains authorized for this Integrator registration. -
ip— The request's source IP address must match one of the IP addresses authorized for this Integrator registration. -
client_token— A client token issued at registration time is supplied with the request.
Register as an Integrator and configure authorized domains, IP addresses, or a client token.
Request
Content type: application/json
| Name | In | Type | Required | Description |
|---|---|---|---|---|
BODY | body | string | No | — |
class_id | body | string | No | — |
enrollment_id | body | string | No | — |
status | body | string | No | — |
assignments | body | string | No | Sent by the web client (found via frontend call-site tracing). |
classes | body | string | No | Sent by the web client (found via frontend call-site tracing). |
default | body | string | No | Sent by the web client (found via frontend call-site tracing). |
quizzes | body | string | No | Sent by the web client (found via frontend call-site tracing). |
assignment_id | query | string | No | Sent by the web client (found via frontend call-site tracing). |
id | query | string | No | Sent by the web client (found via frontend call-site tracing). |
mode | query | string | No | Sent by the web client (found via frontend call-site tracing). |
quiz_id | query | string | No | Sent by the web client (found via frontend call-site tracing). |
Example request body
{
"BODY": "example_value",
"class_id": "12345",
"enrollment_id": "12345",
"status": "published",
"assignments": "example_value",
"classes": "example_value",
"default": "example_value",
"quizzes": "example_value"
}
Responses
| Status | Meaning |
|---|---|
200 | Successful response. |
400 | Invalid JSON body. |
404 | Enrollment not found |
409 | Enrollment not found |
500 | Unknown error |
401 | Unauthorized - missing or invalid Integrator authentication (registration_id/X-Client-Id, plus referer/IP/client_token). |
403 | Forbidden - the current user or Integrator registration does not have sufficient permissions. |
Example response (illustrative - field names only, values are placeholders)
{
"id": "12345",
"status": "published"
}
