"Clients" Endpoints - POST Archives client

https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/clients/{client_id}/archive

Archives a workspace client and related projects. Only for premium workspaces.

  • 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::POST, "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/clients/{client_id}/archive".to_string())  .header(CONTENT_TYPE, "application/json")  .send()  .await?  .json()  .await?;    println!("{:#?}", json);  Ok(())}

Parameters

Path

name type required description
workspace_id integer true Numeric ID of the workspace
client_id integer true Numeric ID of the client

Response

200

Projects that were archived with the client

Name Type Description
items Array of integer -

403

Forbidden

404

No client with ID {client_id} was found

500

Internal Server Error