https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_id}
Update the data for a project user for a given workspace.
- 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}/project_users/{project_user_id}".to_string()).json(&serde_json::json!(\{"labor_cost":"number","labor_cost_change_mode":"string","manager":"boolean","rate":"number","rate_change_mode":"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 |
project_user_id | integer | true | Numeric ID of the project user |
Body
Name | Type | Description |
---|---|---|
labor_cost | number | Labor cost for this project user |
labor_cost_change_mode | string | Labor cost change mode for this project user. Can be “start-today”, “override-current”, “override-all” |
manager | boolean | Whether the user will be manager of the project |
rate | number | Rate for this project user |
rate_change_mode | string | Rate change mode for this project user. Can be “start-today”, “override-current”, “override-all” |
Response
200
Name | Type | Description |
---|---|---|
at | string | When was last modified |
gid | integer | Group ID, legacy field |
group_id | integer | Group ID |
id | integer | Project User ID |
labor_cost | number | null |
labor_cost_last_updated | string | Date for labor cost last updated |
manager | boolean | Whether the user is manager of the project |
project_id | integer | Project ID |
rate | number | null |
rate_last_updated | string | Date for rate last updated |
user_id | integer | User ID |
workspace_id | integer | Workspace ID |
400
Possible error messages:
- Workspace not found
- Missing data
- Invalid project_id
- Invalid user_id
403
User does not have access to this resource.
500
Internal Server Error