---
title: "Unassign User from Role"
method: DELETE
path: "/users/{userId}/site-roles"
tags: ["Users"]
---

# Unassign User from Role

`DELETE /users/{userId}/site-roles`

Use this endpoint to remove a Role from a User.

## Request body

- object
  - `site_id` string, required — Identifier of the site from which the role should be removed. Only the assignment at this site is revoked; the user's roles at other sites are unaffected.
  - `role_id` string, required — Identifier of the role to revoke. Must match a role currently assigned to the user at the given `site_id`; no-op if the user does not hold this role at this site.

## Response `204`

The role was successfully removed.

## Other responses

- `400` — The request didn't pass validation
- `401` — The user is unauthenticated
- `403` — The authenticated user does not have permission.
- `404` — The resource couldn't be found
- `422` — The request didn't pass validation

---

[API](https://skmtc.dev/try/apis/trybe-api.md) · [All operations](https://skmtc.dev/try/apis/trybe-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/try/trybe-api/revisions/f37f92702da5/schema)
