> 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/check-whether-a-tag-is-attached-to-a-student.md).

# Check whether a tag is attached to a student

Use this endpoint to check whether a student has a tag before you attach or detach it. It returns 200 with all of the student's tags, by name, when the tag is attached, and a 400 `No student tag exists for student {student_username} and tag {tag_sis_id}` when it isn't. `{tag_sis_id}` matches either the tag's SIS ID or its name, exactly.

## GET /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"}}}}},"paths":{"/student/{student_username}/tags/{tag_sis_id}":{"get":{"tags":["Student"],"parameters":[{"name":"student_username","in":"path","required":true,"description":"Send the student's username with its stored casing. The endpoint does not lowercase it;\ndo not assume matching ignores case. 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. A `200` means the tag is\nattached; a `400` means it isn't.\n","schema":{"type":"string"}}],"responses":{"200":{"description":"Tag is attached to the student. `state.tags` is the student's full current tag list, returned by tag `name` (not `sis_id`), regardless of which tag you queried.","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"}}}}}}}}}}}
```

#### Notes

* **The 400 body doesn't list the student's tags.** Only the 200 does.
* **Send the username with its stored casing.** The endpoint does not lowercase it; do not assume matching ignores case. Archived students return `Student with username {student_username} is archived`.

#### Related APIs

* [`POST /student/{student_username}/tags/{tag_sis_id}`](/stellic-partner-api/student/attach-a-tag-to-a-student.md) to attach the tag.
* [`DELETE /student/{student_username}/tags/{tag_sis_id}`](/stellic-partner-api/student/detach-a-tag-from-a-student.md) to detach it.
