> For the complete documentation index, see [llms.txt](https://docs.stellic.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stellic.com/stellic-partner-api/program-enrollments/remove-a-student-s-program-enrollment.md).

# Remove a student's program enrollment

Use this endpoint when a student drops a program or was enrolled in one by mistake. The enrollment and its concentrations are deleted permanently; enrolling again later creates a new enrollment matched to whichever audit applies at that time. To switch programs, enroll the student in the new one first so they always have a program.

## DELETE /planner/enrollment/program/{username}/{program\_id}

>

```json
{"openapi":"3.0.0","info":{"title":"Stellic for Developers","version":"1.0"},"tags":[{"name":"Program Enrollments"}],"servers":[{"url":"https://{institution}.stellic.com/partnerapi/v1","variables":{"institution":{"default":"{institution}","description":"Your institution's Stellic subdomain: the part before `.stellic.com` in the URL you use to sign in. It becomes the host in every request, as in `https://{institution}.stellic.com/partnerapi/v1/...`. Replace the `{institution}` placeholder with your subdomain before sending."}}}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Personal Access Token issued by your Stellic integration partner. Send it as `Authorization: Bearer <token>` on every request. One token per institution; do not share across environments."}},"schemas":{"StudentLinkResponseFailure":{"allOf":[{"$ref":"#/components/schemas/GenericResponseFailure"},{"type":"object","properties":{"identifiers":{"type":"object","properties":{"student_username":{"type":"string"}}}}}]},"GenericResponseFailure":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/planner/enrollment/program/{username}/{program_id}":{"delete":{"tags":["Program Enrollments"],"parameters":[{"name":"username","in":"path","required":true,"description":"Student's Stellic username. Matched exactly; this endpoint does not lowercase or case-normalize the username.","schema":{"type":"string"}},{"name":"program_id","in":"path","required":true,"description":"The program's short name, as sent in your data sync. Matched exactly; case-sensitive.","schema":{"type":"string"}}],"responses":{"200":{"description":"Enrollment removed, or there was no declared enrollment to remove (idempotent). The response body is `{status, errors}`; no `state` object is returned, and it doesn't say whether anything was removed. The background recalculation runs even when there was nothing to remove.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"errors":{"type":"array","items":{"type":"object"}}}}}}},"400":{"description":"Hard validation failure: student doesn't exist or is a test student account, student is archived, program doesn't exist, program is a compliance requirement, student has no default plan, or an enrolled program is a general requirement program.\nNOTE: \"not currently enrolled\" is NOT a 400; DELETE is idempotent and returns 200 in that case.\n\nCommon causes:\n- Student does not exist or is a test student account - returns `No student exists with username: {username}`. Test student accounts are excluded from the lookup, even if the account exists.\n- Student is archived - returns `Student with username {username} is archived`\n- Program does not exist - returns `No program exists with unique identifier: {program_id}`\n- Program is a compliance requirement (compliance requirements are not programs a student can be enrolled in through the API) - returns `Compliance requirements are not available via the API: {program_id}`\n- Student has no default plan - returns `{username} has no default plan`; nothing is removed.\n- An enrolled program is a general requirement program - returns `Universal requirement programs can't be removed through the API: {program_id}`; nothing is removed. If there is no declared enrollment, this guard does not apply and the call returns 200 after path validation succeeds.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/StudentLinkResponseFailure"},{"type":"object","properties":{"identifiers":{"type":"object","properties":{"student_username":{"type":"string"},"program_id":{"type":"string"}}}}}]}}}},"401":{"description":"Missing or invalid Bearer token.\n\nCommon causes:\n- Unauthenticated / invalid token"},"403":{"description":"Your IP address isn't on the allowlist for this endpoint. Contact Stellic to add it; the response includes the `client_ip` Stellic saw.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"client_ip":{"type":"string"}}}}}},"500":{"description":"Unhandled server error. Retry with exponential backoff.\n\nCommon causes:\n- Unhandled server error - returns `Stellic couldn't process your request`"}}}}}}
```

#### What happens after the call

* The enrollment, its concentrations, its diploma links, and its degree progress are deleted right away.
* Exceptions on the removed program's audit, including split-credit exceptions that land in it, are marked removed right away. Exceptions that apply to all course or all shared requirements stay.
* The student's cached audit is invalidated right away, so the next audit or progress view reflects the program removal. General requirements are recalculated separately and may not update on that plan if it is not selected for the background update. The audit can be invalidated again if its general requirements are recalculated.
* The background update selects primary-type plans, or empty-type plans on prospective instances, for general requirement and program order recalculation. These may differ from the student's default plan used for deletion. If your institution uses the pathway experience, auto-applied pathways on the selected plans are re-evaluated after that. This can unapply a pathway and remove unregistered planned courses and requirement slots that belong only to it. Registered course and section enrollments stay. A review lock can restrict a student's own pathway changes; it does not stop this automatic re-evaluation. Re-evaluation may not change the applied pathways. Check the student's plan after the background update to confirm the result.
* The removal appears in the student's activity history shortly after.

#### Notes

* **Deleting a program the student isn't enrolled in returns 200.** The background recalculation still runs. Call `GET` first if you need to know whether anything was removed.
* **Course and section enrollments stay.** Remove them with `DELETE /planner/enrollment/section/{id}` or `PUT /planner/enrollment/course/{username}/{term_id}`.
* **General requirement programs can't be removed.** The platform manages them; leave them out of removal calls.
* **No other program becomes the primary major.** If you remove the primary major, the replacement comes from your data sync.
* **Advisor access isn't refreshed.** If an advisor's access to the student depends on the program, send the student's full profile with `PUT /student/{student_username}/profile/` afterward to refresh it.

#### Related APIs

* [`POST /planner/enrollment/program/{username}/{program_id}`](/stellic-partner-api/program-enrollments/enroll-a-student-in-a-program.md) to enroll the student again.
* [`GET /planner/enrollment/program/{username}/{program_id}`](/stellic-partner-api/program-enrollments/get-a-student-s-program-enrollment.md) to check whether a program is enrolled.
* [`DELETE /planner/enrollment/bulk/program/{username}`](/stellic-partner-api/program-enrollments/remove-several-program-enrollments-at-once.md) to remove every program in one call.
* [`DELETE /planner/enrollment/section/{id}`](/stellic-partner-api/section-enrollment/remove-a-section-enrollment.md) to remove a section enrollment.
* [`PUT /planner/enrollment/course/{username}/{term_id}`](/stellic-partner-api/course-enrollments/replace-a-student-s-course-enrollments-for-a-term.md) to replace a term's course enrollments.
