# “Organizations” Endpoint - PATCH Bulk update users in an organization

**URL:** <https://community.toggl.com/t/organizations-endpoint-patch-bulk-update-users-in-an-organization/202>\
**Category:** API References\
**Tags:** organization, api, endpoints, patch, bulk-update\
**Created:** [November 22, 2024, 2:31pm UTC](https://community.toggl.com/t/organizations-endpoint-patch-bulk-update-users-in-an-organization/202 "2024-11-22T14:31:25Z")\
**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:** [November 22, 2024, 2:31pm UTC](https://community.toggl.com/t/organizations-endpoint-patch-bulk-update-users-in-an-organization/202/1 "2024-11-22T14:31:25Z")

</div>

```auto
https://api.track.toggl.com/api/v9/organizations/{organization_id}/users

```

Apply changes in bulk to users in an organization (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}/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/organizations/#parameters-4)

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

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

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

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

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

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

OK

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

Possible error messages:

- Missing or invalid organization\_id
- At least one organization user ID must be supplied.
- Organization user IDs must be unique.
- The following organization user IDs do not belong to this organization: ‘…’.
- Cannot remove the paying user with organization user ID=‘…’.
- Cannot remove the organization owner user with organization user ID=‘…’.

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

User is not authorized to delete the organization user
