“Clients” Endpoints - PUT Update client

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

Update workspace client.

Note: use /workspaces/{workspace_id}/clients/{client_id}/archive to archive the client and /workspaces/{workspace_id}/clients/{client_id}/restore to restore it.

  • 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/workspaces/{workspace_id}/clients/{client_id}".to_string()).json(&serde_json::json!(\{"name":"string","notes":"string","wid":"integer"\}))  .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

Body

Name Type Description
name string Client name
notes string -
wid integer Workspace ID

Response

200

Name Type Description
archived boolean IsArchived is true if the client is archived
at string When was the last update
creator_id integer CreatorID is the ID of the user who created the client
id integer Client ID
integration_ext_id string The external ID of the linked entity in the external system (e.g. JIRA/SalesForce)
integration_ext_type string The external type of the linked entity in the external system (e.g. JIRA/SalesForce)
integration_provider string The provider (e.g. JIRA/SalesForce) that has an entity linked to this Toggl Track entity
name string Name of the client
notes string -
permissions string List of authorization permissions for this client.
wid integer Workspace ID

400

Possible error messages:

  • Client name maximum length is {max_client_length}
  • Client name cannot be empty

403

Forbidden

404

Client doesn’t exist in the workspace.

500

Internal Server Error

How do I store external ids of clients with integration_ext_id? I can’t figure otu how to add an id.

Hi there! Let me ask the developers and get back to you :slight_smile:

1 Like

Hi!
These are used to store the IDs of entities of Asana, JIRA and SalesForce when the integrations are in use, so not something you need to set manually. :slight_smile:

Hey nida,
thanks, but I want to set them manually. I want to integrate Monday.com and thus need to store the Element IDs in Toggl. Unfortunately the integration provided by Monday does not suit my needs.

Is there any way to store the ids? I did a valid API Call, to overwrite integration_ext_id, but the id is not stored.

I opened a feature request for this topic here.

1 Like