“Organizations” Endpoint - PUT Updates an existing organization

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

Updates an existing organization

  • 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::PUT, "https://api.track.toggl.com/api/v9/organizations/{organization_id}".to_string()).json(&serde_json::json!(\{"name":"string"\}))  .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
name string Name of the organization

Response

200

OK

400

Possible error messages:

  • Invalid JSON input
  • Invalid organization ID
  • At least one field is required
  • field ‘name’ cannot be empty
  • organization name too long, maximum length is 140

403

User is not authorized to update the organization