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

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
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

Path

name type required description
organization_id integer true Numeric ID of the organization
workspace_id integer true Numeric ID of the workspace

Body

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

Response

200

Successful operation.

400

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

Forbidden