Projects
GET Get workspace projects users
https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users
List all projects users for a given workspace.
- cURL
 - Go
 - Ruby
 - JavaScript
 - Python
 - Rust
 
curl  https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users \
  -H "Content-Type: application/json" \
  -u <email>:<password>
req, err := http.NewRequest(http.MethodGet, 
  "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users")
if err != nil {
    print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
req.SetBasicAuth("<email>", "<password>")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
    print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
    print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.path)
req['Content-Type'] = "application/json"
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users", {
  method: "GET",
  headers: {
	"Content-Type": "application/json",
	"Authorization": `Basic ${base64.encode(<email>:<password>)}`
  },
})
.then((resp) => resp.json())
.then((json) => {
  console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.get('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users', headers={'content-type': 'application/json', 'Authorization' : 'Basic %s' %  b64encode(b"<email>:<password>").decode("ascii")})
print(data.json())
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::GET, "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users".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 | 
Query
| name | type | required | description | 
|---|---|---|---|
| project_ids | string | false | Numeric IDs of projects, comma-separated | 
| user_id | string | false | Numeric ID of user, if passed returns only project users for this user's projects | 
| with_group_members | boolean | false | Include group members | 
Response
200
| Name | Type | Description | 
|---|---|---|
| items | Array of object | - | 
items
| 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
 - project_ids cannot exceed 200 elements.
 - Invalid user_id
 
403
User does not have access to this resource.
500
Internal Server Error
POST Add an user into workspace projects users
https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users
Include a project user for a given workspace.
- cURL
 - Go
 - Ruby
 - JavaScript
 - Python
 - Rust
 
curl -X POST https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users \
  -H "Content-Type: application/json" \
  -d '\{"labor_cost":"number","labor_cost_change_mode":"string","manager":"boolean","project_id":"integer","rate":"number","rate_change_mode":"string","user_id":"integer"\}' \
  -u <email>:<password>
bytes, err := json.Marshal('\{"labor_cost":"number","labor_cost_change_mode":"string","manager":"boolean","project_id":"integer","rate":"number","rate_change_mode":"string","user_id":"integer"\}')
if err != nil {
    print(err)
}
req, err := http.NewRequest(http.MethodPost, 
  "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users", bytes.NewBuffer(bytes))
if err != nil {
    print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
req.SetBasicAuth("<email>", "<password>")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
    print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
    print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
req.body = \{"labor_cost":"number","labor_cost_change_mode":"string","manager":"boolean","project_id":"integer","rate":"number","rate_change_mode":"string","user_id":"integer"\}.to_json
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users", {
  method: "POST",
  body: \{"labor_cost":"number","labor_cost_change_mode":"string","manager":"boolean","project_id":"integer","rate":"number","rate_change_mode":"string","user_id":"integer"\},
  headers: {
	"Content-Type": "application/json",
	"Authorization": `Basic ${base64.encode(<email>:<password>)}`
  },
})
.then((resp) => resp.json())
.then((json) => {
  console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.post('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users', json=\{"labor_cost":"number","labor_cost_change_mode":"string","manager":"boolean","project_id":"integer","rate":"number","rate_change_mode":"string","user_id":"integer"\}, headers={'content-type': 'application/json', 'Authorization' : 'Basic %s' %  b64encode(b"<email>:<password>").decode("ascii")})
print(data.json())
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_users".to_string())
.json(&serde_json::json!(\{"labor_cost":"number","labor_cost_change_mode":"string","manager":"boolean","project_id":"integer","rate":"number","rate_change_mode":"string","user_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 | 
|---|---|---|
| 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 | 
| project_id | integer | Project ID | 
| 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" | 
| user_id | integer | User ID | 
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
 - Invalid project_id
 - Invalid user_id
 - Project user already exists
 
403
User does not have access to this resource.
500
Internal Server Error
PATCH Patch project users from workspace
https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_ids}
Patch a list of project users for a given workspace.
- cURL
 - Go
 - Ruby
 - JavaScript
 - Python
 - Rust
 
curl -X PATCH https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_ids} \
  -H "Content-Type: application/json" \
  -u <email>:<password>
req, err := http.NewRequest(http.MethodGet, 
  "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_ids}")
if err != nil {
    print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
req.SetBasicAuth("<email>", "<password>")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
    print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
    print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_ids}')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Patch.new(uri.path)
req['Content-Type'] = "application/json"
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_ids}", {
  method: "PATCH",
  headers: {
	"Content-Type": "application/json",
	"Authorization": `Basic ${base64.encode(<email>:<password>)}`
  },
})
.then((resp) => resp.json())
.then((json) => {
  console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.patch('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_ids}', headers={'content-type': 'application/json', 'Authorization' : 'Basic %s' %  b64encode(b"<email>:<password>").decode("ascii")})
print(data.json())
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::PATCH, "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_ids}".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 | 
| project_user_ids | []integer | true | Numeric IDs of the project users | 
Response
200
| Name | Type | Description | 
|---|---|---|
| failure | Array of object | List of found errors | 
| success | Array of integer | List of org user IDs that were successfully patched | 
failure
| Name | Type | Description | 
|---|---|---|
| id | integer | Organization user ID | 
| message | string | Found error message | 
400
Possible error messages:
- Invalid value as user IDs
 - No patchable fields defined
 - PATCH expects at least one ID
 - PATCH request is limited to %d entries at once
 - Invalid op:
 - Invalid path format:
 - Path not found:
 - Operation not supported ({patch_operation} {patch_path})
 - Invalid path
 - /manager expects a boolean
 - /labor_cost expects an float64 or null
 - /rate expects an float64 or null
 - Operation not supported (add /labor_cost)
 - Operation not supported (add /rate)
 - Operation not supported (add /manager)
 
403
User does not have access to this resource.
500
Internal Server Error
PUT Update an user into workspace projects users
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
 
curl -X PUT https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_id} \
  -H "Content-Type: application/json" \
  -d '\{"labor_cost":"number","labor_cost_change_mode":"string","manager":"boolean","rate":"number","rate_change_mode":"string"\}' \
  -u <email>:<password>
bytes, err := json.Marshal('\{"labor_cost":"number","labor_cost_change_mode":"string","manager":"boolean","rate":"number","rate_change_mode":"string"\}')
if err != nil {
    print(err)
}
req, err := http.NewRequest(http.MethodPut, 
  "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_id}", bytes.NewBuffer(bytes))
if err != nil {
    print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
req.SetBasicAuth("<email>", "<password>")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
    print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
    print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_id}')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Put.new(uri.path)
req['Content-Type'] = "application/json"
req.body = \{"labor_cost":"number","labor_cost_change_mode":"string","manager":"boolean","rate":"number","rate_change_mode":"string"\}.to_json
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_id}", {
  method: "PUT",
  body: \{"labor_cost":"number","labor_cost_change_mode":"string","manager":"boolean","rate":"number","rate_change_mode":"string"\},
  headers: {
	"Content-Type": "application/json",
	"Authorization": `Basic ${base64.encode(<email>:<password>)}`
  },
})
.then((resp) => resp.json())
.then((json) => {
  console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.put('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_id}', json=\{"labor_cost":"number","labor_cost_change_mode":"string","manager":"boolean","rate":"number","rate_change_mode":"string"\}, headers={'content-type': 'application/json', 'Authorization' : 'Basic %s' %  b64encode(b"<email>:<password>").decode("ascii")})
print(data.json())
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
DELETE Delete a project user from workspace projects users
https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_id}
Delete a project user for a given workspace.
- cURL
 - Go
 - Ruby
 - JavaScript
 - Python
 - Rust
 
curl -X DELETE https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_id} \
  -H "Content-Type: application/json" \
  -u <email>:<password>
req, err := http.NewRequest(http.MethodPut, 
  "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_id}")
if err != nil {
    print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
req.SetBasicAuth("<email>", "<password>")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
    print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
    print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_id}')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Delete.new(uri.path)
req['Content-Type'] = "application/json"
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_id}", {
  method: "DELETE",
  headers: {
	"Content-Type": "application/json",
	"Authorization": `Basic ${base64.encode(<email>:<password>)}`
  },
})
.then((resp) => resp.json())
.then((json) => {
  console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.delete('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_id}', headers={'content-type': 'application/json', 'Authorization' : 'Basic %s' %  b64encode(b"<email>:<password>").decode("ascii")})
print(data.json())
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::DELETE, "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_id}".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 | 
| project_user_id | integer | true | Numeric ID of the project user | 
Response
200
Successful operation.
400
Possible error messages:
- Workspace not found
 - Project user not found/accessible
 - Invalid project_id
 
403
User does not have access to this resource.
500
Internal Server Error
GET WorkspaceProjects
https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects
Get projects for given workspace.
- cURL
 - Go
 - Ruby
 - JavaScript
 - Python
 - Rust
 
curl  https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects \
  -H "Content-Type: application/json" \
  -u <email>:<password>
req, err := http.NewRequest(http.MethodGet, 
  "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects")
if err != nil {
    print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
req.SetBasicAuth("<email>", "<password>")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
    print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
    print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.path)
req['Content-Type'] = "application/json"
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects", {
  method: "GET",
  headers: {
	"Content-Type": "application/json",
	"Authorization": `Basic ${base64.encode(<email>:<password>)}`
  },
})
.then((resp) => resp.json())
.then((json) => {
  console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.get('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects', headers={'content-type': 'application/json', 'Authorization' : 'Basic %s' %  b64encode(b"<email>:<password>").decode("ascii")})
print(data.json())
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::GET, "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects".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 | 
Query
| name | type | required | description | 
|---|---|---|---|
| sort_pinned | boolean | true | Place pinned projects at top of response | 
Query
| name | type | required | description | 
|---|---|---|---|
| active | boolean | false | Return active or inactive project. You can pass 'both' to get both active and inactive projects. | 
| since | integer | false | Retrieve projects created/modified/deleted since this date using UNIX timestamp. | 
| billable | boolean | false | billable | 
| user_ids | array | false | user_ids | 
| client_ids | array | false | client_ids | 
| group_ids | array | false | group_ids | 
| project_ids | array | false | Numeric IDs of the projects | 
| statuses | array | false | statuses | 
| name | string | true | name | 
| page | integer | true | page | 
| sort_field | string | true | sort_field | 
| sort_order | string | true | sort_order | 
| only_templates | boolean | true | only_templates | 
| only_me | boolean | false | get only projects assigned to the current user | 
| per_page | integer | false | Number of items per page, default 151. Cannot exceed 200. | 
Response
200
| Name | Type | Description | 
|---|---|---|
| items | Array of object | - | 
items
| Name | Type | Description | 
|---|---|---|
| active | boolean | Whether the project is active or archived | 
| actual_hours | integer | null | 
| actual_seconds | integer | null | 
| at | string | Last updated date | 
| auto_estimates | boolean | null | 
| billable | boolean | null | 
| can_track_time | boolean | - | 
| cid | integer | Client ID legacy field | 
| client_id | integer | null | 
| client_name | string | - | 
| color | string | Color | 
| created_at | string | Creation date | 
| currency | string | null | 
| current_period | object | Current project period, premium feature | 
| end_date | string | End date | 
| estimated_hours | integer | null | 
| estimated_seconds | integer | null | 
| external_reference | string | ExternalReference can be used to store an external reference to the Track Project Entity. | 
| fixed_fee | number | Fixed fee, premium feature | 
| id | integer | Project 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 | object | The provider (e.g. JIRA/SalesForce) that has an entity linked to this Toggl Track entity | 
| is_private | boolean | Whether the project is private | 
| name | string | Name | 
| permissions | Array of string | - | 
| pinned | boolean | - | 
| rate | number | Hourly rate | 
| rate_last_updated | string | null | 
| recurring | boolean | Whether the project is recurring, premium feature | 
| recurring_parameters | Array of object | Project recurring parameters, premium feature | 
| start_date | string | Start date | 
| status | object | Status of the project (upcoming, active, ended, archived, deleted) | 
| template | boolean | null | 
| template_id | integer | null | 
| total_count | integer | Total number of projects found | 
| wid | integer | Workspace ID legacy field | 
| workspace_id | integer | Workspace ID | 
recurring_parameters
| Name | Type | Description | 
|---|---|---|
| custom_period | integer | Custom period, used when "period" field is "custom" | 
| estimated_seconds | integer | Estimated seconds | 
| parameter_end_date | string | null | 
| parameter_start_date | string | Recurring start date | 
| period | string | Period | 
| project_start_date | string | Project start date | 
403
User does not have access to this resource.
500
Internal Server Error
POST WorkspaceProjects
https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects
Create project for given workspace.
- cURL
 - Go
 - Ruby
 - JavaScript
 - Python
 - Rust
 
curl -X POST https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects \
  -H "Content-Type: application/json" \
  -d '\{"active":"boolean","auto_estimates":"boolean","billable":"boolean","cid":"integer","client_id":"integer","client_name":"string","color":"string","currency":"string","end_date":"string","estimated_hours":"integer","external_reference":"string","fixed_fee":"number","is_private":"boolean","is_shared":"boolean","name":"string","rate":"number","rate_change_mode":"string","recurring":"boolean","recurring_parameters":\{\},"start_date":"string","template":"boolean","template_id":"integer"\}' \
  -u <email>:<password>
bytes, err := json.Marshal('\{"active":"boolean","auto_estimates":"boolean","billable":"boolean","cid":"integer","client_id":"integer","client_name":"string","color":"string","currency":"string","end_date":"string","estimated_hours":"integer","external_reference":"string","fixed_fee":"number","is_private":"boolean","is_shared":"boolean","name":"string","rate":"number","rate_change_mode":"string","recurring":"boolean","recurring_parameters":\{\},"start_date":"string","template":"boolean","template_id":"integer"\}')
if err != nil {
    print(err)
}
req, err := http.NewRequest(http.MethodPost, 
  "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects", bytes.NewBuffer(bytes))
if err != nil {
    print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
req.SetBasicAuth("<email>", "<password>")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
    print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
    print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
req.body = \{"active":"boolean","auto_estimates":"boolean","billable":"boolean","cid":"integer","client_id":"integer","client_name":"string","color":"string","currency":"string","end_date":"string","estimated_hours":"integer","external_reference":"string","fixed_fee":"number","is_private":"boolean","is_shared":"boolean","name":"string","rate":"number","rate_change_mode":"string","recurring":"boolean","recurring_parameters":\{\},"start_date":"string","template":"boolean","template_id":"integer"\}.to_json
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects", {
  method: "POST",
  body: \{"active":"boolean","auto_estimates":"boolean","billable":"boolean","cid":"integer","client_id":"integer","client_name":"string","color":"string","currency":"string","end_date":"string","estimated_hours":"integer","external_reference":"string","fixed_fee":"number","is_private":"boolean","is_shared":"boolean","name":"string","rate":"number","rate_change_mode":"string","recurring":"boolean","recurring_parameters":\{\},"start_date":"string","template":"boolean","template_id":"integer"\},
  headers: {
	"Content-Type": "application/json",
	"Authorization": `Basic ${base64.encode(<email>:<password>)}`
  },
})
.then((resp) => resp.json())
.then((json) => {
  console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.post('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects', json=\{"active":"boolean","auto_estimates":"boolean","billable":"boolean","cid":"integer","client_id":"integer","client_name":"string","color":"string","currency":"string","end_date":"string","estimated_hours":"integer","external_reference":"string","fixed_fee":"number","is_private":"boolean","is_shared":"boolean","name":"string","rate":"number","rate_change_mode":"string","recurring":"boolean","recurring_parameters":\{\},"start_date":"string","template":"boolean","template_id":"integer"\}, headers={'content-type': 'application/json', 'Authorization' : 'Basic %s' %  b64encode(b"<email>:<password>").decode("ascii")})
print(data.json())
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}/projects".to_string())
.json(&serde_json::json!(\{"active":"boolean","auto_estimates":"boolean","billable":"boolean","cid":"integer","client_id":"integer","client_name":"string","color":"string","currency":"string","end_date":"string","estimated_hours":"integer","external_reference":"string","fixed_fee":"number","is_private":"boolean","is_shared":"boolean","name":"string","rate":"number","rate_change_mode":"string","recurring":"boolean","recurring_parameters":\{\},"start_date":"string","template":"boolean","template_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 | 
|---|---|---|
| active | boolean | Whether the project is active or archived | 
| auto_estimates | boolean | Whether estimates are based on task hours, optional, premium feature | 
| billable | boolean | Whether the project is set as billable, optional, premium feature | 
| cid | integer | Client ID, legacy | 
| client_id | integer | Client ID, optional | 
| client_name | string | Client name, optional | 
| color | string | Project color | 
| currency | string | Project currency, optional, premium feature | 
| end_date | string | End date of a project timeframe | 
| estimated_hours | integer | Estimated hours, optional, premium feature | 
| external_reference | string | - | 
| fixed_fee | number | Project fixed fee, optional, premium feature | 
| is_private | boolean | Whether the project is private or not | 
| is_shared | boolean | Shared | 
| name | string | Project name | 
| rate | number | Hourly rate, optional, premium feature | 
| rate_change_mode | string | Rate change mode, optional, premium feature. Can be "start-today", "override-current", "override-all" | 
| recurring | boolean | Project is recurring, optional, premium feature | 
| recurring_parameters | object | Project recurring parameters, optional, premium feature | 
| start_date | string | Start date of a project timeframe | 
| template | boolean | Project is template, optional, premium feature | 
| template_id | integer | Template ID, optional | 
Response
200
| Name | Type | Description | 
|---|---|---|
| active | boolean | Whether the project is active or archived | 
| actual_hours | integer | null | 
| actual_seconds | integer | null | 
| at | string | Last updated date | 
| auto_estimates | boolean | null | 
| billable | boolean | null | 
| can_track_time | boolean | - | 
| cid | integer | Client ID legacy field | 
| client_id | integer | null | 
| client_name | string | - | 
| color | string | Color | 
| created_at | string | Creation date | 
| currency | string | null | 
| current_period | object | Current project period, premium feature | 
| end_date | string | End date | 
| estimated_hours | integer | null | 
| estimated_seconds | integer | null | 
| external_reference | string | ExternalReference can be used to store an external reference to the Track Project Entity. | 
| fixed_fee | number | Fixed fee, premium feature | 
| id | integer | Project 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 | object | The provider (e.g. JIRA/SalesForce) that has an entity linked to this Toggl Track entity | 
| is_private | boolean | Whether the project is private | 
| name | string | Name | 
| permissions | Array of string | - | 
| pinned | boolean | - | 
| rate | number | Hourly rate | 
| rate_last_updated | string | null | 
| recurring | boolean | Whether the project is recurring, premium feature | 
| recurring_parameters | Array of object | Project recurring parameters, premium feature | 
| start_date | string | Start date | 
| status | object | Status of the project (upcoming, active, ended, archived, deleted) | 
| template | boolean | null | 
| template_id | integer | null | 
| total_count | integer | Total number of projects found | 
| wid | integer | Workspace ID legacy field | 
| workspace_id | integer | Workspace ID | 
recurring_parameters
| Name | Type | Description | 
|---|---|---|
| custom_period | integer | Custom period, used when "period" field is "custom" | 
| estimated_seconds | integer | Estimated seconds | 
| parameter_end_date | string | null | 
| parameter_start_date | string | Recurring start date | 
| period | string | Period | 
| project_start_date | string | Project start date | 
403
User does not have access to this resource.
500
Internal Server Error
PATCH WorkspaceProjects
https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_ids}
Bulk editing workspace projects.
- cURL
 - Go
 - Ruby
 - JavaScript
 - Python
 - Rust
 
curl -X PATCH https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_ids} \
  -H "Content-Type: application/json" \
  -d '[\{"op":"string","path":"string","value":\{\}\}]' \
  -u <email>:<password>
bytes, err := json.Marshal('[\{"op":"string","path":"string","value":\{\}\}]')
if err != nil {
    print(err)
}
req, err := http.NewRequest(http.MethodGet, 
  "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_ids}", bytes.NewBuffer(bytes))
if err != nil {
    print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
req.SetBasicAuth("<email>", "<password>")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
    print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
    print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_ids}')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Patch.new(uri.path)
req['Content-Type'] = "application/json"
req.body = [\{"op":"string","path":"string","value":\{\}\}].to_json
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_ids}", {
  method: "PATCH",
  body: [\{"op":"string","path":"string","value":\{\}\}],
  headers: {
	"Content-Type": "application/json",
	"Authorization": `Basic ${base64.encode(<email>:<password>)}`
  },
})
.then((resp) => resp.json())
.then((json) => {
  console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.patch('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_ids}', json=[\{"op":"string","path":"string","value":\{\}\}], headers={'content-type': 'application/json', 'Authorization' : 'Basic %s' %  b64encode(b"<email>:<password>").decode("ascii")})
print(data.json())
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::PATCH, "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_ids}".to_string())
.json(&serde_json::json!([\{"op":"string","path":"string","value":\{\}\}]))
  .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_ids | string | true | Numeric IDs of project ids, separated by comma. E.g.: 204301830,202700150,202687559 | 
Body
| Name | Type | Description | 
|---|---|---|
| items | Array of object | - | 
items
| Name | Type | Description | 
|---|---|---|
| op | string | Patch operation to perform, one of "add", "remove", "replace" | 
| path | string | Path to the field to patch, example: "/color" | 
| value | object | Value to set when operation is "add" or "replace", example: "#000000". The value type actually depends on the field being patched. | 
Response
200
| Name | Type | Description | 
|---|---|---|
| failure | Array of object | - | 
| success | Array of integer | - | 
failure
| Name | Type | Description | 
|---|---|---|
| id | integer | - | 
| message | string | - | 
500
Internal Server Error
GET WorkspaceProject
https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}
Get project for given workspace.
- cURL
 - Go
 - Ruby
 - JavaScript
 - Python
 - Rust
 
curl  https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id} \
  -H "Content-Type: application/json" \
  -u <email>:<password>
req, err := http.NewRequest(http.MethodGet, 
  "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}")
if err != nil {
    print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
req.SetBasicAuth("<email>", "<password>")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
    print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
    print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.path)
req['Content-Type'] = "application/json"
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}", {
  method: "GET",
  headers: {
	"Content-Type": "application/json",
	"Authorization": `Basic ${base64.encode(<email>:<password>)}`
  },
})
.then((resp) => resp.json())
.then((json) => {
  console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.get('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}', headers={'content-type': 'application/json', 'Authorization' : 'Basic %s' %  b64encode(b"<email>:<password>").decode("ascii")})
print(data.json())
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::GET, "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}".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 | 
| project_id | integer | true | Numeric ID of the project | 
Response
200
| Name | Type | Description | 
|---|---|---|
| active | boolean | Whether the project is active or archived | 
| actual_hours | integer | null | 
| actual_seconds | integer | null | 
| at | string | Last updated date | 
| auto_estimates | boolean | null | 
| billable | boolean | null | 
| can_track_time | boolean | - | 
| cid | integer | Client ID legacy field | 
| client_id | integer | null | 
| client_name | string | - | 
| color | string | Color | 
| created_at | string | Creation date | 
| currency | string | null | 
| current_period | object | Current project period, premium feature | 
| end_date | string | End date | 
| estimated_hours | integer | null | 
| estimated_seconds | integer | null | 
| external_reference | string | ExternalReference can be used to store an external reference to the Track Project Entity. | 
| fixed_fee | number | Fixed fee, premium feature | 
| id | integer | Project 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 | object | The provider (e.g. JIRA/SalesForce) that has an entity linked to this Toggl Track entity | 
| is_private | boolean | Whether the project is private | 
| name | string | Name | 
| permissions | Array of string | - | 
| pinned | boolean | - | 
| rate | number | Hourly rate | 
| rate_last_updated | string | null | 
| recurring | boolean | Whether the project is recurring, premium feature | 
| recurring_parameters | Array of object | Project recurring parameters, premium feature | 
| start_date | string | Start date | 
| status | object | Status of the project (upcoming, active, ended, archived, deleted) | 
| template | boolean | null | 
| template_id | integer | null | 
| total_count | integer | Total number of projects found | 
| wid | integer | Workspace ID legacy field | 
| workspace_id | integer | Workspace ID | 
recurring_parameters
| Name | Type | Description | 
|---|---|---|
| custom_period | integer | Custom period, used when "period" field is "custom" | 
| estimated_seconds | integer | Estimated seconds | 
| parameter_end_date | string | null | 
| parameter_start_date | string | Recurring start date | 
| period | string | Period | 
| project_start_date | string | Project start date | 
400
Possible errors:
- Invalid project_id
 
403
User does not have access to this resource.
500
Internal Server Error
PUT WorkspaceProject
https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}
Update project for given workspace.
- cURL
 - Go
 - Ruby
 - JavaScript
 - Python
 - Rust
 
curl -X PUT https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id} \
  -H "Content-Type: application/json" \
  -d '\{"active":"boolean","auto_estimates":"boolean","billable":"boolean","cid":"integer","client_id":"integer","client_name":"string","color":"string","currency":"string","end_date":"string","estimated_hours":"integer","external_reference":"string","fixed_fee":"number","is_private":"boolean","is_shared":"boolean","name":"string","rate":"number","rate_change_mode":"string","recurring":"boolean","recurring_parameters":\{\},"start_date":"string","template":"boolean","template_id":"integer"\}' \
  -u <email>:<password>
bytes, err := json.Marshal('\{"active":"boolean","auto_estimates":"boolean","billable":"boolean","cid":"integer","client_id":"integer","client_name":"string","color":"string","currency":"string","end_date":"string","estimated_hours":"integer","external_reference":"string","fixed_fee":"number","is_private":"boolean","is_shared":"boolean","name":"string","rate":"number","rate_change_mode":"string","recurring":"boolean","recurring_parameters":\{\},"start_date":"string","template":"boolean","template_id":"integer"\}')
if err != nil {
    print(err)
}
req, err := http.NewRequest(http.MethodPut, 
  "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}", bytes.NewBuffer(bytes))
if err != nil {
    print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
req.SetBasicAuth("<email>", "<password>")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
    print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
    print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Put.new(uri.path)
req['Content-Type'] = "application/json"
req.body = \{"active":"boolean","auto_estimates":"boolean","billable":"boolean","cid":"integer","client_id":"integer","client_name":"string","color":"string","currency":"string","end_date":"string","estimated_hours":"integer","external_reference":"string","fixed_fee":"number","is_private":"boolean","is_shared":"boolean","name":"string","rate":"number","rate_change_mode":"string","recurring":"boolean","recurring_parameters":\{\},"start_date":"string","template":"boolean","template_id":"integer"\}.to_json
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}", {
  method: "PUT",
  body: \{"active":"boolean","auto_estimates":"boolean","billable":"boolean","cid":"integer","client_id":"integer","client_name":"string","color":"string","currency":"string","end_date":"string","estimated_hours":"integer","external_reference":"string","fixed_fee":"number","is_private":"boolean","is_shared":"boolean","name":"string","rate":"number","rate_change_mode":"string","recurring":"boolean","recurring_parameters":\{\},"start_date":"string","template":"boolean","template_id":"integer"\},
  headers: {
	"Content-Type": "application/json",
	"Authorization": `Basic ${base64.encode(<email>:<password>)}`
  },
})
.then((resp) => resp.json())
.then((json) => {
  console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.put('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}', json=\{"active":"boolean","auto_estimates":"boolean","billable":"boolean","cid":"integer","client_id":"integer","client_name":"string","color":"string","currency":"string","end_date":"string","estimated_hours":"integer","external_reference":"string","fixed_fee":"number","is_private":"boolean","is_shared":"boolean","name":"string","rate":"number","rate_change_mode":"string","recurring":"boolean","recurring_parameters":\{\},"start_date":"string","template":"boolean","template_id":"integer"\}, headers={'content-type': 'application/json', 'Authorization' : 'Basic %s' %  b64encode(b"<email>:<password>").decode("ascii")})
print(data.json())
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}/projects/{project_id}".to_string())
.json(&serde_json::json!(\{"active":"boolean","auto_estimates":"boolean","billable":"boolean","cid":"integer","client_id":"integer","client_name":"string","color":"string","currency":"string","end_date":"string","estimated_hours":"integer","external_reference":"string","fixed_fee":"number","is_private":"boolean","is_shared":"boolean","name":"string","rate":"number","rate_change_mode":"string","recurring":"boolean","recurring_parameters":\{\},"start_date":"string","template":"boolean","template_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 | 
| project_id | integer | true | Numeric ID of the project | 
Body
| Name | Type | Description | 
|---|---|---|
| active | boolean | Whether the project is active or archived | 
| auto_estimates | boolean | Whether estimates are based on task hours, optional, premium feature | 
| billable | boolean | Whether the project is set as billable, optional, premium feature | 
| cid | integer | Client ID, legacy | 
| client_id | integer | Client ID, optional | 
| client_name | string | Client name, optional | 
| color | string | Project color | 
| currency | string | Project currency, optional, premium feature | 
| end_date | string | End date of a project timeframe | 
| estimated_hours | integer | Estimated hours, optional, premium feature | 
| external_reference | string | - | 
| fixed_fee | number | Project fixed fee, optional, premium feature | 
| is_private | boolean | Whether the project is private or not | 
| is_shared | boolean | Shared | 
| name | string | Project name | 
| rate | number | Hourly rate, optional, premium feature | 
| rate_change_mode | string | Rate change mode, optional, premium feature. Can be "start-today", "override-current", "override-all" | 
| recurring | boolean | Project is recurring, optional, premium feature | 
| recurring_parameters | object | Project recurring parameters, optional, premium feature | 
| start_date | string | Start date of a project timeframe | 
| template | boolean | Project is template, optional, premium feature | 
| template_id | integer | Template ID, optional | 
Response
200
| Name | Type | Description | 
|---|---|---|
| active | boolean | Whether the project is active or archived | 
| actual_hours | integer | null | 
| actual_seconds | integer | null | 
| at | string | Last updated date | 
| auto_estimates | boolean | null | 
| billable | boolean | null | 
| can_track_time | boolean | - | 
| cid | integer | Client ID legacy field | 
| client_id | integer | null | 
| client_name | string | - | 
| color | string | Color | 
| created_at | string | Creation date | 
| currency | string | null | 
| current_period | object | Current project period, premium feature | 
| end_date | string | End date | 
| estimated_hours | integer | null | 
| estimated_seconds | integer | null | 
| external_reference | string | ExternalReference can be used to store an external reference to the Track Project Entity. | 
| fixed_fee | number | Fixed fee, premium feature | 
| id | integer | Project 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 | object | The provider (e.g. JIRA/SalesForce) that has an entity linked to this Toggl Track entity | 
| is_private | boolean | Whether the project is private | 
| name | string | Name | 
| permissions | Array of string | - | 
| pinned | boolean | - | 
| rate | number | Hourly rate | 
| rate_last_updated | string | null | 
| recurring | boolean | Whether the project is recurring, premium feature | 
| recurring_parameters | Array of object | Project recurring parameters, premium feature | 
| start_date | string | Start date | 
| status | object | Status of the project (upcoming, active, ended, archived, deleted) | 
| template | boolean | null | 
| template_id | integer | null | 
| total_count | integer | Total number of projects found | 
| wid | integer | Workspace ID legacy field | 
| workspace_id | integer | Workspace ID | 
recurring_parameters
| Name | Type | Description | 
|---|---|---|
| custom_period | integer | Custom period, used when "period" field is "custom" | 
| estimated_seconds | integer | Estimated seconds | 
| parameter_end_date | string | null | 
| parameter_start_date | string | Recurring start date | 
| period | string | Period | 
| project_start_date | string | Project start date | 
400
Possible errors:
- Client with the ID {client ID} isn't present in workspace {workspace ID}
 - Error in validating color '{color}'. Project color must be a hex value in the form of #[0-9a-f]{6}.
 
403
Possible errors:
- Only admins may create projects in this workspace
 - Only admins may create private projects in this workspace
 - User does not have access to this resource.
 
500
Internal Server Error
DELETE WorkspaceProject
https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}
Delete project for given workspace.
- cURL
 - Go
 - Ruby
 - JavaScript
 - Python
 - Rust
 
curl -X DELETE https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id} \
  -H "Content-Type: application/json" \
  -u <email>:<password>
req, err := http.NewRequest(http.MethodPut, 
  "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}")
if err != nil {
    print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
req.SetBasicAuth("<email>", "<password>")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
    print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
    print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Delete.new(uri.path)
req['Content-Type'] = "application/json"
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}", {
  method: "DELETE",
  headers: {
	"Content-Type": "application/json",
	"Authorization": `Basic ${base64.encode(<email>:<password>)}`
  },
})
.then((resp) => resp.json())
.then((json) => {
  console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.delete('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}', headers={'content-type': 'application/json', 'Authorization' : 'Basic %s' %  b64encode(b"<email>:<password>").decode("ascii")})
print(data.json())
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::DELETE, "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}".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 | 
| project_id | integer | true | Numeric ID of the project | 
Query
| name | type | required | description | 
|---|---|---|---|
| teDeletionMode | string | false | Time entries deletion mode: 'delete' or 'unassign' | 
Response
200
Successful operation.
400
Possible errors:
- Invalid project_id
 
403
User does not have access to this resource.
500
Internal Server Error