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
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
Path
name | type | required | description |
---|---|---|---|
organization_id | integer | true | Numeric ID of the organization |
Body
Name | Type | Description |
---|---|---|
delete | Array of integer | Organization user IDs to be deleted |
Response
200
OK
400
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
User is not authorized to delete the organization user