> 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/student/detach-a-tag-from-a-student.md).

# Detach a tag from a student

Use this endpoint to remove one tag from a student. `{tag_sis_id}` matches either the tag's SIS ID or its name, exactly. The tag itself isn't deleted, so other students keep it. The response lists the student's remaining tags by name.

## DELETE /student/{student\_username}/tags/{tag\_sis\_id}

>

```json
{"openapi":"3.0.0","info":{"title":"Stellic for Developers","version":"1.0"},"tags":[{"name":"Student"}],"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":{"StudentTagResponseSuccess":{"type":"object","description":"Standard tag-operation success envelope. `state.tags` is the student's full current tag list after the operation,\nby tag display name (not SIS ID).\n","properties":{"status":{"type":"string"},"state":{"type":"object","properties":{"username":{"type":"string"},"tags":{"type":"array","description":"The student's full current tag list after the operation, by tag display name (not SIS ID).\n","items":{"type":"string"}}}}}},"StudentTagResponseFailure":{"allOf":[{"$ref":"#/components/schemas/GenericResponseFailure"},{"type":"object","properties":{"identifiers":{"type":"object","properties":{"student_username":{"type":"string"},"tag_sis_id":{"type":"string"}}}}}]},"GenericResponseFailure":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"}}},"StudentTagResponse500":{"type":"object","description":"Unhandled server-error envelope for the tag endpoints. Note the missing `status` key: 400 responses\ncarry `status: \"failure\"` and a singular `message`, but 500 responses on this path are an array of\nobjects with no `status` key.\n","properties":{"identifiers":{"type":"object","properties":{"student_username":{"type":"string"},"tag_sis_id":{"type":"string"}}},"errors":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}}}}}}}},"paths":{"/student/{student_username}/tags/{tag_sis_id}":{"delete":{"tags":["Student"],"parameters":[{"name":"student_username","in":"path","required":true,"description":"The student's username, matched exactly (not lowercased). Stored usernames are usually\nlowercase. Archived students return `Student with username {student_username} is archived`;\ntest accounts return the same `No student exists with username: {student_username}` as a\nmissing user.\n","schema":{"type":"string"}},{"name":"tag_sis_id","in":"path","required":true,"description":"The tag's SIS ID or name, matched exactly, among the student's tags. If several of the\nstudent's tags match, all of them are removed.\n","schema":{"type":"string"}}],"responses":{"200":{"description":"Tag detached. `state.tags` is the student's remaining tag list after the detach.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudentTagResponseSuccess"}}}},"400":{"description":"Lookup failure. Envelope is `{\"status\": \"failure\", \"identifiers\": {\"student_username\": ..., \"tag_sis_id\": ...}, \"message\": \"...\"}` (single string, no `errors` array).\n\nCommon causes:\n- Student not found or test account - returns `No student exists with username: {student_username}`\n- Student archived - returns `Student with username {student_username} is archived`\n- Tag is not attached to this student - returns `No student tag exists for student {student_username} and tag {tag_sis_id}`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudentTagResponseFailure"}}}},"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 server error during the detach. Envelope is `{\"identifiers\": {...}, \"errors\": [{\"message\": \"Stellic couldn't process your request\"}]}` with no `status` key, different from the 400 shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudentTagResponse500"}}}}}}}}}
```

#### What happens after the call

* The tag is removed right away, including a copy that transfer credit processing attached. If several of the student's tags match `{tag_sis_id}`, all of them are removed.
* Audits, student sets, advisor access, search, general requirements, and pathways are updated the same way as when [a tag is attached](/stellic-partner-api/student/attach-a-tag-to-a-student.md#what-happens-after-the-call). Student set, advisor access, and search updates run in background tasks after the tag removal is saved. After general requirements are refreshed, the audit may be recalculated again on a later read, even if it was read just after the call.

#### Notes

* **Removing a tag that isn't attached returns a 400.** `No student tag exists for student {student_username} and tag {tag_sis_id}`. Treat that message as success if you retry.
* **Your data sync can put the tag back.** If your data sync sends student tags and still lists this one, it's attached again on the next run.
* **Usernames must match exactly** and aren't lowercased. Archived students return `Student with username {student_username} is archived`.

#### Related APIs

* [`DELETE /student/{student_username}/bulk/tags`](/stellic-partner-api/student/detach-all-tags-from-a-student.md) to remove all of a student's tags.
* [`POST /student/{student_username}/tags/{tag_sis_id}`](/stellic-partner-api/student/attach-a-tag-to-a-student.md) to attach a tag.
