“Groups” Endpoints - POST Adds group to project

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

Adds group to project for 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::POST, "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_groups".to_string()).json(&serde_json::json!(\{"group_id":"integer","project_id":"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

Body

Name Type Description
group_id integer Group ID
project_id integer Project ID

Response

200

Successful operation.

403

User does not have access to this resource.

500

Internal Server Error