---
title: "Unassign Role From User"
method: DELETE
path: "/workspaces/{workspace_id}/roles"
tags: ["Workspaces"]
---

# Unassign Role From User

`DELETE /workspaces/{workspace_id}/roles`

Delete a role assignment from a user in a workspace.

Args:
    workspace_id (str): The ID of the workspace.
    email (str): The email of the user to remove the role from.
    organization_id (str): The ID of the organization.
    role (str): The role to remove from the user.
    request (Request): The FastAPI request object.

Returns:
    bool: True if the role assignment was successfully deleted.

Raises:
    HTTPException: If there is an error in the request or the user does not have permission to perform the action.
    HTTPException: If there is an error in updating the user's roles.

## Path parameters

- `workspace_id` string, required

## Query parameters

- `email` string, required
- `organization_id` string, required
- `role` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

## Changes

- **2026-05-02** `6e37373d45fe` — 1 info
  - api tag `Workspaces` added
- **2026-02-13** `72fe88316d15` — 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status
- **2025-10-16** `cd5d8df93daf` — 1 breaking, 1 warning
  - added the new required `query` request parameter `organization_id`
  - deleted the `query` request parameter `org_id`
- **2025-06-27** `e3e84db47198` — 1 breaking, 3 warning, 1 info
  - added the new required `query` request parameter `org_id`
  - deleted the `query` request parameter `organization_id`
  - removed the optional property `detail/items/ctx` from the response with the `422` status
  - removed the optional property `detail/items/input` from the response with the `422` status
  - …1 more

[Change history](https://skmtc.dev/agenta-ai/apis/agenta-api/changes/workspaces/:workspace_id/roles/delete.md)

---

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