# “Workspaces” Endpoints - PATCH Changes the users in a workspace

**URL:** <https://community.toggl.com/t/workspaces-endpoints-patch-changes-the-users-in-a-workspace/338>\
**Category:** API References\
**Tags:** workspace, api, endpoints, patch\
**Created:** [December 2, 2024, 12:20pm UTC](https://community.toggl.com/t/workspaces-endpoints-patch-changes-the-users-in-a-workspace/338 "2024-12-02T12:20:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Support](https://yyz2.discourse-cdn.com/flex012/user_avatar/community.toggl.com/support/32/1577_2.png) [@Support](https://community.toggl.com/u/Support)\
**Post date:** [December 2, 2024, 12:20pm UTC](https://community.toggl.com/t/workspaces-endpoints-patch-changes-the-users-in-a-workspace/338/1 "2024-12-02T12:20:38Z")

</div>

```auto
https://api.track.toggl.com/api/v9/organizations/{organization_id}/workspaces/{workspace_id}/workspace_users

```

Changes the users in a workspace (currently deletion only).

- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust

```auto
extern crate tokio;extern crate serde_json;use reqwest::{Client};use reqwest::header::{CONTENT_TYPE};#[tokio::main]async fn main() -> Result<(), reqwest::Error> { let client = Client::new().basic_auth("<email>", "<password>"); let json = client.request(Method::PATCH, "https://api.track.toggl.com/api/v9/organizations/{organization_id}/workspaces/{workspace_id}/workspace_users".to_string()).json(&serde_json::json!(\{"delete":[\{\}]\})) .header(CONTENT_TYPE, "application/json") .send() .await? .json() .await?; println!("{:#?}", json); Ok(())}

```

### Parameters[​](https://engineering.toggl.com/docs/api/workspaces/#parameters-2)

#### Path[​](https://engineering.toggl.com/docs/api/workspaces/#path-2)

| name | type | required | description |
| --- | --- | --- | --- |
| organization\_id | integer | true | Numeric ID of the organization |
| workspace\_id | integer | true | Numeric ID of the workspace |

#### Body[​](https://engineering.toggl.com/docs/api/workspaces/#body-1)

| Name | Type | Description |
| --- | --- | --- |
| delete | Array of integer | Workspace user IDs to be deleted |

### Response[​](https://engineering.toggl.com/docs/api/workspaces/#response-2)

#### 200[​](https://engineering.toggl.com/docs/api/workspaces/#200-2)

Successful operation.

#### 400[​](https://engineering.toggl.com/docs/api/workspaces/#400-1)

Possible error messages:

- JSON is not valid
- At least one workspace user ID must be supplied.
- Workspace user IDs must be unique"
- Wrong workspace user IDs

#### 403[​](https://engineering.toggl.com/docs/api/workspaces/#403-2)

Forbidden
