> 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-several-program-enrollments-at-once.md).

# Remove several program enrollments at once

Use this endpoint to remove every program a student is enrolled in on their default plan, for example when a student withdraws or before you re-declare programs from your system of record. Certified programs are removed too. General requirement programs are skipped, but the recalculation that follows can remove any the student had because of a removed program.

## DELETE /planner/enrollment/bulk/program/{username}

>

```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."}}},"paths":{"/planner/enrollment/bulk/program/{username}":{"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 value. Archived students return `Student with username {username} is archived`; test accounts return the same `No student exists with username: {username}` as a missing user.","schema":{"type":"string"}}],"responses":{"200":{"description":"Every enrolled program on the student's default plan was removed, including certified ones, or there was nothing to remove (idempotent). General requirement programs are skipped, but the recalculation that follows can remove any the student had because of a removed program. The body is `{status, errors}`; `errors` is always an empty array, and the response doesn't say what was removed. The background recalculation runs even when nothing was removed.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"errors":{"type":"array","description":"Always an empty array.","items":{"type":"object"}}}}}}},"400":{"description":"Student lookup failure or missing default plan. The response body is `{\"status\": \"failure\", \"identifiers\": {\"student_username\": \"...\"}, \"message\": \"...\"}` (single string, no `errors` array).\n\nCommon causes:\n- Student does not exist, or is a test account - returns `No student exists with username: {username}`\n- Student is archived - returns `Student with username {username} is archived`\n- Student has no default plan - returns `{username} has no default plan` before anything is removed","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"identifiers":{"type":"object","properties":{"student_username":{"type":"string"}}},"message":{"type":"string"}}}}}},"401":{"description":"Missing or invalid Bearer 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 error while removing the enrollments; nothing is removed. The response body is `{\"identifiers\": {\"student_username\": \"...\"}, \"errors\": [{\"message\": \"Stellic couldn't process your request\"}], \"status\": \"failure\"}`. Retry with exponential backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"identifiers":{"type":"object","properties":{"student_username":{"type":"string"}}},"errors":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}}}},"status":{"type":"string"}}}}}}}}}}}
```

#### What happens after the call

* All enrolled programs are deleted in one transaction, with their concentrations and diploma links. If a deletion fails, the call returns a 500 and nothing is removed. If the student has no default plan, nothing is removed; ask your Stellic Representative to restore it before retrying.
* Exceptions on the removed programs' audits are marked removed, with the reason `System: student was removed from the associated program`.
* The student's cached audit is invalidated right away for the program removals. The background recalculation also invalidates the cached audit for affected plans, so an audit read before it finishes may not reflect the recalculated general requirements.
* General requirements and program order are recalculated in a background task. If your institution uses the pathway experience, auto-applied pathways are re-evaluated after that.
* One removal per program and per diploma link appears in the student's activity history shortly after.

#### Notes

* **The 200 response doesn't say what was removed.** `errors` is always empty in a successful response, and a student with a default plan but no programs also gets this response. To keep a record, read each program with `GET` before calling this.
* **Course and section enrollments stay.** Remove them with `DELETE /planner/enrollment/section/{id}` or `PUT /planner/enrollment/course/{username}/{term_id}`.

#### Related APIs

* [`DELETE /planner/enrollment/program/{username}/{program_id}`](/stellic-partner-api/program-enrollments/remove-a-student-s-program-enrollment.md) to remove one program.
* [`POST /planner/enrollment/program/{username}/{program_id}`](/stellic-partner-api/program-enrollments/enroll-a-student-in-a-program.md) to re-declare programs afterward.
* [`PUT /student/{student_username}/state/`](/stellic-partner-api/student/archive-or-restore-a-student.md) to archive the student after a withdrawal.
* [`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.
