> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vertracloud.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Remove Workspace Member

> Removes a member from an workspace by their user ID.

<ParamField path="id" type="string" required>
  The ID of the workspace to remove the member from.
</ParamField>

<ParamField path="userId" type="string" required>
  The ID of the user to remove from the workspace.
</ParamField>

### Response

<ResponseExample>
  ```json Response theme={null}
  {}
  ```
</ResponseExample>

### Error Responses

<ResponseField name="code" type="string">
  The error code indicating the reason for failure. Possible values:

  * `UNAUTHORIZED`: The user is not authenticated.
  * `ONLY_OWNER_CAN_REMOVE_MEMBERS`: Only the workspace owner can remove members.
  * `CANNOT_REMOVE_OWNER`: The workspace owner cannot be removed.
  * `MEMBER_NOT_FOUND`: The specified user does not exist.
  * `MEMBER_NOT_FOUND_IN_ORGANIZATION`: The user is not a member of the workspace.
  * `ORG_ID_MUST_BE_STRING`: The provided workspace\_id is not a string.
  * `USER_ID_MUST_BE_STRING`: The provided user ID is not a string.
</ResponseField>

<ResponseField name="message" type="string">
  A descriptive message providing additional details about the error.
</ResponseField>

<ResponseExample>
  ```json Error Response (403) theme={null}
  {
    "code": "UNAUTHORIZED"
  }
  ```

  ```json Error Response (403) theme={null}
  {
    "code": "ONLY_OWNER_CAN_REMOVE_MEMBERS"
  }
  ```

  ```json Error Response (404) theme={null}
  {
    "code": "MEMBER_NOT_FOUND"
  }
  ```
</ResponseExample>
