Preferences
GET Preferences for the current user
https://api.track.toggl.com/api/v9/me/preferences
Returns user preferences and alpha features. The list of alpha features contains a full list of feature codes (every feature that exists in database) and the enabled
flag specifying if that feature should be enabled or disabled for the user.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl https://api.track.toggl.com/api/v9/me/preferences \
-H "Content-Type: application/json" \
-u <email>:<password>
req, err := http.NewRequest(http.MethodGet,
"https://api.track.toggl.com/api/v9/me/preferences")
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/me/preferences')
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/me/preferences", {
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/me/preferences', 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/me/preferences".to_string())
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Response
200
Name | Type | Description |
---|---|---|
activity_timeline_display_activity | boolean | - |
activity_timeline_grouping_interval | string | - |
activity_timeline_grouping_method | string | - |
activity_timeline_recording_level | string | - |
activity_timeline_sync_events | boolean | - |
alpha_features | Array of object | will be omitted if empty |
analyticsAdvancedFilters | boolean | will be omitted if empty |
auto_tracker_delay_enabled | boolean | - |
auto_tracker_delay_in_seconds | integer | - |
automatic_tagging | boolean | - |
autotracking_enabled | boolean | - |
beginningOfWeek | integer | will be omitted if empty |
calendar_snap_duration | string | - |
calendar_snap_initial_location | string | - |
calendar_visible_hours_end | integer | - |
calendar_visible_hours_start | integer | - |
calendar_zoom_level | string | - |
cell_swipe_actions_enabled | boolean | - |
charts_view_type | string | - |
collapseDetailedReportEntries | boolean | will be omitted if empty |
collapseTimeEntries | boolean | will be omitted if empty |
dashboards_view_type | string | - |
date_format | string | - |
decimal_separator | string | will be omitted if empty |
default_project_id | integer | - |
default_task_id | integer | - |
displayDensity | string | will be omitted if empty |
distinctRates | string | will be omitted if empty |
duration_format | string | - |
duration_format_on_timer_duration_field | boolean | - |
edit_popup_integration_timer | boolean | - |
extension_send_error_reports | boolean | - |
extension_send_usage_statistics | boolean | - |
firstSeenBusinessPromo | integer | will be omitted if empty |
focus_app_on_time_entry_started | boolean | - |
focus_app_on_time_entry_stopped | boolean | - |
haptic_feedback_enabled | boolean | - |
hide_keyboard_shortcut | boolean | will be omitted if empty |
idle_detection_enabled | boolean | - |
idle_detection_interval_in_minutes | integer | - |
inactivity_behavior | string | - |
ios_is_goals_view_shown | boolean | - |
is_goals_view_expanded | boolean | - |
is_goals_view_shown | boolean | - |
is_summary_total_view_visible | boolean | - |
keep_mini_timer_on_top | boolean | - |
keep_window_on_top | boolean | - |
keyboard_increment_timer_page | integer | - |
keyboard_shortcuts_enabled | boolean | will be omitted if empty |
keyboard_shortcuts_share_time_entries | boolean | - |
mac_is_goals_view_shown | boolean | - |
macos_auto_tracking_rules | Array of object | - |
macos_show_hide_toggl_keyboard_shortcut | object | - |
macos_stop_continue_keyboard_shortcut | object | - |
manualEntryMode | string | will be omitted if empty |
manualMode | boolean | will be omitted if empty |
manualModeOverlaySeen | boolean | will be omitted if empty |
modify_on_start_time_change | string | - |
offlineMode | string | will be omitted if empty |
pg_time_zone_name | string | - |
pomodoro_auto_start_break | boolean | - |
pomodoro_auto_start_focus | boolean | - |
pomodoro_break_interval_in_minutes | integer | - |
pomodoro_break_project_id | integer | - |
pomodoro_break_start_sound_enabled | boolean | - |
pomodoro_break_tag_id | integer | - |
pomodoro_countdown_timer | boolean | - |
pomodoro_enabled | boolean | - |
pomodoro_focus_interval_in_minutes | integer | - |
pomodoro_focus_sound | string | - |
pomodoro_global_sound_enabled | boolean | - |
pomodoro_interval_end_sound | boolean | - |
pomodoro_interval_end_volume | integer | - |
pomodoro_longer_break_duration_in_minutes | integer | - |
pomodoro_prevent_screen_lock | boolean | - |
pomodoro_rounds_before_longer_break | integer | - |
pomodoro_session_start_sound_enabled | boolean | - |
pomodoro_show_notifications | boolean | - |
pomodoro_stop_timer_at_interval_end | boolean | - |
pomodoro_track_breaks_as_time_entries | boolean | - |
projectDashboardActivityMode | string | will be omitted if empty |
project_shortcut_enabled | boolean | - |
record_timeline | boolean | - |
remember_last_project | string | - |
reminder_days | string | - |
reminder_enabled | boolean | - |
reminder_interval_in_minutes | integer | - |
reminder_period | string | - |
reminder_snoozing_in_minutes | integer | - |
reportRounding | boolean | will be omitted if empty |
reportRoundingDirection | string | will be omitted if empty |
reportRoundingStepInMinutes | integer | will be omitted if empty |
reportsHideWeekends | boolean | will be omitted if empty |
run_app_on_startup | boolean | - |
running_entry_warning | string | - |
running_timer_notification_enabled | boolean | - |
seenFollowModal | boolean | will be omitted if empty |
seenFooterPopup | boolean | will be omitted if empty |
seenProjectDashboardOverlay | boolean | will be omitted if empty |
seenTogglButtonModal | boolean | will be omitted if empty |
send_daily_project_invites | boolean | - |
send_product_emails | boolean | - |
send_timer_notifications | boolean | - |
send_weekly_report | boolean | - |
sharing_shortcut_enabled | boolean | - |
showTimeInTitle | boolean | will be omitted if empty |
show_all_entries | boolean | - |
show_changelog | boolean | - |
show_description_in_menu_bar | boolean | - |
show_dock_icon | boolean | - |
show_events_in_calendar | boolean | - |
show_project_in_menu_bar | boolean | - |
show_qr_scanner | boolean | - |
show_seconds_in_menu_bar | boolean | - |
show_timeline_in_day_view | boolean | will be omitted if empty |
show_timer_in_menu_bar | boolean | - |
show_today_total_in_menu_bar | boolean | - |
show_total_billable_hours | boolean | will be omitted if empty |
show_weekend_on_timer_page | boolean | will be omitted if empty |
show_workouts_in_calendar | boolean | - |
sleep_behaviour | string | - |
smart_alerts_option | string | - |
snowballReportRounding | string | will be omitted if empty |
stack_times_on_manual_mode_after | string | - |
start_automatically | boolean | - |
start_shortcut_mode | string | - |
stop_at_specific_time | boolean | - |
stop_automatically | boolean | - |
stop_entry_on_shutdown | boolean | - |
stop_specified_time | string | - |
stopped_timer_notification_enabled | boolean | - |
suggestions_enabled | boolean | - |
summaryReportAmounts | string | will be omitted if empty |
summaryReportDistinctRates | boolean | will be omitted if empty |
summaryReportGrouping | string | will be omitted if empty |
summaryReportSortAsc | boolean | will be omitted if empty |
summaryReportSortField | string | will be omitted if empty |
summaryReportSubGrouping | string | will be omitted if empty |
summary_total_mode | string | - |
tags_shortcut_enabled | boolean | - |
theme | string | will be omitted if empty |
time_entry_display_mode | string | - |
time_entry_ghost_suggestions_enabled | boolean | - |
time_entry_invitations_notification_enabled | boolean | - |
time_entry_start_stop_input_mode | string | - |
timeofday_format | string | - |
timerView | string | will be omitted if empty |
timerViewMobile | string | will be omitted if empty |
toSAcceptNeeded | boolean | ToSAcceptNeeded represents the trigger for new ToS accept dialog |
use_mini_timer | boolean | - |
visibleFooter | string | will be omitted if empty |
webTimeEntryStarted | boolean | will be omitted if empty |
webTimeEntryStopped | boolean | will be omitted if empty |
weeklyReportGrouping | string | will be omitted if empty |
weeklyReportValueToShow | string | will be omitted if empty |
windows_auto_tracking_rules | Array of object | - |
windows_show_hide_toggl_keyboard_shortcut | object | - |
windows_stop_continue_keyboard_shortcut | object | - |
windows_stop_start_keyboard_shortcut | object | - |
windows_theme | string | - |
workout_default_project_id | integer | - |
workout_default_tag_id | integer | - |
alpha_features
Name | Type | Description |
---|---|---|
alpha_feature_id | integer | Feature ID |
code | string | Feature code |
deleted_at | string | Time of deletion, omitted if empty |
description | string | Feature description, omitted if empty |
enabled | boolean | Whether the feature is enabled |
macos_auto_tracking_rules
Name | Type | Description |
---|---|---|
id | string | - |
keyword | string | - |
project_id | integer | - |
task_id | integer | - |
macos_show_hide_toggl_keyboard_shortcut
Name | Type | Description |
---|---|---|
key | integer | - |
modifiers | integer | - |
macos_stop_continue_keyboard_shortcut
Name | Type | Description |
---|---|---|
key | integer | - |
modifiers | integer | - |
windows_auto_tracking_rules
Name | Type | Description |
---|---|---|
billable | boolean | - |
description | string | - |
enabled | boolean | - |
id | string | - |
parameters | object | - |
project_id | integer | - |
skip_when_timer_is_running | boolean | - |
start_without_confirmation | boolean | - |
tag_ids | Array of integer | - |
task_id | integer | - |
type | integer | - |
parameters
Name | Type | Description |
---|---|---|
duration | string | - |
keyword | string | - |
keyword_mode | string | - |
time_of_day | string | - |
week_days | string | - |
windows_show_hide_toggl_keyboard_shortcut
Name | Type | Description |
---|---|---|
key | integer | - |
modifiers | integer | - |
windows_stop_continue_keyboard_shortcut
Name | Type | Description |
---|---|---|
key | integer | - |
modifiers | integer | - |
windows_stop_start_keyboard_shortcut
Name | Type | Description |
---|---|---|
key | integer | - |
modifiers | integer | - |
403
User does not have access to this resource.
500
Internal Server Error
POST Update the preferences for the current user
https://api.track.toggl.com/api/v9/me/preferences
With this endpoint, preferences can be modified and alpha features can be enabled or disabled.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X POST https://api.track.toggl.com/api/v9/me/preferences \
-H "Content-Type: application/json" \
-d '\{"activity_timeline_display_activity":"boolean","activity_timeline_grouping_interval":"string","activity_timeline_grouping_method":"string","activity_timeline_recording_level":"string","activity_timeline_sync_events":"boolean","alpha_features":[\{"alpha_feature_id":"integer","code":"string","deleted_at":"string","description":"string","enabled":"boolean"\}],"analyticsAdvancedFilters":"boolean","auto_tracker_delay_enabled":"boolean","auto_tracker_delay_in_seconds":"integer","automatic_tagging":"boolean","autotracking_enabled":"boolean","beginningOfWeek":"integer","calendar_snap_duration":"string","calendar_snap_initial_location":"string","calendar_visible_hours_end":"integer","calendar_visible_hours_start":"integer","calendar_zoom_level":"string","cell_swipe_actions_enabled":"boolean","charts_view_type":"string","collapseDetailedReportEntries":"boolean","collapseTimeEntries":"boolean","dashboards_view_type":"string","date_format":"string","decimal_separator":"string","default_project_id":"integer","default_task_id":"integer","displayDensity":"string","distinctRates":"string","duration_format":"string","duration_format_on_timer_duration_field":"boolean","edit_popup_integration_timer":"boolean","extension_send_error_reports":"boolean","extension_send_usage_statistics":"boolean","firstSeenBusinessPromo":"integer","focus_app_on_time_entry_started":"boolean","focus_app_on_time_entry_stopped":"boolean","haptic_feedback_enabled":"boolean","hide_keyboard_shortcut":"boolean","idle_detection_enabled":"boolean","idle_detection_interval_in_minutes":"integer","inactivity_behavior":"string","ios_is_goals_view_shown":"boolean","is_goals_view_expanded":"boolean","is_goals_view_shown":"boolean","is_summary_total_view_visible":"boolean","keep_mini_timer_on_top":"boolean","keep_window_on_top":"boolean","keyboard_increment_timer_page":"integer","keyboard_shortcuts_enabled":"boolean","keyboard_shortcuts_share_time_entries":"boolean","mac_is_goals_view_shown":"boolean","macos_auto_tracking_rules":[\{"id":"string","keyword":"string","project_id":"integer","task_id":"integer"\}],"macos_show_hide_toggl_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"macos_stop_continue_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"manualEntryMode":"string","manualMode":"boolean","manualModeOverlaySeen":"boolean","modify_on_start_time_change":"string","offlineMode":"string","pg_time_zone_name":"string","pomodoro_auto_start_break":"boolean","pomodoro_auto_start_focus":"boolean","pomodoro_break_interval_in_minutes":"integer","pomodoro_break_project_id":"integer","pomodoro_break_start_sound_enabled":"boolean","pomodoro_break_tag_id":"integer","pomodoro_countdown_timer":"boolean","pomodoro_enabled":"boolean","pomodoro_focus_interval_in_minutes":"integer","pomodoro_focus_sound":"string","pomodoro_global_sound_enabled":"boolean","pomodoro_interval_end_sound":"boolean","pomodoro_interval_end_volume":"integer","pomodoro_longer_break_duration_in_minutes":"integer","pomodoro_prevent_screen_lock":"boolean","pomodoro_rounds_before_longer_break":"integer","pomodoro_session_start_sound_enabled":"boolean","pomodoro_show_notifications":"boolean","pomodoro_stop_timer_at_interval_end":"boolean","pomodoro_track_breaks_as_time_entries":"boolean","projectDashboardActivityMode":"string","project_shortcut_enabled":"boolean","record_timeline":"boolean","remember_last_project":"string","reminder_days":"string","reminder_enabled":"boolean","reminder_interval_in_minutes":"integer","reminder_period":"string","reminder_snoozing_in_minutes":"integer","reportRounding":"boolean","reportRoundingDirection":"string","reportRoundingStepInMinutes":"integer","reportsHideWeekends":"boolean","run_app_on_startup":"boolean","running_entry_warning":"string","running_timer_notification_enabled":"boolean","seenFollowModal":"boolean","seenFooterPopup":"boolean","seenProjectDashboardOverlay":"boolean","seenTogglButtonModal":"boolean","send_daily_project_invites":"boolean","send_product_emails":"boolean","send_timer_notifications":"boolean","send_weekly_report":"boolean","sharing_shortcut_enabled":"boolean","showTimeInTitle":"boolean","show_all_entries":"boolean","show_changelog":"boolean","show_description_in_menu_bar":"boolean","show_dock_icon":"boolean","show_events_in_calendar":"boolean","show_project_in_menu_bar":"boolean","show_qr_scanner":"boolean","show_seconds_in_menu_bar":"boolean","show_timeline_in_day_view":"boolean","show_timer_in_menu_bar":"boolean","show_today_total_in_menu_bar":"boolean","show_total_billable_hours":"boolean","show_weekend_on_timer_page":"boolean","show_workouts_in_calendar":"boolean","sleep_behaviour":"string","smart_alerts_option":"string","snowballReportRounding":"string","stack_times_on_manual_mode_after":"string","start_automatically":"boolean","start_shortcut_mode":"string","stop_at_specific_time":"boolean","stop_automatically":"boolean","stop_entry_on_shutdown":"boolean","stop_specified_time":"string","stopped_timer_notification_enabled":"boolean","suggestions_enabled":"boolean","summaryReportAmounts":"string","summaryReportDistinctRates":"boolean","summaryReportGrouping":"string","summaryReportSortAsc":"boolean","summaryReportSortField":"string","summaryReportSubGrouping":"string","summary_total_mode":"string","tags_shortcut_enabled":"boolean","theme":"string","time_entry_display_mode":"string","time_entry_ghost_suggestions_enabled":"boolean","time_entry_invitations_notification_enabled":"boolean","time_entry_start_stop_input_mode":"string","timeofday_format":"string","timerView":"string","timerViewMobile":"string","toSAcceptNeeded":"boolean","use_mini_timer":"boolean","visibleFooter":"string","webTimeEntryStarted":"boolean","webTimeEntryStopped":"boolean","weeklyReportGrouping":"string","weeklyReportValueToShow":"string","windows_auto_tracking_rules":[\{"billable":"boolean","description":"string","enabled":"boolean","id":"string","parameters":\{"duration":"string","keyword":"string","keyword_mode":"string","time_of_day":"string","week_days":"string"\},"project_id":"integer","skip_when_timer_is_running":"boolean","start_without_confirmation":"boolean","tag_ids":[\{\}],"task_id":"integer","type":"integer"\}],"windows_show_hide_toggl_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_stop_continue_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_stop_start_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_theme":"string","workout_default_project_id":"integer","workout_default_tag_id":"integer"\}' \
-u <email>:<password>
bytes, err := json.Marshal('\{"activity_timeline_display_activity":"boolean","activity_timeline_grouping_interval":"string","activity_timeline_grouping_method":"string","activity_timeline_recording_level":"string","activity_timeline_sync_events":"boolean","alpha_features":[\{"alpha_feature_id":"integer","code":"string","deleted_at":"string","description":"string","enabled":"boolean"\}],"analyticsAdvancedFilters":"boolean","auto_tracker_delay_enabled":"boolean","auto_tracker_delay_in_seconds":"integer","automatic_tagging":"boolean","autotracking_enabled":"boolean","beginningOfWeek":"integer","calendar_snap_duration":"string","calendar_snap_initial_location":"string","calendar_visible_hours_end":"integer","calendar_visible_hours_start":"integer","calendar_zoom_level":"string","cell_swipe_actions_enabled":"boolean","charts_view_type":"string","collapseDetailedReportEntries":"boolean","collapseTimeEntries":"boolean","dashboards_view_type":"string","date_format":"string","decimal_separator":"string","default_project_id":"integer","default_task_id":"integer","displayDensity":"string","distinctRates":"string","duration_format":"string","duration_format_on_timer_duration_field":"boolean","edit_popup_integration_timer":"boolean","extension_send_error_reports":"boolean","extension_send_usage_statistics":"boolean","firstSeenBusinessPromo":"integer","focus_app_on_time_entry_started":"boolean","focus_app_on_time_entry_stopped":"boolean","haptic_feedback_enabled":"boolean","hide_keyboard_shortcut":"boolean","idle_detection_enabled":"boolean","idle_detection_interval_in_minutes":"integer","inactivity_behavior":"string","ios_is_goals_view_shown":"boolean","is_goals_view_expanded":"boolean","is_goals_view_shown":"boolean","is_summary_total_view_visible":"boolean","keep_mini_timer_on_top":"boolean","keep_window_on_top":"boolean","keyboard_increment_timer_page":"integer","keyboard_shortcuts_enabled":"boolean","keyboard_shortcuts_share_time_entries":"boolean","mac_is_goals_view_shown":"boolean","macos_auto_tracking_rules":[\{"id":"string","keyword":"string","project_id":"integer","task_id":"integer"\}],"macos_show_hide_toggl_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"macos_stop_continue_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"manualEntryMode":"string","manualMode":"boolean","manualModeOverlaySeen":"boolean","modify_on_start_time_change":"string","offlineMode":"string","pg_time_zone_name":"string","pomodoro_auto_start_break":"boolean","pomodoro_auto_start_focus":"boolean","pomodoro_break_interval_in_minutes":"integer","pomodoro_break_project_id":"integer","pomodoro_break_start_sound_enabled":"boolean","pomodoro_break_tag_id":"integer","pomodoro_countdown_timer":"boolean","pomodoro_enabled":"boolean","pomodoro_focus_interval_in_minutes":"integer","pomodoro_focus_sound":"string","pomodoro_global_sound_enabled":"boolean","pomodoro_interval_end_sound":"boolean","pomodoro_interval_end_volume":"integer","pomodoro_longer_break_duration_in_minutes":"integer","pomodoro_prevent_screen_lock":"boolean","pomodoro_rounds_before_longer_break":"integer","pomodoro_session_start_sound_enabled":"boolean","pomodoro_show_notifications":"boolean","pomodoro_stop_timer_at_interval_end":"boolean","pomodoro_track_breaks_as_time_entries":"boolean","projectDashboardActivityMode":"string","project_shortcut_enabled":"boolean","record_timeline":"boolean","remember_last_project":"string","reminder_days":"string","reminder_enabled":"boolean","reminder_interval_in_minutes":"integer","reminder_period":"string","reminder_snoozing_in_minutes":"integer","reportRounding":"boolean","reportRoundingDirection":"string","reportRoundingStepInMinutes":"integer","reportsHideWeekends":"boolean","run_app_on_startup":"boolean","running_entry_warning":"string","running_timer_notification_enabled":"boolean","seenFollowModal":"boolean","seenFooterPopup":"boolean","seenProjectDashboardOverlay":"boolean","seenTogglButtonModal":"boolean","send_daily_project_invites":"boolean","send_product_emails":"boolean","send_timer_notifications":"boolean","send_weekly_report":"boolean","sharing_shortcut_enabled":"boolean","showTimeInTitle":"boolean","show_all_entries":"boolean","show_changelog":"boolean","show_description_in_menu_bar":"boolean","show_dock_icon":"boolean","show_events_in_calendar":"boolean","show_project_in_menu_bar":"boolean","show_qr_scanner":"boolean","show_seconds_in_menu_bar":"boolean","show_timeline_in_day_view":"boolean","show_timer_in_menu_bar":"boolean","show_today_total_in_menu_bar":"boolean","show_total_billable_hours":"boolean","show_weekend_on_timer_page":"boolean","show_workouts_in_calendar":"boolean","sleep_behaviour":"string","smart_alerts_option":"string","snowballReportRounding":"string","stack_times_on_manual_mode_after":"string","start_automatically":"boolean","start_shortcut_mode":"string","stop_at_specific_time":"boolean","stop_automatically":"boolean","stop_entry_on_shutdown":"boolean","stop_specified_time":"string","stopped_timer_notification_enabled":"boolean","suggestions_enabled":"boolean","summaryReportAmounts":"string","summaryReportDistinctRates":"boolean","summaryReportGrouping":"string","summaryReportSortAsc":"boolean","summaryReportSortField":"string","summaryReportSubGrouping":"string","summary_total_mode":"string","tags_shortcut_enabled":"boolean","theme":"string","time_entry_display_mode":"string","time_entry_ghost_suggestions_enabled":"boolean","time_entry_invitations_notification_enabled":"boolean","time_entry_start_stop_input_mode":"string","timeofday_format":"string","timerView":"string","timerViewMobile":"string","toSAcceptNeeded":"boolean","use_mini_timer":"boolean","visibleFooter":"string","webTimeEntryStarted":"boolean","webTimeEntryStopped":"boolean","weeklyReportGrouping":"string","weeklyReportValueToShow":"string","windows_auto_tracking_rules":[\{"billable":"boolean","description":"string","enabled":"boolean","id":"string","parameters":\{"duration":"string","keyword":"string","keyword_mode":"string","time_of_day":"string","week_days":"string"\},"project_id":"integer","skip_when_timer_is_running":"boolean","start_without_confirmation":"boolean","tag_ids":[\{\}],"task_id":"integer","type":"integer"\}],"windows_show_hide_toggl_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_stop_continue_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_stop_start_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_theme":"string","workout_default_project_id":"integer","workout_default_tag_id":"integer"\}')
if err != nil {
print(err)
}
req, err := http.NewRequest(http.MethodPost,
"https://api.track.toggl.com/api/v9/me/preferences", 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/me/preferences')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
req.body = \{"activity_timeline_display_activity":"boolean","activity_timeline_grouping_interval":"string","activity_timeline_grouping_method":"string","activity_timeline_recording_level":"string","activity_timeline_sync_events":"boolean","alpha_features":[\{"alpha_feature_id":"integer","code":"string","deleted_at":"string","description":"string","enabled":"boolean"\}],"analyticsAdvancedFilters":"boolean","auto_tracker_delay_enabled":"boolean","auto_tracker_delay_in_seconds":"integer","automatic_tagging":"boolean","autotracking_enabled":"boolean","beginningOfWeek":"integer","calendar_snap_duration":"string","calendar_snap_initial_location":"string","calendar_visible_hours_end":"integer","calendar_visible_hours_start":"integer","calendar_zoom_level":"string","cell_swipe_actions_enabled":"boolean","charts_view_type":"string","collapseDetailedReportEntries":"boolean","collapseTimeEntries":"boolean","dashboards_view_type":"string","date_format":"string","decimal_separator":"string","default_project_id":"integer","default_task_id":"integer","displayDensity":"string","distinctRates":"string","duration_format":"string","duration_format_on_timer_duration_field":"boolean","edit_popup_integration_timer":"boolean","extension_send_error_reports":"boolean","extension_send_usage_statistics":"boolean","firstSeenBusinessPromo":"integer","focus_app_on_time_entry_started":"boolean","focus_app_on_time_entry_stopped":"boolean","haptic_feedback_enabled":"boolean","hide_keyboard_shortcut":"boolean","idle_detection_enabled":"boolean","idle_detection_interval_in_minutes":"integer","inactivity_behavior":"string","ios_is_goals_view_shown":"boolean","is_goals_view_expanded":"boolean","is_goals_view_shown":"boolean","is_summary_total_view_visible":"boolean","keep_mini_timer_on_top":"boolean","keep_window_on_top":"boolean","keyboard_increment_timer_page":"integer","keyboard_shortcuts_enabled":"boolean","keyboard_shortcuts_share_time_entries":"boolean","mac_is_goals_view_shown":"boolean","macos_auto_tracking_rules":[\{"id":"string","keyword":"string","project_id":"integer","task_id":"integer"\}],"macos_show_hide_toggl_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"macos_stop_continue_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"manualEntryMode":"string","manualMode":"boolean","manualModeOverlaySeen":"boolean","modify_on_start_time_change":"string","offlineMode":"string","pg_time_zone_name":"string","pomodoro_auto_start_break":"boolean","pomodoro_auto_start_focus":"boolean","pomodoro_break_interval_in_minutes":"integer","pomodoro_break_project_id":"integer","pomodoro_break_start_sound_enabled":"boolean","pomodoro_break_tag_id":"integer","pomodoro_countdown_timer":"boolean","pomodoro_enabled":"boolean","pomodoro_focus_interval_in_minutes":"integer","pomodoro_focus_sound":"string","pomodoro_global_sound_enabled":"boolean","pomodoro_interval_end_sound":"boolean","pomodoro_interval_end_volume":"integer","pomodoro_longer_break_duration_in_minutes":"integer","pomodoro_prevent_screen_lock":"boolean","pomodoro_rounds_before_longer_break":"integer","pomodoro_session_start_sound_enabled":"boolean","pomodoro_show_notifications":"boolean","pomodoro_stop_timer_at_interval_end":"boolean","pomodoro_track_breaks_as_time_entries":"boolean","projectDashboardActivityMode":"string","project_shortcut_enabled":"boolean","record_timeline":"boolean","remember_last_project":"string","reminder_days":"string","reminder_enabled":"boolean","reminder_interval_in_minutes":"integer","reminder_period":"string","reminder_snoozing_in_minutes":"integer","reportRounding":"boolean","reportRoundingDirection":"string","reportRoundingStepInMinutes":"integer","reportsHideWeekends":"boolean","run_app_on_startup":"boolean","running_entry_warning":"string","running_timer_notification_enabled":"boolean","seenFollowModal":"boolean","seenFooterPopup":"boolean","seenProjectDashboardOverlay":"boolean","seenTogglButtonModal":"boolean","send_daily_project_invites":"boolean","send_product_emails":"boolean","send_timer_notifications":"boolean","send_weekly_report":"boolean","sharing_shortcut_enabled":"boolean","showTimeInTitle":"boolean","show_all_entries":"boolean","show_changelog":"boolean","show_description_in_menu_bar":"boolean","show_dock_icon":"boolean","show_events_in_calendar":"boolean","show_project_in_menu_bar":"boolean","show_qr_scanner":"boolean","show_seconds_in_menu_bar":"boolean","show_timeline_in_day_view":"boolean","show_timer_in_menu_bar":"boolean","show_today_total_in_menu_bar":"boolean","show_total_billable_hours":"boolean","show_weekend_on_timer_page":"boolean","show_workouts_in_calendar":"boolean","sleep_behaviour":"string","smart_alerts_option":"string","snowballReportRounding":"string","stack_times_on_manual_mode_after":"string","start_automatically":"boolean","start_shortcut_mode":"string","stop_at_specific_time":"boolean","stop_automatically":"boolean","stop_entry_on_shutdown":"boolean","stop_specified_time":"string","stopped_timer_notification_enabled":"boolean","suggestions_enabled":"boolean","summaryReportAmounts":"string","summaryReportDistinctRates":"boolean","summaryReportGrouping":"string","summaryReportSortAsc":"boolean","summaryReportSortField":"string","summaryReportSubGrouping":"string","summary_total_mode":"string","tags_shortcut_enabled":"boolean","theme":"string","time_entry_display_mode":"string","time_entry_ghost_suggestions_enabled":"boolean","time_entry_invitations_notification_enabled":"boolean","time_entry_start_stop_input_mode":"string","timeofday_format":"string","timerView":"string","timerViewMobile":"string","toSAcceptNeeded":"boolean","use_mini_timer":"boolean","visibleFooter":"string","webTimeEntryStarted":"boolean","webTimeEntryStopped":"boolean","weeklyReportGrouping":"string","weeklyReportValueToShow":"string","windows_auto_tracking_rules":[\{"billable":"boolean","description":"string","enabled":"boolean","id":"string","parameters":\{"duration":"string","keyword":"string","keyword_mode":"string","time_of_day":"string","week_days":"string"\},"project_id":"integer","skip_when_timer_is_running":"boolean","start_without_confirmation":"boolean","tag_ids":[\{\}],"task_id":"integer","type":"integer"\}],"windows_show_hide_toggl_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_stop_continue_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_stop_start_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_theme":"string","workout_default_project_id":"integer","workout_default_tag_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/me/preferences", {
method: "POST",
body: \{"activity_timeline_display_activity":"boolean","activity_timeline_grouping_interval":"string","activity_timeline_grouping_method":"string","activity_timeline_recording_level":"string","activity_timeline_sync_events":"boolean","alpha_features":[\{"alpha_feature_id":"integer","code":"string","deleted_at":"string","description":"string","enabled":"boolean"\}],"analyticsAdvancedFilters":"boolean","auto_tracker_delay_enabled":"boolean","auto_tracker_delay_in_seconds":"integer","automatic_tagging":"boolean","autotracking_enabled":"boolean","beginningOfWeek":"integer","calendar_snap_duration":"string","calendar_snap_initial_location":"string","calendar_visible_hours_end":"integer","calendar_visible_hours_start":"integer","calendar_zoom_level":"string","cell_swipe_actions_enabled":"boolean","charts_view_type":"string","collapseDetailedReportEntries":"boolean","collapseTimeEntries":"boolean","dashboards_view_type":"string","date_format":"string","decimal_separator":"string","default_project_id":"integer","default_task_id":"integer","displayDensity":"string","distinctRates":"string","duration_format":"string","duration_format_on_timer_duration_field":"boolean","edit_popup_integration_timer":"boolean","extension_send_error_reports":"boolean","extension_send_usage_statistics":"boolean","firstSeenBusinessPromo":"integer","focus_app_on_time_entry_started":"boolean","focus_app_on_time_entry_stopped":"boolean","haptic_feedback_enabled":"boolean","hide_keyboard_shortcut":"boolean","idle_detection_enabled":"boolean","idle_detection_interval_in_minutes":"integer","inactivity_behavior":"string","ios_is_goals_view_shown":"boolean","is_goals_view_expanded":"boolean","is_goals_view_shown":"boolean","is_summary_total_view_visible":"boolean","keep_mini_timer_on_top":"boolean","keep_window_on_top":"boolean","keyboard_increment_timer_page":"integer","keyboard_shortcuts_enabled":"boolean","keyboard_shortcuts_share_time_entries":"boolean","mac_is_goals_view_shown":"boolean","macos_auto_tracking_rules":[\{"id":"string","keyword":"string","project_id":"integer","task_id":"integer"\}],"macos_show_hide_toggl_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"macos_stop_continue_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"manualEntryMode":"string","manualMode":"boolean","manualModeOverlaySeen":"boolean","modify_on_start_time_change":"string","offlineMode":"string","pg_time_zone_name":"string","pomodoro_auto_start_break":"boolean","pomodoro_auto_start_focus":"boolean","pomodoro_break_interval_in_minutes":"integer","pomodoro_break_project_id":"integer","pomodoro_break_start_sound_enabled":"boolean","pomodoro_break_tag_id":"integer","pomodoro_countdown_timer":"boolean","pomodoro_enabled":"boolean","pomodoro_focus_interval_in_minutes":"integer","pomodoro_focus_sound":"string","pomodoro_global_sound_enabled":"boolean","pomodoro_interval_end_sound":"boolean","pomodoro_interval_end_volume":"integer","pomodoro_longer_break_duration_in_minutes":"integer","pomodoro_prevent_screen_lock":"boolean","pomodoro_rounds_before_longer_break":"integer","pomodoro_session_start_sound_enabled":"boolean","pomodoro_show_notifications":"boolean","pomodoro_stop_timer_at_interval_end":"boolean","pomodoro_track_breaks_as_time_entries":"boolean","projectDashboardActivityMode":"string","project_shortcut_enabled":"boolean","record_timeline":"boolean","remember_last_project":"string","reminder_days":"string","reminder_enabled":"boolean","reminder_interval_in_minutes":"integer","reminder_period":"string","reminder_snoozing_in_minutes":"integer","reportRounding":"boolean","reportRoundingDirection":"string","reportRoundingStepInMinutes":"integer","reportsHideWeekends":"boolean","run_app_on_startup":"boolean","running_entry_warning":"string","running_timer_notification_enabled":"boolean","seenFollowModal":"boolean","seenFooterPopup":"boolean","seenProjectDashboardOverlay":"boolean","seenTogglButtonModal":"boolean","send_daily_project_invites":"boolean","send_product_emails":"boolean","send_timer_notifications":"boolean","send_weekly_report":"boolean","sharing_shortcut_enabled":"boolean","showTimeInTitle":"boolean","show_all_entries":"boolean","show_changelog":"boolean","show_description_in_menu_bar":"boolean","show_dock_icon":"boolean","show_events_in_calendar":"boolean","show_project_in_menu_bar":"boolean","show_qr_scanner":"boolean","show_seconds_in_menu_bar":"boolean","show_timeline_in_day_view":"boolean","show_timer_in_menu_bar":"boolean","show_today_total_in_menu_bar":"boolean","show_total_billable_hours":"boolean","show_weekend_on_timer_page":"boolean","show_workouts_in_calendar":"boolean","sleep_behaviour":"string","smart_alerts_option":"string","snowballReportRounding":"string","stack_times_on_manual_mode_after":"string","start_automatically":"boolean","start_shortcut_mode":"string","stop_at_specific_time":"boolean","stop_automatically":"boolean","stop_entry_on_shutdown":"boolean","stop_specified_time":"string","stopped_timer_notification_enabled":"boolean","suggestions_enabled":"boolean","summaryReportAmounts":"string","summaryReportDistinctRates":"boolean","summaryReportGrouping":"string","summaryReportSortAsc":"boolean","summaryReportSortField":"string","summaryReportSubGrouping":"string","summary_total_mode":"string","tags_shortcut_enabled":"boolean","theme":"string","time_entry_display_mode":"string","time_entry_ghost_suggestions_enabled":"boolean","time_entry_invitations_notification_enabled":"boolean","time_entry_start_stop_input_mode":"string","timeofday_format":"string","timerView":"string","timerViewMobile":"string","toSAcceptNeeded":"boolean","use_mini_timer":"boolean","visibleFooter":"string","webTimeEntryStarted":"boolean","webTimeEntryStopped":"boolean","weeklyReportGrouping":"string","weeklyReportValueToShow":"string","windows_auto_tracking_rules":[\{"billable":"boolean","description":"string","enabled":"boolean","id":"string","parameters":\{"duration":"string","keyword":"string","keyword_mode":"string","time_of_day":"string","week_days":"string"\},"project_id":"integer","skip_when_timer_is_running":"boolean","start_without_confirmation":"boolean","tag_ids":[\{\}],"task_id":"integer","type":"integer"\}],"windows_show_hide_toggl_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_stop_continue_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_stop_start_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_theme":"string","workout_default_project_id":"integer","workout_default_tag_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/me/preferences', json=\{"activity_timeline_display_activity":"boolean","activity_timeline_grouping_interval":"string","activity_timeline_grouping_method":"string","activity_timeline_recording_level":"string","activity_timeline_sync_events":"boolean","alpha_features":[\{"alpha_feature_id":"integer","code":"string","deleted_at":"string","description":"string","enabled":"boolean"\}],"analyticsAdvancedFilters":"boolean","auto_tracker_delay_enabled":"boolean","auto_tracker_delay_in_seconds":"integer","automatic_tagging":"boolean","autotracking_enabled":"boolean","beginningOfWeek":"integer","calendar_snap_duration":"string","calendar_snap_initial_location":"string","calendar_visible_hours_end":"integer","calendar_visible_hours_start":"integer","calendar_zoom_level":"string","cell_swipe_actions_enabled":"boolean","charts_view_type":"string","collapseDetailedReportEntries":"boolean","collapseTimeEntries":"boolean","dashboards_view_type":"string","date_format":"string","decimal_separator":"string","default_project_id":"integer","default_task_id":"integer","displayDensity":"string","distinctRates":"string","duration_format":"string","duration_format_on_timer_duration_field":"boolean","edit_popup_integration_timer":"boolean","extension_send_error_reports":"boolean","extension_send_usage_statistics":"boolean","firstSeenBusinessPromo":"integer","focus_app_on_time_entry_started":"boolean","focus_app_on_time_entry_stopped":"boolean","haptic_feedback_enabled":"boolean","hide_keyboard_shortcut":"boolean","idle_detection_enabled":"boolean","idle_detection_interval_in_minutes":"integer","inactivity_behavior":"string","ios_is_goals_view_shown":"boolean","is_goals_view_expanded":"boolean","is_goals_view_shown":"boolean","is_summary_total_view_visible":"boolean","keep_mini_timer_on_top":"boolean","keep_window_on_top":"boolean","keyboard_increment_timer_page":"integer","keyboard_shortcuts_enabled":"boolean","keyboard_shortcuts_share_time_entries":"boolean","mac_is_goals_view_shown":"boolean","macos_auto_tracking_rules":[\{"id":"string","keyword":"string","project_id":"integer","task_id":"integer"\}],"macos_show_hide_toggl_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"macos_stop_continue_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"manualEntryMode":"string","manualMode":"boolean","manualModeOverlaySeen":"boolean","modify_on_start_time_change":"string","offlineMode":"string","pg_time_zone_name":"string","pomodoro_auto_start_break":"boolean","pomodoro_auto_start_focus":"boolean","pomodoro_break_interval_in_minutes":"integer","pomodoro_break_project_id":"integer","pomodoro_break_start_sound_enabled":"boolean","pomodoro_break_tag_id":"integer","pomodoro_countdown_timer":"boolean","pomodoro_enabled":"boolean","pomodoro_focus_interval_in_minutes":"integer","pomodoro_focus_sound":"string","pomodoro_global_sound_enabled":"boolean","pomodoro_interval_end_sound":"boolean","pomodoro_interval_end_volume":"integer","pomodoro_longer_break_duration_in_minutes":"integer","pomodoro_prevent_screen_lock":"boolean","pomodoro_rounds_before_longer_break":"integer","pomodoro_session_start_sound_enabled":"boolean","pomodoro_show_notifications":"boolean","pomodoro_stop_timer_at_interval_end":"boolean","pomodoro_track_breaks_as_time_entries":"boolean","projectDashboardActivityMode":"string","project_shortcut_enabled":"boolean","record_timeline":"boolean","remember_last_project":"string","reminder_days":"string","reminder_enabled":"boolean","reminder_interval_in_minutes":"integer","reminder_period":"string","reminder_snoozing_in_minutes":"integer","reportRounding":"boolean","reportRoundingDirection":"string","reportRoundingStepInMinutes":"integer","reportsHideWeekends":"boolean","run_app_on_startup":"boolean","running_entry_warning":"string","running_timer_notification_enabled":"boolean","seenFollowModal":"boolean","seenFooterPopup":"boolean","seenProjectDashboardOverlay":"boolean","seenTogglButtonModal":"boolean","send_daily_project_invites":"boolean","send_product_emails":"boolean","send_timer_notifications":"boolean","send_weekly_report":"boolean","sharing_shortcut_enabled":"boolean","showTimeInTitle":"boolean","show_all_entries":"boolean","show_changelog":"boolean","show_description_in_menu_bar":"boolean","show_dock_icon":"boolean","show_events_in_calendar":"boolean","show_project_in_menu_bar":"boolean","show_qr_scanner":"boolean","show_seconds_in_menu_bar":"boolean","show_timeline_in_day_view":"boolean","show_timer_in_menu_bar":"boolean","show_today_total_in_menu_bar":"boolean","show_total_billable_hours":"boolean","show_weekend_on_timer_page":"boolean","show_workouts_in_calendar":"boolean","sleep_behaviour":"string","smart_alerts_option":"string","snowballReportRounding":"string","stack_times_on_manual_mode_after":"string","start_automatically":"boolean","start_shortcut_mode":"string","stop_at_specific_time":"boolean","stop_automatically":"boolean","stop_entry_on_shutdown":"boolean","stop_specified_time":"string","stopped_timer_notification_enabled":"boolean","suggestions_enabled":"boolean","summaryReportAmounts":"string","summaryReportDistinctRates":"boolean","summaryReportGrouping":"string","summaryReportSortAsc":"boolean","summaryReportSortField":"string","summaryReportSubGrouping":"string","summary_total_mode":"string","tags_shortcut_enabled":"boolean","theme":"string","time_entry_display_mode":"string","time_entry_ghost_suggestions_enabled":"boolean","time_entry_invitations_notification_enabled":"boolean","time_entry_start_stop_input_mode":"string","timeofday_format":"string","timerView":"string","timerViewMobile":"string","toSAcceptNeeded":"boolean","use_mini_timer":"boolean","visibleFooter":"string","webTimeEntryStarted":"boolean","webTimeEntryStopped":"boolean","weeklyReportGrouping":"string","weeklyReportValueToShow":"string","windows_auto_tracking_rules":[\{"billable":"boolean","description":"string","enabled":"boolean","id":"string","parameters":\{"duration":"string","keyword":"string","keyword_mode":"string","time_of_day":"string","week_days":"string"\},"project_id":"integer","skip_when_timer_is_running":"boolean","start_without_confirmation":"boolean","tag_ids":[\{\}],"task_id":"integer","type":"integer"\}],"windows_show_hide_toggl_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_stop_continue_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_stop_start_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_theme":"string","workout_default_project_id":"integer","workout_default_tag_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/me/preferences".to_string())
.json(&serde_json::json!(\{"activity_timeline_display_activity":"boolean","activity_timeline_grouping_interval":"string","activity_timeline_grouping_method":"string","activity_timeline_recording_level":"string","activity_timeline_sync_events":"boolean","alpha_features":[\{"alpha_feature_id":"integer","code":"string","deleted_at":"string","description":"string","enabled":"boolean"\}],"analyticsAdvancedFilters":"boolean","auto_tracker_delay_enabled":"boolean","auto_tracker_delay_in_seconds":"integer","automatic_tagging":"boolean","autotracking_enabled":"boolean","beginningOfWeek":"integer","calendar_snap_duration":"string","calendar_snap_initial_location":"string","calendar_visible_hours_end":"integer","calendar_visible_hours_start":"integer","calendar_zoom_level":"string","cell_swipe_actions_enabled":"boolean","charts_view_type":"string","collapseDetailedReportEntries":"boolean","collapseTimeEntries":"boolean","dashboards_view_type":"string","date_format":"string","decimal_separator":"string","default_project_id":"integer","default_task_id":"integer","displayDensity":"string","distinctRates":"string","duration_format":"string","duration_format_on_timer_duration_field":"boolean","edit_popup_integration_timer":"boolean","extension_send_error_reports":"boolean","extension_send_usage_statistics":"boolean","firstSeenBusinessPromo":"integer","focus_app_on_time_entry_started":"boolean","focus_app_on_time_entry_stopped":"boolean","haptic_feedback_enabled":"boolean","hide_keyboard_shortcut":"boolean","idle_detection_enabled":"boolean","idle_detection_interval_in_minutes":"integer","inactivity_behavior":"string","ios_is_goals_view_shown":"boolean","is_goals_view_expanded":"boolean","is_goals_view_shown":"boolean","is_summary_total_view_visible":"boolean","keep_mini_timer_on_top":"boolean","keep_window_on_top":"boolean","keyboard_increment_timer_page":"integer","keyboard_shortcuts_enabled":"boolean","keyboard_shortcuts_share_time_entries":"boolean","mac_is_goals_view_shown":"boolean","macos_auto_tracking_rules":[\{"id":"string","keyword":"string","project_id":"integer","task_id":"integer"\}],"macos_show_hide_toggl_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"macos_stop_continue_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"manualEntryMode":"string","manualMode":"boolean","manualModeOverlaySeen":"boolean","modify_on_start_time_change":"string","offlineMode":"string","pg_time_zone_name":"string","pomodoro_auto_start_break":"boolean","pomodoro_auto_start_focus":"boolean","pomodoro_break_interval_in_minutes":"integer","pomodoro_break_project_id":"integer","pomodoro_break_start_sound_enabled":"boolean","pomodoro_break_tag_id":"integer","pomodoro_countdown_timer":"boolean","pomodoro_enabled":"boolean","pomodoro_focus_interval_in_minutes":"integer","pomodoro_focus_sound":"string","pomodoro_global_sound_enabled":"boolean","pomodoro_interval_end_sound":"boolean","pomodoro_interval_end_volume":"integer","pomodoro_longer_break_duration_in_minutes":"integer","pomodoro_prevent_screen_lock":"boolean","pomodoro_rounds_before_longer_break":"integer","pomodoro_session_start_sound_enabled":"boolean","pomodoro_show_notifications":"boolean","pomodoro_stop_timer_at_interval_end":"boolean","pomodoro_track_breaks_as_time_entries":"boolean","projectDashboardActivityMode":"string","project_shortcut_enabled":"boolean","record_timeline":"boolean","remember_last_project":"string","reminder_days":"string","reminder_enabled":"boolean","reminder_interval_in_minutes":"integer","reminder_period":"string","reminder_snoozing_in_minutes":"integer","reportRounding":"boolean","reportRoundingDirection":"string","reportRoundingStepInMinutes":"integer","reportsHideWeekends":"boolean","run_app_on_startup":"boolean","running_entry_warning":"string","running_timer_notification_enabled":"boolean","seenFollowModal":"boolean","seenFooterPopup":"boolean","seenProjectDashboardOverlay":"boolean","seenTogglButtonModal":"boolean","send_daily_project_invites":"boolean","send_product_emails":"boolean","send_timer_notifications":"boolean","send_weekly_report":"boolean","sharing_shortcut_enabled":"boolean","showTimeInTitle":"boolean","show_all_entries":"boolean","show_changelog":"boolean","show_description_in_menu_bar":"boolean","show_dock_icon":"boolean","show_events_in_calendar":"boolean","show_project_in_menu_bar":"boolean","show_qr_scanner":"boolean","show_seconds_in_menu_bar":"boolean","show_timeline_in_day_view":"boolean","show_timer_in_menu_bar":"boolean","show_today_total_in_menu_bar":"boolean","show_total_billable_hours":"boolean","show_weekend_on_timer_page":"boolean","show_workouts_in_calendar":"boolean","sleep_behaviour":"string","smart_alerts_option":"string","snowballReportRounding":"string","stack_times_on_manual_mode_after":"string","start_automatically":"boolean","start_shortcut_mode":"string","stop_at_specific_time":"boolean","stop_automatically":"boolean","stop_entry_on_shutdown":"boolean","stop_specified_time":"string","stopped_timer_notification_enabled":"boolean","suggestions_enabled":"boolean","summaryReportAmounts":"string","summaryReportDistinctRates":"boolean","summaryReportGrouping":"string","summaryReportSortAsc":"boolean","summaryReportSortField":"string","summaryReportSubGrouping":"string","summary_total_mode":"string","tags_shortcut_enabled":"boolean","theme":"string","time_entry_display_mode":"string","time_entry_ghost_suggestions_enabled":"boolean","time_entry_invitations_notification_enabled":"boolean","time_entry_start_stop_input_mode":"string","timeofday_format":"string","timerView":"string","timerViewMobile":"string","toSAcceptNeeded":"boolean","use_mini_timer":"boolean","visibleFooter":"string","webTimeEntryStarted":"boolean","webTimeEntryStopped":"boolean","weeklyReportGrouping":"string","weeklyReportValueToShow":"string","windows_auto_tracking_rules":[\{"billable":"boolean","description":"string","enabled":"boolean","id":"string","parameters":\{"duration":"string","keyword":"string","keyword_mode":"string","time_of_day":"string","week_days":"string"\},"project_id":"integer","skip_when_timer_is_running":"boolean","start_without_confirmation":"boolean","tag_ids":[\{\}],"task_id":"integer","type":"integer"\}],"windows_show_hide_toggl_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_stop_continue_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_stop_start_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_theme":"string","workout_default_project_id":"integer","workout_default_tag_id":"integer"\}))
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters
Body
Name | Type | Description |
---|---|---|
activity_timeline_display_activity | boolean | - |
activity_timeline_grouping_interval | string | - |
activity_timeline_grouping_method | string | - |
activity_timeline_recording_level | string | - |
activity_timeline_sync_events | boolean | - |
alpha_features | Array of object | will be omitted if empty |
analyticsAdvancedFilters | boolean | will be omitted if empty |
auto_tracker_delay_enabled | boolean | - |
auto_tracker_delay_in_seconds | integer | - |
automatic_tagging | boolean | - |
autotracking_enabled | boolean | - |
beginningOfWeek | integer | will be omitted if empty |
calendar_snap_duration | string | - |
calendar_snap_initial_location | string | - |
calendar_visible_hours_end | integer | - |
calendar_visible_hours_start | integer | - |
calendar_zoom_level | string | - |
cell_swipe_actions_enabled | boolean | - |
charts_view_type | string | - |
collapseDetailedReportEntries | boolean | will be omitted if empty |
collapseTimeEntries | boolean | will be omitted if empty |
dashboards_view_type | string | - |
date_format | string | - |
decimal_separator | string | will be omitted if empty |
default_project_id | integer | - |
default_task_id | integer | - |
displayDensity | string | will be omitted if empty |
distinctRates | string | will be omitted if empty |
duration_format | string | - |
duration_format_on_timer_duration_field | boolean | - |
edit_popup_integration_timer | boolean | - |
extension_send_error_reports | boolean | - |
extension_send_usage_statistics | boolean | - |
firstSeenBusinessPromo | integer | will be omitted if empty |
focus_app_on_time_entry_started | boolean | - |
focus_app_on_time_entry_stopped | boolean | - |
haptic_feedback_enabled | boolean | - |
hide_keyboard_shortcut | boolean | will be omitted if empty |
idle_detection_enabled | boolean | - |
idle_detection_interval_in_minutes | integer | - |
inactivity_behavior | string | - |
ios_is_goals_view_shown | boolean | - |
is_goals_view_expanded | boolean | - |
is_goals_view_shown | boolean | - |
is_summary_total_view_visible | boolean | - |
keep_mini_timer_on_top | boolean | - |
keep_window_on_top | boolean | - |
keyboard_increment_timer_page | integer | - |
keyboard_shortcuts_enabled | boolean | will be omitted if empty |
keyboard_shortcuts_share_time_entries | boolean | - |
mac_is_goals_view_shown | boolean | - |
macos_auto_tracking_rules | Array of object | - |
macos_show_hide_toggl_keyboard_shortcut | object | - |
macos_stop_continue_keyboard_shortcut | object | - |
manualEntryMode | string | will be omitted if empty |
manualMode | boolean | will be omitted if empty |
manualModeOverlaySeen | boolean | will be omitted if empty |
modify_on_start_time_change | string | - |
offlineMode | string | will be omitted if empty |
pg_time_zone_name | string | - |
pomodoro_auto_start_break | boolean | - |
pomodoro_auto_start_focus | boolean | - |
pomodoro_break_interval_in_minutes | integer | - |
pomodoro_break_project_id | integer | - |
pomodoro_break_start_sound_enabled | boolean | - |
pomodoro_break_tag_id | integer | - |
pomodoro_countdown_timer | boolean | - |
pomodoro_enabled | boolean | - |
pomodoro_focus_interval_in_minutes | integer | - |
pomodoro_focus_sound | string | - |
pomodoro_global_sound_enabled | boolean | - |
pomodoro_interval_end_sound | boolean | - |
pomodoro_interval_end_volume | integer | - |
pomodoro_longer_break_duration_in_minutes | integer | - |
pomodoro_prevent_screen_lock | boolean | - |
pomodoro_rounds_before_longer_break | integer | - |
pomodoro_session_start_sound_enabled | boolean | - |
pomodoro_show_notifications | boolean | - |
pomodoro_stop_timer_at_interval_end | boolean | - |
pomodoro_track_breaks_as_time_entries | boolean | - |
projectDashboardActivityMode | string | will be omitted if empty |
project_shortcut_enabled | boolean | - |
record_timeline | boolean | - |
remember_last_project | string | - |
reminder_days | string | - |
reminder_enabled | boolean | - |
reminder_interval_in_minutes | integer | - |
reminder_period | string | - |
reminder_snoozing_in_minutes | integer | - |
reportRounding | boolean | will be omitted if empty |
reportRoundingDirection | string | will be omitted if empty |
reportRoundingStepInMinutes | integer | will be omitted if empty |
reportsHideWeekends | boolean | will be omitted if empty |
run_app_on_startup | boolean | - |
running_entry_warning | string | - |
running_timer_notification_enabled | boolean | - |
seenFollowModal | boolean | will be omitted if empty |
seenFooterPopup | boolean | will be omitted if empty |
seenProjectDashboardOverlay | boolean | will be omitted if empty |
seenTogglButtonModal | boolean | will be omitted if empty |
send_daily_project_invites | boolean | - |
send_product_emails | boolean | - |
send_timer_notifications | boolean | - |
send_weekly_report | boolean | - |
sharing_shortcut_enabled | boolean | - |
showTimeInTitle | boolean | will be omitted if empty |
show_all_entries | boolean | - |
show_changelog | boolean | - |
show_description_in_menu_bar | boolean | - |
show_dock_icon | boolean | - |
show_events_in_calendar | boolean | - |
show_project_in_menu_bar | boolean | - |
show_qr_scanner | boolean | - |
show_seconds_in_menu_bar | boolean | - |
show_timeline_in_day_view | boolean | will be omitted if empty |
show_timer_in_menu_bar | boolean | - |
show_today_total_in_menu_bar | boolean | - |
show_total_billable_hours | boolean | will be omitted if empty |
show_weekend_on_timer_page | boolean | will be omitted if empty |
show_workouts_in_calendar | boolean | - |
sleep_behaviour | string | - |
smart_alerts_option | string | - |
snowballReportRounding | string | will be omitted if empty |
stack_times_on_manual_mode_after | string | - |
start_automatically | boolean | - |
start_shortcut_mode | string | - |
stop_at_specific_time | boolean | - |
stop_automatically | boolean | - |
stop_entry_on_shutdown | boolean | - |
stop_specified_time | string | - |
stopped_timer_notification_enabled | boolean | - |
suggestions_enabled | boolean | - |
summaryReportAmounts | string | will be omitted if empty |
summaryReportDistinctRates | boolean | will be omitted if empty |
summaryReportGrouping | string | will be omitted if empty |
summaryReportSortAsc | boolean | will be omitted if empty |
summaryReportSortField | string | will be omitted if empty |
summaryReportSubGrouping | string | will be omitted if empty |
summary_total_mode | string | - |
tags_shortcut_enabled | boolean | - |
theme | string | will be omitted if empty |
time_entry_display_mode | string | - |
time_entry_ghost_suggestions_enabled | boolean | - |
time_entry_invitations_notification_enabled | boolean | - |
time_entry_start_stop_input_mode | string | - |
timeofday_format | string | - |
timerView | string | will be omitted if empty |
timerViewMobile | string | will be omitted if empty |
toSAcceptNeeded | boolean | ToSAcceptNeeded represents the trigger for new ToS accept dialog |
use_mini_timer | boolean | - |
visibleFooter | string | will be omitted if empty |
webTimeEntryStarted | boolean | will be omitted if empty |
webTimeEntryStopped | boolean | will be omitted if empty |
weeklyReportGrouping | string | will be omitted if empty |
weeklyReportValueToShow | string | will be omitted if empty |
windows_auto_tracking_rules | Array of object | - |
windows_show_hide_toggl_keyboard_shortcut | object | - |
windows_stop_continue_keyboard_shortcut | object | - |
windows_stop_start_keyboard_shortcut | object | - |
windows_theme | string | - |
workout_default_project_id | integer | - |
workout_default_tag_id | integer | - |
alpha_features
Name | Type | Description |
---|---|---|
alpha_feature_id | integer | Feature ID |
code | string | Feature code |
deleted_at | string | Time of deletion, omitted if empty |
description | string | Feature description, omitted if empty |
enabled | boolean | Whether the feature is enabled |
macos_auto_tracking_rules
Name | Type | Description |
---|---|---|
id | string | - |
keyword | string | - |
project_id | integer | - |
task_id | integer | - |
macos_show_hide_toggl_keyboard_shortcut
Name | Type | Description |
---|---|---|
key | integer | - |
modifiers | integer | - |
macos_stop_continue_keyboard_shortcut
Name | Type | Description |
---|---|---|
key | integer | - |
modifiers | integer | - |
windows_auto_tracking_rules
Name | Type | Description |
---|---|---|
billable | boolean | - |
description | string | - |
enabled | boolean | - |
id | string | - |
parameters | object | - |
project_id | integer | - |
skip_when_timer_is_running | boolean | - |
start_without_confirmation | boolean | - |
tag_ids | Array of integer | - |
task_id | integer | - |
type | integer | - |
parameters
Name | Type | Description |
---|---|---|
duration | string | - |
keyword | string | - |
keyword_mode | string | - |
time_of_day | string | - |
week_days | string | - |
windows_show_hide_toggl_keyboard_shortcut
Name | Type | Description |
---|---|---|
key | integer | - |
modifiers | integer | - |
windows_stop_continue_keyboard_shortcut
Name | Type | Description |
---|---|---|
key | integer | - |
modifiers | integer | - |
windows_stop_start_keyboard_shortcut
Name | Type | Description |
---|---|---|
key | integer | - |
modifiers | integer | - |
Response
200
Successful operation.
400
Possible error messages:
- Cannot set value for ToSAcceptNeeded
- Invalid feature code(s)
- Missing data
- Value in date_format is invalid
- Value in timeofday_format is invalid
403
User does not have access to this resource.
500
Internal Server Error
GET Preferences for an specific client of the current user
https://api.track.toggl.com/api/v9/me/preferences/{client}
Returns user preferences and alpha features. The list of alpha features contains a full list of feature codes (every feature that exists in database) and the enabled
flag specifying if that feature should be enabled or disabled for the user.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl https://api.track.toggl.com/api/v9/me/preferences/{client} \
-H "Content-Type: application/json" \
-u <email>:<password>
req, err := http.NewRequest(http.MethodGet,
"https://api.track.toggl.com/api/v9/me/preferences/{client}")
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/me/preferences/{client}')
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/me/preferences/{client}", {
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/me/preferences/{client}', 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/me/preferences/{client}".to_string())
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters
Path
name | type | required | description |
---|---|---|---|
client | string | false | Client type |
Query
name | type | required | description |
---|---|---|---|
since | integer | false | Retrieve preference modified since this date using UNIX timestamp. |
Response
200
Name | Type | Description |
---|---|---|
activity_timeline_display_activity | boolean | - |
activity_timeline_grouping_interval | string | - |
activity_timeline_grouping_method | string | - |
activity_timeline_recording_level | string | - |
activity_timeline_sync_events | boolean | - |
alpha_features | Array of object | will be omitted if empty |
analyticsAdvancedFilters | boolean | will be omitted if empty |
auto_tracker_delay_enabled | boolean | - |
auto_tracker_delay_in_seconds | integer | - |
automatic_tagging | boolean | - |
autotracking_enabled | boolean | - |
beginningOfWeek | integer | will be omitted if empty |
calendar_snap_duration | string | - |
calendar_snap_initial_location | string | - |
calendar_visible_hours_end | integer | - |
calendar_visible_hours_start | integer | - |
calendar_zoom_level | string | - |
cell_swipe_actions_enabled | boolean | - |
charts_view_type | string | - |
collapseDetailedReportEntries | boolean | will be omitted if empty |
collapseTimeEntries | boolean | will be omitted if empty |
dashboards_view_type | string | - |
date_format | string | - |
decimal_separator | string | will be omitted if empty |
default_project_id | integer | - |
default_task_id | integer | - |
displayDensity | string | will be omitted if empty |
distinctRates | string | will be omitted if empty |
duration_format | string | - |
duration_format_on_timer_duration_field | boolean | - |
edit_popup_integration_timer | boolean | - |
extension_send_error_reports | boolean | - |
extension_send_usage_statistics | boolean | - |
firstSeenBusinessPromo | integer | will be omitted if empty |
focus_app_on_time_entry_started | boolean | - |
focus_app_on_time_entry_stopped | boolean | - |
haptic_feedback_enabled | boolean | - |
hide_keyboard_shortcut | boolean | will be omitted if empty |
idle_detection_enabled | boolean | - |
idle_detection_interval_in_minutes | integer | - |
inactivity_behavior | string | - |
ios_is_goals_view_shown | boolean | - |
is_goals_view_expanded | boolean | - |
is_goals_view_shown | boolean | - |
is_summary_total_view_visible | boolean | - |
keep_mini_timer_on_top | boolean | - |
keep_window_on_top | boolean | - |
keyboard_increment_timer_page | integer | - |
keyboard_shortcuts_enabled | boolean | will be omitted if empty |
keyboard_shortcuts_share_time_entries | boolean | - |
mac_is_goals_view_shown | boolean | - |
macos_auto_tracking_rules | Array of object | - |
macos_show_hide_toggl_keyboard_shortcut | object | - |
macos_stop_continue_keyboard_shortcut | object | - |
manualEntryMode | string | will be omitted if empty |
manualMode | boolean | will be omitted if empty |
manualModeOverlaySeen | boolean | will be omitted if empty |
modify_on_start_time_change | string | - |
offlineMode | string | will be omitted if empty |
pg_time_zone_name | string | - |
pomodoro_auto_start_break | boolean | - |
pomodoro_auto_start_focus | boolean | - |
pomodoro_break_interval_in_minutes | integer | - |
pomodoro_break_project_id | integer | - |
pomodoro_break_start_sound_enabled | boolean | - |
pomodoro_break_tag_id | integer | - |
pomodoro_countdown_timer | boolean | - |
pomodoro_enabled | boolean | - |
pomodoro_focus_interval_in_minutes | integer | - |
pomodoro_focus_sound | string | - |
pomodoro_global_sound_enabled | boolean | - |
pomodoro_interval_end_sound | boolean | - |
pomodoro_interval_end_volume | integer | - |
pomodoro_longer_break_duration_in_minutes | integer | - |
pomodoro_prevent_screen_lock | boolean | - |
pomodoro_rounds_before_longer_break | integer | - |
pomodoro_session_start_sound_enabled | boolean | - |
pomodoro_show_notifications | boolean | - |
pomodoro_stop_timer_at_interval_end | boolean | - |
pomodoro_track_breaks_as_time_entries | boolean | - |
projectDashboardActivityMode | string | will be omitted if empty |
project_shortcut_enabled | boolean | - |
record_timeline | boolean | - |
remember_last_project | string | - |
reminder_days | string | - |
reminder_enabled | boolean | - |
reminder_interval_in_minutes | integer | - |
reminder_period | string | - |
reminder_snoozing_in_minutes | integer | - |
reportRounding | boolean | will be omitted if empty |
reportRoundingDirection | string | will be omitted if empty |
reportRoundingStepInMinutes | integer | will be omitted if empty |
reportsHideWeekends | boolean | will be omitted if empty |
run_app_on_startup | boolean | - |
running_entry_warning | string | - |
running_timer_notification_enabled | boolean | - |
seenFollowModal | boolean | will be omitted if empty |
seenFooterPopup | boolean | will be omitted if empty |
seenProjectDashboardOverlay | boolean | will be omitted if empty |
seenTogglButtonModal | boolean | will be omitted if empty |
send_daily_project_invites | boolean | - |
send_product_emails | boolean | - |
send_timer_notifications | boolean | - |
send_weekly_report | boolean | - |
sharing_shortcut_enabled | boolean | - |
showTimeInTitle | boolean | will be omitted if empty |
show_all_entries | boolean | - |
show_changelog | boolean | - |
show_description_in_menu_bar | boolean | - |
show_dock_icon | boolean | - |
show_events_in_calendar | boolean | - |
show_project_in_menu_bar | boolean | - |
show_qr_scanner | boolean | - |
show_seconds_in_menu_bar | boolean | - |
show_timeline_in_day_view | boolean | will be omitted if empty |
show_timer_in_menu_bar | boolean | - |
show_today_total_in_menu_bar | boolean | - |
show_total_billable_hours | boolean | will be omitted if empty |
show_weekend_on_timer_page | boolean | will be omitted if empty |
show_workouts_in_calendar | boolean | - |
sleep_behaviour | string | - |
smart_alerts_option | string | - |
snowballReportRounding | string | will be omitted if empty |
stack_times_on_manual_mode_after | string | - |
start_automatically | boolean | - |
start_shortcut_mode | string | - |
stop_at_specific_time | boolean | - |
stop_automatically | boolean | - |
stop_entry_on_shutdown | boolean | - |
stop_specified_time | string | - |
stopped_timer_notification_enabled | boolean | - |
suggestions_enabled | boolean | - |
summaryReportAmounts | string | will be omitted if empty |
summaryReportDistinctRates | boolean | will be omitted if empty |
summaryReportGrouping | string | will be omitted if empty |
summaryReportSortAsc | boolean | will be omitted if empty |
summaryReportSortField | string | will be omitted if empty |
summaryReportSubGrouping | string | will be omitted if empty |
summary_total_mode | string | - |
tags_shortcut_enabled | boolean | - |
theme | string | will be omitted if empty |
time_entry_display_mode | string | - |
time_entry_ghost_suggestions_enabled | boolean | - |
time_entry_invitations_notification_enabled | boolean | - |
time_entry_start_stop_input_mode | string | - |
timeofday_format | string | - |
timerView | string | will be omitted if empty |
timerViewMobile | string | will be omitted if empty |
toSAcceptNeeded | boolean | ToSAcceptNeeded represents the trigger for new ToS accept dialog |
use_mini_timer | boolean | - |
visibleFooter | string | will be omitted if empty |
webTimeEntryStarted | boolean | will be omitted if empty |
webTimeEntryStopped | boolean | will be omitted if empty |
weeklyReportGrouping | string | will be omitted if empty |
weeklyReportValueToShow | string | will be omitted if empty |
windows_auto_tracking_rules | Array of object | - |
windows_show_hide_toggl_keyboard_shortcut | object | - |
windows_stop_continue_keyboard_shortcut | object | - |
windows_stop_start_keyboard_shortcut | object | - |
windows_theme | string | - |
workout_default_project_id | integer | - |
workout_default_tag_id | integer | - |
alpha_features
Name | Type | Description |
---|---|---|
alpha_feature_id | integer | Feature ID |
code | string | Feature code |
deleted_at | string | Time of deletion, omitted if empty |
description | string | Feature description, omitted if empty |
enabled | boolean | Whether the feature is enabled |
macos_auto_tracking_rules
Name | Type | Description |
---|---|---|
id | string | - |
keyword | string | - |
project_id | integer | - |
task_id | integer | - |
macos_show_hide_toggl_keyboard_shortcut
Name | Type | Description |
---|---|---|
key | integer | - |
modifiers | integer | - |
macos_stop_continue_keyboard_shortcut
Name | Type | Description |
---|---|---|
key | integer | - |
modifiers | integer | - |
windows_auto_tracking_rules
Name | Type | Description |
---|---|---|
billable | boolean | - |
description | string | - |
enabled | boolean | - |
id | string | - |
parameters | object | - |
project_id | integer | - |
skip_when_timer_is_running | boolean | - |
start_without_confirmation | boolean | - |
tag_ids | Array of integer | - |
task_id | integer | - |
type | integer | - |
parameters
Name | Type | Description |
---|---|---|
duration | string | - |
keyword | string | - |
keyword_mode | string | - |
time_of_day | string | - |
week_days | string | - |
windows_show_hide_toggl_keyboard_shortcut
Name | Type | Description |
---|---|---|
key | integer | - |
modifiers | integer | - |
windows_stop_continue_keyboard_shortcut
Name | Type | Description |
---|---|---|
key | integer | - |
modifiers | integer | - |
windows_stop_start_keyboard_shortcut
Name | Type | Description |
---|---|---|
key | integer | - |
modifiers | integer | - |
400
Unknown client.
403
User does not have access to this resource.
500
Internal Server Error
POST Update the preferences for an specific client of the current user
https://api.track.toggl.com/api/v9/me/preferences/{client}
With this endpoint, preferences can be modified and alpha features can be enabled or disabled.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X POST https://api.track.toggl.com/api/v9/me/preferences/{client} \
-H "Content-Type: application/json" \
-d '\{"activity_timeline_display_activity":"boolean","activity_timeline_grouping_interval":"string","activity_timeline_grouping_method":"string","activity_timeline_recording_level":"string","activity_timeline_sync_events":"boolean","alpha_features":[\{"alpha_feature_id":"integer","code":"string","deleted_at":"string","description":"string","enabled":"boolean"\}],"analyticsAdvancedFilters":"boolean","auto_tracker_delay_enabled":"boolean","auto_tracker_delay_in_seconds":"integer","automatic_tagging":"boolean","autotracking_enabled":"boolean","beginningOfWeek":"integer","calendar_snap_duration":"string","calendar_snap_initial_location":"string","calendar_visible_hours_end":"integer","calendar_visible_hours_start":"integer","calendar_zoom_level":"string","cell_swipe_actions_enabled":"boolean","charts_view_type":"string","collapseDetailedReportEntries":"boolean","collapseTimeEntries":"boolean","dashboards_view_type":"string","date_format":"string","decimal_separator":"string","default_project_id":"integer","default_task_id":"integer","displayDensity":"string","distinctRates":"string","duration_format":"string","duration_format_on_timer_duration_field":"boolean","edit_popup_integration_timer":"boolean","extension_send_error_reports":"boolean","extension_send_usage_statistics":"boolean","firstSeenBusinessPromo":"integer","focus_app_on_time_entry_started":"boolean","focus_app_on_time_entry_stopped":"boolean","haptic_feedback_enabled":"boolean","hide_keyboard_shortcut":"boolean","idle_detection_enabled":"boolean","idle_detection_interval_in_minutes":"integer","inactivity_behavior":"string","ios_is_goals_view_shown":"boolean","is_goals_view_expanded":"boolean","is_goals_view_shown":"boolean","is_summary_total_view_visible":"boolean","keep_mini_timer_on_top":"boolean","keep_window_on_top":"boolean","keyboard_increment_timer_page":"integer","keyboard_shortcuts_enabled":"boolean","keyboard_shortcuts_share_time_entries":"boolean","mac_is_goals_view_shown":"boolean","macos_auto_tracking_rules":[\{"id":"string","keyword":"string","project_id":"integer","task_id":"integer"\}],"macos_show_hide_toggl_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"macos_stop_continue_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"manualEntryMode":"string","manualMode":"boolean","manualModeOverlaySeen":"boolean","modify_on_start_time_change":"string","offlineMode":"string","pg_time_zone_name":"string","pomodoro_auto_start_break":"boolean","pomodoro_auto_start_focus":"boolean","pomodoro_break_interval_in_minutes":"integer","pomodoro_break_project_id":"integer","pomodoro_break_start_sound_enabled":"boolean","pomodoro_break_tag_id":"integer","pomodoro_countdown_timer":"boolean","pomodoro_enabled":"boolean","pomodoro_focus_interval_in_minutes":"integer","pomodoro_focus_sound":"string","pomodoro_global_sound_enabled":"boolean","pomodoro_interval_end_sound":"boolean","pomodoro_interval_end_volume":"integer","pomodoro_longer_break_duration_in_minutes":"integer","pomodoro_prevent_screen_lock":"boolean","pomodoro_rounds_before_longer_break":"integer","pomodoro_session_start_sound_enabled":"boolean","pomodoro_show_notifications":"boolean","pomodoro_stop_timer_at_interval_end":"boolean","pomodoro_track_breaks_as_time_entries":"boolean","projectDashboardActivityMode":"string","project_shortcut_enabled":"boolean","record_timeline":"boolean","remember_last_project":"string","reminder_days":"string","reminder_enabled":"boolean","reminder_interval_in_minutes":"integer","reminder_period":"string","reminder_snoozing_in_minutes":"integer","reportRounding":"boolean","reportRoundingDirection":"string","reportRoundingStepInMinutes":"integer","reportsHideWeekends":"boolean","run_app_on_startup":"boolean","running_entry_warning":"string","running_timer_notification_enabled":"boolean","seenFollowModal":"boolean","seenFooterPopup":"boolean","seenProjectDashboardOverlay":"boolean","seenTogglButtonModal":"boolean","send_daily_project_invites":"boolean","send_product_emails":"boolean","send_timer_notifications":"boolean","send_weekly_report":"boolean","sharing_shortcut_enabled":"boolean","showTimeInTitle":"boolean","show_all_entries":"boolean","show_changelog":"boolean","show_description_in_menu_bar":"boolean","show_dock_icon":"boolean","show_events_in_calendar":"boolean","show_project_in_menu_bar":"boolean","show_qr_scanner":"boolean","show_seconds_in_menu_bar":"boolean","show_timeline_in_day_view":"boolean","show_timer_in_menu_bar":"boolean","show_today_total_in_menu_bar":"boolean","show_total_billable_hours":"boolean","show_weekend_on_timer_page":"boolean","show_workouts_in_calendar":"boolean","sleep_behaviour":"string","smart_alerts_option":"string","snowballReportRounding":"string","stack_times_on_manual_mode_after":"string","start_automatically":"boolean","start_shortcut_mode":"string","stop_at_specific_time":"boolean","stop_automatically":"boolean","stop_entry_on_shutdown":"boolean","stop_specified_time":"string","stopped_timer_notification_enabled":"boolean","suggestions_enabled":"boolean","summaryReportAmounts":"string","summaryReportDistinctRates":"boolean","summaryReportGrouping":"string","summaryReportSortAsc":"boolean","summaryReportSortField":"string","summaryReportSubGrouping":"string","summary_total_mode":"string","tags_shortcut_enabled":"boolean","theme":"string","time_entry_display_mode":"string","time_entry_ghost_suggestions_enabled":"boolean","time_entry_invitations_notification_enabled":"boolean","time_entry_start_stop_input_mode":"string","timeofday_format":"string","timerView":"string","timerViewMobile":"string","toSAcceptNeeded":"boolean","use_mini_timer":"boolean","visibleFooter":"string","webTimeEntryStarted":"boolean","webTimeEntryStopped":"boolean","weeklyReportGrouping":"string","weeklyReportValueToShow":"string","windows_auto_tracking_rules":[\{"billable":"boolean","description":"string","enabled":"boolean","id":"string","parameters":\{"duration":"string","keyword":"string","keyword_mode":"string","time_of_day":"string","week_days":"string"\},"project_id":"integer","skip_when_timer_is_running":"boolean","start_without_confirmation":"boolean","tag_ids":[\{\}],"task_id":"integer","type":"integer"\}],"windows_show_hide_toggl_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_stop_continue_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_stop_start_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_theme":"string","workout_default_project_id":"integer","workout_default_tag_id":"integer"\}' \
-u <email>:<password>
bytes, err := json.Marshal('\{"activity_timeline_display_activity":"boolean","activity_timeline_grouping_interval":"string","activity_timeline_grouping_method":"string","activity_timeline_recording_level":"string","activity_timeline_sync_events":"boolean","alpha_features":[\{"alpha_feature_id":"integer","code":"string","deleted_at":"string","description":"string","enabled":"boolean"\}],"analyticsAdvancedFilters":"boolean","auto_tracker_delay_enabled":"boolean","auto_tracker_delay_in_seconds":"integer","automatic_tagging":"boolean","autotracking_enabled":"boolean","beginningOfWeek":"integer","calendar_snap_duration":"string","calendar_snap_initial_location":"string","calendar_visible_hours_end":"integer","calendar_visible_hours_start":"integer","calendar_zoom_level":"string","cell_swipe_actions_enabled":"boolean","charts_view_type":"string","collapseDetailedReportEntries":"boolean","collapseTimeEntries":"boolean","dashboards_view_type":"string","date_format":"string","decimal_separator":"string","default_project_id":"integer","default_task_id":"integer","displayDensity":"string","distinctRates":"string","duration_format":"string","duration_format_on_timer_duration_field":"boolean","edit_popup_integration_timer":"boolean","extension_send_error_reports":"boolean","extension_send_usage_statistics":"boolean","firstSeenBusinessPromo":"integer","focus_app_on_time_entry_started":"boolean","focus_app_on_time_entry_stopped":"boolean","haptic_feedback_enabled":"boolean","hide_keyboard_shortcut":"boolean","idle_detection_enabled":"boolean","idle_detection_interval_in_minutes":"integer","inactivity_behavior":"string","ios_is_goals_view_shown":"boolean","is_goals_view_expanded":"boolean","is_goals_view_shown":"boolean","is_summary_total_view_visible":"boolean","keep_mini_timer_on_top":"boolean","keep_window_on_top":"boolean","keyboard_increment_timer_page":"integer","keyboard_shortcuts_enabled":"boolean","keyboard_shortcuts_share_time_entries":"boolean","mac_is_goals_view_shown":"boolean","macos_auto_tracking_rules":[\{"id":"string","keyword":"string","project_id":"integer","task_id":"integer"\}],"macos_show_hide_toggl_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"macos_stop_continue_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"manualEntryMode":"string","manualMode":"boolean","manualModeOverlaySeen":"boolean","modify_on_start_time_change":"string","offlineMode":"string","pg_time_zone_name":"string","pomodoro_auto_start_break":"boolean","pomodoro_auto_start_focus":"boolean","pomodoro_break_interval_in_minutes":"integer","pomodoro_break_project_id":"integer","pomodoro_break_start_sound_enabled":"boolean","pomodoro_break_tag_id":"integer","pomodoro_countdown_timer":"boolean","pomodoro_enabled":"boolean","pomodoro_focus_interval_in_minutes":"integer","pomodoro_focus_sound":"string","pomodoro_global_sound_enabled":"boolean","pomodoro_interval_end_sound":"boolean","pomodoro_interval_end_volume":"integer","pomodoro_longer_break_duration_in_minutes":"integer","pomodoro_prevent_screen_lock":"boolean","pomodoro_rounds_before_longer_break":"integer","pomodoro_session_start_sound_enabled":"boolean","pomodoro_show_notifications":"boolean","pomodoro_stop_timer_at_interval_end":"boolean","pomodoro_track_breaks_as_time_entries":"boolean","projectDashboardActivityMode":"string","project_shortcut_enabled":"boolean","record_timeline":"boolean","remember_last_project":"string","reminder_days":"string","reminder_enabled":"boolean","reminder_interval_in_minutes":"integer","reminder_period":"string","reminder_snoozing_in_minutes":"integer","reportRounding":"boolean","reportRoundingDirection":"string","reportRoundingStepInMinutes":"integer","reportsHideWeekends":"boolean","run_app_on_startup":"boolean","running_entry_warning":"string","running_timer_notification_enabled":"boolean","seenFollowModal":"boolean","seenFooterPopup":"boolean","seenProjectDashboardOverlay":"boolean","seenTogglButtonModal":"boolean","send_daily_project_invites":"boolean","send_product_emails":"boolean","send_timer_notifications":"boolean","send_weekly_report":"boolean","sharing_shortcut_enabled":"boolean","showTimeInTitle":"boolean","show_all_entries":"boolean","show_changelog":"boolean","show_description_in_menu_bar":"boolean","show_dock_icon":"boolean","show_events_in_calendar":"boolean","show_project_in_menu_bar":"boolean","show_qr_scanner":"boolean","show_seconds_in_menu_bar":"boolean","show_timeline_in_day_view":"boolean","show_timer_in_menu_bar":"boolean","show_today_total_in_menu_bar":"boolean","show_total_billable_hours":"boolean","show_weekend_on_timer_page":"boolean","show_workouts_in_calendar":"boolean","sleep_behaviour":"string","smart_alerts_option":"string","snowballReportRounding":"string","stack_times_on_manual_mode_after":"string","start_automatically":"boolean","start_shortcut_mode":"string","stop_at_specific_time":"boolean","stop_automatically":"boolean","stop_entry_on_shutdown":"boolean","stop_specified_time":"string","stopped_timer_notification_enabled":"boolean","suggestions_enabled":"boolean","summaryReportAmounts":"string","summaryReportDistinctRates":"boolean","summaryReportGrouping":"string","summaryReportSortAsc":"boolean","summaryReportSortField":"string","summaryReportSubGrouping":"string","summary_total_mode":"string","tags_shortcut_enabled":"boolean","theme":"string","time_entry_display_mode":"string","time_entry_ghost_suggestions_enabled":"boolean","time_entry_invitations_notification_enabled":"boolean","time_entry_start_stop_input_mode":"string","timeofday_format":"string","timerView":"string","timerViewMobile":"string","toSAcceptNeeded":"boolean","use_mini_timer":"boolean","visibleFooter":"string","webTimeEntryStarted":"boolean","webTimeEntryStopped":"boolean","weeklyReportGrouping":"string","weeklyReportValueToShow":"string","windows_auto_tracking_rules":[\{"billable":"boolean","description":"string","enabled":"boolean","id":"string","parameters":\{"duration":"string","keyword":"string","keyword_mode":"string","time_of_day":"string","week_days":"string"\},"project_id":"integer","skip_when_timer_is_running":"boolean","start_without_confirmation":"boolean","tag_ids":[\{\}],"task_id":"integer","type":"integer"\}],"windows_show_hide_toggl_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_stop_continue_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_stop_start_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_theme":"string","workout_default_project_id":"integer","workout_default_tag_id":"integer"\}')
if err != nil {
print(err)
}
req, err := http.NewRequest(http.MethodPost,
"https://api.track.toggl.com/api/v9/me/preferences/{client}", 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/me/preferences/{client}')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
req.body = \{"activity_timeline_display_activity":"boolean","activity_timeline_grouping_interval":"string","activity_timeline_grouping_method":"string","activity_timeline_recording_level":"string","activity_timeline_sync_events":"boolean","alpha_features":[\{"alpha_feature_id":"integer","code":"string","deleted_at":"string","description":"string","enabled":"boolean"\}],"analyticsAdvancedFilters":"boolean","auto_tracker_delay_enabled":"boolean","auto_tracker_delay_in_seconds":"integer","automatic_tagging":"boolean","autotracking_enabled":"boolean","beginningOfWeek":"integer","calendar_snap_duration":"string","calendar_snap_initial_location":"string","calendar_visible_hours_end":"integer","calendar_visible_hours_start":"integer","calendar_zoom_level":"string","cell_swipe_actions_enabled":"boolean","charts_view_type":"string","collapseDetailedReportEntries":"boolean","collapseTimeEntries":"boolean","dashboards_view_type":"string","date_format":"string","decimal_separator":"string","default_project_id":"integer","default_task_id":"integer","displayDensity":"string","distinctRates":"string","duration_format":"string","duration_format_on_timer_duration_field":"boolean","edit_popup_integration_timer":"boolean","extension_send_error_reports":"boolean","extension_send_usage_statistics":"boolean","firstSeenBusinessPromo":"integer","focus_app_on_time_entry_started":"boolean","focus_app_on_time_entry_stopped":"boolean","haptic_feedback_enabled":"boolean","hide_keyboard_shortcut":"boolean","idle_detection_enabled":"boolean","idle_detection_interval_in_minutes":"integer","inactivity_behavior":"string","ios_is_goals_view_shown":"boolean","is_goals_view_expanded":"boolean","is_goals_view_shown":"boolean","is_summary_total_view_visible":"boolean","keep_mini_timer_on_top":"boolean","keep_window_on_top":"boolean","keyboard_increment_timer_page":"integer","keyboard_shortcuts_enabled":"boolean","keyboard_shortcuts_share_time_entries":"boolean","mac_is_goals_view_shown":"boolean","macos_auto_tracking_rules":[\{"id":"string","keyword":"string","project_id":"integer","task_id":"integer"\}],"macos_show_hide_toggl_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"macos_stop_continue_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"manualEntryMode":"string","manualMode":"boolean","manualModeOverlaySeen":"boolean","modify_on_start_time_change":"string","offlineMode":"string","pg_time_zone_name":"string","pomodoro_auto_start_break":"boolean","pomodoro_auto_start_focus":"boolean","pomodoro_break_interval_in_minutes":"integer","pomodoro_break_project_id":"integer","pomodoro_break_start_sound_enabled":"boolean","pomodoro_break_tag_id":"integer","pomodoro_countdown_timer":"boolean","pomodoro_enabled":"boolean","pomodoro_focus_interval_in_minutes":"integer","pomodoro_focus_sound":"string","pomodoro_global_sound_enabled":"boolean","pomodoro_interval_end_sound":"boolean","pomodoro_interval_end_volume":"integer","pomodoro_longer_break_duration_in_minutes":"integer","pomodoro_prevent_screen_lock":"boolean","pomodoro_rounds_before_longer_break":"integer","pomodoro_session_start_sound_enabled":"boolean","pomodoro_show_notifications":"boolean","pomodoro_stop_timer_at_interval_end":"boolean","pomodoro_track_breaks_as_time_entries":"boolean","projectDashboardActivityMode":"string","project_shortcut_enabled":"boolean","record_timeline":"boolean","remember_last_project":"string","reminder_days":"string","reminder_enabled":"boolean","reminder_interval_in_minutes":"integer","reminder_period":"string","reminder_snoozing_in_minutes":"integer","reportRounding":"boolean","reportRoundingDirection":"string","reportRoundingStepInMinutes":"integer","reportsHideWeekends":"boolean","run_app_on_startup":"boolean","running_entry_warning":"string","running_timer_notification_enabled":"boolean","seenFollowModal":"boolean","seenFooterPopup":"boolean","seenProjectDashboardOverlay":"boolean","seenTogglButtonModal":"boolean","send_daily_project_invites":"boolean","send_product_emails":"boolean","send_timer_notifications":"boolean","send_weekly_report":"boolean","sharing_shortcut_enabled":"boolean","showTimeInTitle":"boolean","show_all_entries":"boolean","show_changelog":"boolean","show_description_in_menu_bar":"boolean","show_dock_icon":"boolean","show_events_in_calendar":"boolean","show_project_in_menu_bar":"boolean","show_qr_scanner":"boolean","show_seconds_in_menu_bar":"boolean","show_timeline_in_day_view":"boolean","show_timer_in_menu_bar":"boolean","show_today_total_in_menu_bar":"boolean","show_total_billable_hours":"boolean","show_weekend_on_timer_page":"boolean","show_workouts_in_calendar":"boolean","sleep_behaviour":"string","smart_alerts_option":"string","snowballReportRounding":"string","stack_times_on_manual_mode_after":"string","start_automatically":"boolean","start_shortcut_mode":"string","stop_at_specific_time":"boolean","stop_automatically":"boolean","stop_entry_on_shutdown":"boolean","stop_specified_time":"string","stopped_timer_notification_enabled":"boolean","suggestions_enabled":"boolean","summaryReportAmounts":"string","summaryReportDistinctRates":"boolean","summaryReportGrouping":"string","summaryReportSortAsc":"boolean","summaryReportSortField":"string","summaryReportSubGrouping":"string","summary_total_mode":"string","tags_shortcut_enabled":"boolean","theme":"string","time_entry_display_mode":"string","time_entry_ghost_suggestions_enabled":"boolean","time_entry_invitations_notification_enabled":"boolean","time_entry_start_stop_input_mode":"string","timeofday_format":"string","timerView":"string","timerViewMobile":"string","toSAcceptNeeded":"boolean","use_mini_timer":"boolean","visibleFooter":"string","webTimeEntryStarted":"boolean","webTimeEntryStopped":"boolean","weeklyReportGrouping":"string","weeklyReportValueToShow":"string","windows_auto_tracking_rules":[\{"billable":"boolean","description":"string","enabled":"boolean","id":"string","parameters":\{"duration":"string","keyword":"string","keyword_mode":"string","time_of_day":"string","week_days":"string"\},"project_id":"integer","skip_when_timer_is_running":"boolean","start_without_confirmation":"boolean","tag_ids":[\{\}],"task_id":"integer","type":"integer"\}],"windows_show_hide_toggl_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_stop_continue_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_stop_start_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_theme":"string","workout_default_project_id":"integer","workout_default_tag_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/me/preferences/{client}", {
method: "POST",
body: \{"activity_timeline_display_activity":"boolean","activity_timeline_grouping_interval":"string","activity_timeline_grouping_method":"string","activity_timeline_recording_level":"string","activity_timeline_sync_events":"boolean","alpha_features":[\{"alpha_feature_id":"integer","code":"string","deleted_at":"string","description":"string","enabled":"boolean"\}],"analyticsAdvancedFilters":"boolean","auto_tracker_delay_enabled":"boolean","auto_tracker_delay_in_seconds":"integer","automatic_tagging":"boolean","autotracking_enabled":"boolean","beginningOfWeek":"integer","calendar_snap_duration":"string","calendar_snap_initial_location":"string","calendar_visible_hours_end":"integer","calendar_visible_hours_start":"integer","calendar_zoom_level":"string","cell_swipe_actions_enabled":"boolean","charts_view_type":"string","collapseDetailedReportEntries":"boolean","collapseTimeEntries":"boolean","dashboards_view_type":"string","date_format":"string","decimal_separator":"string","default_project_id":"integer","default_task_id":"integer","displayDensity":"string","distinctRates":"string","duration_format":"string","duration_format_on_timer_duration_field":"boolean","edit_popup_integration_timer":"boolean","extension_send_error_reports":"boolean","extension_send_usage_statistics":"boolean","firstSeenBusinessPromo":"integer","focus_app_on_time_entry_started":"boolean","focus_app_on_time_entry_stopped":"boolean","haptic_feedback_enabled":"boolean","hide_keyboard_shortcut":"boolean","idle_detection_enabled":"boolean","idle_detection_interval_in_minutes":"integer","inactivity_behavior":"string","ios_is_goals_view_shown":"boolean","is_goals_view_expanded":"boolean","is_goals_view_shown":"boolean","is_summary_total_view_visible":"boolean","keep_mini_timer_on_top":"boolean","keep_window_on_top":"boolean","keyboard_increment_timer_page":"integer","keyboard_shortcuts_enabled":"boolean","keyboard_shortcuts_share_time_entries":"boolean","mac_is_goals_view_shown":"boolean","macos_auto_tracking_rules":[\{"id":"string","keyword":"string","project_id":"integer","task_id":"integer"\}],"macos_show_hide_toggl_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"macos_stop_continue_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"manualEntryMode":"string","manualMode":"boolean","manualModeOverlaySeen":"boolean","modify_on_start_time_change":"string","offlineMode":"string","pg_time_zone_name":"string","pomodoro_auto_start_break":"boolean","pomodoro_auto_start_focus":"boolean","pomodoro_break_interval_in_minutes":"integer","pomodoro_break_project_id":"integer","pomodoro_break_start_sound_enabled":"boolean","pomodoro_break_tag_id":"integer","pomodoro_countdown_timer":"boolean","pomodoro_enabled":"boolean","pomodoro_focus_interval_in_minutes":"integer","pomodoro_focus_sound":"string","pomodoro_global_sound_enabled":"boolean","pomodoro_interval_end_sound":"boolean","pomodoro_interval_end_volume":"integer","pomodoro_longer_break_duration_in_minutes":"integer","pomodoro_prevent_screen_lock":"boolean","pomodoro_rounds_before_longer_break":"integer","pomodoro_session_start_sound_enabled":"boolean","pomodoro_show_notifications":"boolean","pomodoro_stop_timer_at_interval_end":"boolean","pomodoro_track_breaks_as_time_entries":"boolean","projectDashboardActivityMode":"string","project_shortcut_enabled":"boolean","record_timeline":"boolean","remember_last_project":"string","reminder_days":"string","reminder_enabled":"boolean","reminder_interval_in_minutes":"integer","reminder_period":"string","reminder_snoozing_in_minutes":"integer","reportRounding":"boolean","reportRoundingDirection":"string","reportRoundingStepInMinutes":"integer","reportsHideWeekends":"boolean","run_app_on_startup":"boolean","running_entry_warning":"string","running_timer_notification_enabled":"boolean","seenFollowModal":"boolean","seenFooterPopup":"boolean","seenProjectDashboardOverlay":"boolean","seenTogglButtonModal":"boolean","send_daily_project_invites":"boolean","send_product_emails":"boolean","send_timer_notifications":"boolean","send_weekly_report":"boolean","sharing_shortcut_enabled":"boolean","showTimeInTitle":"boolean","show_all_entries":"boolean","show_changelog":"boolean","show_description_in_menu_bar":"boolean","show_dock_icon":"boolean","show_events_in_calendar":"boolean","show_project_in_menu_bar":"boolean","show_qr_scanner":"boolean","show_seconds_in_menu_bar":"boolean","show_timeline_in_day_view":"boolean","show_timer_in_menu_bar":"boolean","show_today_total_in_menu_bar":"boolean","show_total_billable_hours":"boolean","show_weekend_on_timer_page":"boolean","show_workouts_in_calendar":"boolean","sleep_behaviour":"string","smart_alerts_option":"string","snowballReportRounding":"string","stack_times_on_manual_mode_after":"string","start_automatically":"boolean","start_shortcut_mode":"string","stop_at_specific_time":"boolean","stop_automatically":"boolean","stop_entry_on_shutdown":"boolean","stop_specified_time":"string","stopped_timer_notification_enabled":"boolean","suggestions_enabled":"boolean","summaryReportAmounts":"string","summaryReportDistinctRates":"boolean","summaryReportGrouping":"string","summaryReportSortAsc":"boolean","summaryReportSortField":"string","summaryReportSubGrouping":"string","summary_total_mode":"string","tags_shortcut_enabled":"boolean","theme":"string","time_entry_display_mode":"string","time_entry_ghost_suggestions_enabled":"boolean","time_entry_invitations_notification_enabled":"boolean","time_entry_start_stop_input_mode":"string","timeofday_format":"string","timerView":"string","timerViewMobile":"string","toSAcceptNeeded":"boolean","use_mini_timer":"boolean","visibleFooter":"string","webTimeEntryStarted":"boolean","webTimeEntryStopped":"boolean","weeklyReportGrouping":"string","weeklyReportValueToShow":"string","windows_auto_tracking_rules":[\{"billable":"boolean","description":"string","enabled":"boolean","id":"string","parameters":\{"duration":"string","keyword":"string","keyword_mode":"string","time_of_day":"string","week_days":"string"\},"project_id":"integer","skip_when_timer_is_running":"boolean","start_without_confirmation":"boolean","tag_ids":[\{\}],"task_id":"integer","type":"integer"\}],"windows_show_hide_toggl_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_stop_continue_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_stop_start_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_theme":"string","workout_default_project_id":"integer","workout_default_tag_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/me/preferences/{client}', json=\{"activity_timeline_display_activity":"boolean","activity_timeline_grouping_interval":"string","activity_timeline_grouping_method":"string","activity_timeline_recording_level":"string","activity_timeline_sync_events":"boolean","alpha_features":[\{"alpha_feature_id":"integer","code":"string","deleted_at":"string","description":"string","enabled":"boolean"\}],"analyticsAdvancedFilters":"boolean","auto_tracker_delay_enabled":"boolean","auto_tracker_delay_in_seconds":"integer","automatic_tagging":"boolean","autotracking_enabled":"boolean","beginningOfWeek":"integer","calendar_snap_duration":"string","calendar_snap_initial_location":"string","calendar_visible_hours_end":"integer","calendar_visible_hours_start":"integer","calendar_zoom_level":"string","cell_swipe_actions_enabled":"boolean","charts_view_type":"string","collapseDetailedReportEntries":"boolean","collapseTimeEntries":"boolean","dashboards_view_type":"string","date_format":"string","decimal_separator":"string","default_project_id":"integer","default_task_id":"integer","displayDensity":"string","distinctRates":"string","duration_format":"string","duration_format_on_timer_duration_field":"boolean","edit_popup_integration_timer":"boolean","extension_send_error_reports":"boolean","extension_send_usage_statistics":"boolean","firstSeenBusinessPromo":"integer","focus_app_on_time_entry_started":"boolean","focus_app_on_time_entry_stopped":"boolean","haptic_feedback_enabled":"boolean","hide_keyboard_shortcut":"boolean","idle_detection_enabled":"boolean","idle_detection_interval_in_minutes":"integer","inactivity_behavior":"string","ios_is_goals_view_shown":"boolean","is_goals_view_expanded":"boolean","is_goals_view_shown":"boolean","is_summary_total_view_visible":"boolean","keep_mini_timer_on_top":"boolean","keep_window_on_top":"boolean","keyboard_increment_timer_page":"integer","keyboard_shortcuts_enabled":"boolean","keyboard_shortcuts_share_time_entries":"boolean","mac_is_goals_view_shown":"boolean","macos_auto_tracking_rules":[\{"id":"string","keyword":"string","project_id":"integer","task_id":"integer"\}],"macos_show_hide_toggl_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"macos_stop_continue_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"manualEntryMode":"string","manualMode":"boolean","manualModeOverlaySeen":"boolean","modify_on_start_time_change":"string","offlineMode":"string","pg_time_zone_name":"string","pomodoro_auto_start_break":"boolean","pomodoro_auto_start_focus":"boolean","pomodoro_break_interval_in_minutes":"integer","pomodoro_break_project_id":"integer","pomodoro_break_start_sound_enabled":"boolean","pomodoro_break_tag_id":"integer","pomodoro_countdown_timer":"boolean","pomodoro_enabled":"boolean","pomodoro_focus_interval_in_minutes":"integer","pomodoro_focus_sound":"string","pomodoro_global_sound_enabled":"boolean","pomodoro_interval_end_sound":"boolean","pomodoro_interval_end_volume":"integer","pomodoro_longer_break_duration_in_minutes":"integer","pomodoro_prevent_screen_lock":"boolean","pomodoro_rounds_before_longer_break":"integer","pomodoro_session_start_sound_enabled":"boolean","pomodoro_show_notifications":"boolean","pomodoro_stop_timer_at_interval_end":"boolean","pomodoro_track_breaks_as_time_entries":"boolean","projectDashboardActivityMode":"string","project_shortcut_enabled":"boolean","record_timeline":"boolean","remember_last_project":"string","reminder_days":"string","reminder_enabled":"boolean","reminder_interval_in_minutes":"integer","reminder_period":"string","reminder_snoozing_in_minutes":"integer","reportRounding":"boolean","reportRoundingDirection":"string","reportRoundingStepInMinutes":"integer","reportsHideWeekends":"boolean","run_app_on_startup":"boolean","running_entry_warning":"string","running_timer_notification_enabled":"boolean","seenFollowModal":"boolean","seenFooterPopup":"boolean","seenProjectDashboardOverlay":"boolean","seenTogglButtonModal":"boolean","send_daily_project_invites":"boolean","send_product_emails":"boolean","send_timer_notifications":"boolean","send_weekly_report":"boolean","sharing_shortcut_enabled":"boolean","showTimeInTitle":"boolean","show_all_entries":"boolean","show_changelog":"boolean","show_description_in_menu_bar":"boolean","show_dock_icon":"boolean","show_events_in_calendar":"boolean","show_project_in_menu_bar":"boolean","show_qr_scanner":"boolean","show_seconds_in_menu_bar":"boolean","show_timeline_in_day_view":"boolean","show_timer_in_menu_bar":"boolean","show_today_total_in_menu_bar":"boolean","show_total_billable_hours":"boolean","show_weekend_on_timer_page":"boolean","show_workouts_in_calendar":"boolean","sleep_behaviour":"string","smart_alerts_option":"string","snowballReportRounding":"string","stack_times_on_manual_mode_after":"string","start_automatically":"boolean","start_shortcut_mode":"string","stop_at_specific_time":"boolean","stop_automatically":"boolean","stop_entry_on_shutdown":"boolean","stop_specified_time":"string","stopped_timer_notification_enabled":"boolean","suggestions_enabled":"boolean","summaryReportAmounts":"string","summaryReportDistinctRates":"boolean","summaryReportGrouping":"string","summaryReportSortAsc":"boolean","summaryReportSortField":"string","summaryReportSubGrouping":"string","summary_total_mode":"string","tags_shortcut_enabled":"boolean","theme":"string","time_entry_display_mode":"string","time_entry_ghost_suggestions_enabled":"boolean","time_entry_invitations_notification_enabled":"boolean","time_entry_start_stop_input_mode":"string","timeofday_format":"string","timerView":"string","timerViewMobile":"string","toSAcceptNeeded":"boolean","use_mini_timer":"boolean","visibleFooter":"string","webTimeEntryStarted":"boolean","webTimeEntryStopped":"boolean","weeklyReportGrouping":"string","weeklyReportValueToShow":"string","windows_auto_tracking_rules":[\{"billable":"boolean","description":"string","enabled":"boolean","id":"string","parameters":\{"duration":"string","keyword":"string","keyword_mode":"string","time_of_day":"string","week_days":"string"\},"project_id":"integer","skip_when_timer_is_running":"boolean","start_without_confirmation":"boolean","tag_ids":[\{\}],"task_id":"integer","type":"integer"\}],"windows_show_hide_toggl_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_stop_continue_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_stop_start_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_theme":"string","workout_default_project_id":"integer","workout_default_tag_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/me/preferences/{client}".to_string())
.json(&serde_json::json!(\{"activity_timeline_display_activity":"boolean","activity_timeline_grouping_interval":"string","activity_timeline_grouping_method":"string","activity_timeline_recording_level":"string","activity_timeline_sync_events":"boolean","alpha_features":[\{"alpha_feature_id":"integer","code":"string","deleted_at":"string","description":"string","enabled":"boolean"\}],"analyticsAdvancedFilters":"boolean","auto_tracker_delay_enabled":"boolean","auto_tracker_delay_in_seconds":"integer","automatic_tagging":"boolean","autotracking_enabled":"boolean","beginningOfWeek":"integer","calendar_snap_duration":"string","calendar_snap_initial_location":"string","calendar_visible_hours_end":"integer","calendar_visible_hours_start":"integer","calendar_zoom_level":"string","cell_swipe_actions_enabled":"boolean","charts_view_type":"string","collapseDetailedReportEntries":"boolean","collapseTimeEntries":"boolean","dashboards_view_type":"string","date_format":"string","decimal_separator":"string","default_project_id":"integer","default_task_id":"integer","displayDensity":"string","distinctRates":"string","duration_format":"string","duration_format_on_timer_duration_field":"boolean","edit_popup_integration_timer":"boolean","extension_send_error_reports":"boolean","extension_send_usage_statistics":"boolean","firstSeenBusinessPromo":"integer","focus_app_on_time_entry_started":"boolean","focus_app_on_time_entry_stopped":"boolean","haptic_feedback_enabled":"boolean","hide_keyboard_shortcut":"boolean","idle_detection_enabled":"boolean","idle_detection_interval_in_minutes":"integer","inactivity_behavior":"string","ios_is_goals_view_shown":"boolean","is_goals_view_expanded":"boolean","is_goals_view_shown":"boolean","is_summary_total_view_visible":"boolean","keep_mini_timer_on_top":"boolean","keep_window_on_top":"boolean","keyboard_increment_timer_page":"integer","keyboard_shortcuts_enabled":"boolean","keyboard_shortcuts_share_time_entries":"boolean","mac_is_goals_view_shown":"boolean","macos_auto_tracking_rules":[\{"id":"string","keyword":"string","project_id":"integer","task_id":"integer"\}],"macos_show_hide_toggl_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"macos_stop_continue_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"manualEntryMode":"string","manualMode":"boolean","manualModeOverlaySeen":"boolean","modify_on_start_time_change":"string","offlineMode":"string","pg_time_zone_name":"string","pomodoro_auto_start_break":"boolean","pomodoro_auto_start_focus":"boolean","pomodoro_break_interval_in_minutes":"integer","pomodoro_break_project_id":"integer","pomodoro_break_start_sound_enabled":"boolean","pomodoro_break_tag_id":"integer","pomodoro_countdown_timer":"boolean","pomodoro_enabled":"boolean","pomodoro_focus_interval_in_minutes":"integer","pomodoro_focus_sound":"string","pomodoro_global_sound_enabled":"boolean","pomodoro_interval_end_sound":"boolean","pomodoro_interval_end_volume":"integer","pomodoro_longer_break_duration_in_minutes":"integer","pomodoro_prevent_screen_lock":"boolean","pomodoro_rounds_before_longer_break":"integer","pomodoro_session_start_sound_enabled":"boolean","pomodoro_show_notifications":"boolean","pomodoro_stop_timer_at_interval_end":"boolean","pomodoro_track_breaks_as_time_entries":"boolean","projectDashboardActivityMode":"string","project_shortcut_enabled":"boolean","record_timeline":"boolean","remember_last_project":"string","reminder_days":"string","reminder_enabled":"boolean","reminder_interval_in_minutes":"integer","reminder_period":"string","reminder_snoozing_in_minutes":"integer","reportRounding":"boolean","reportRoundingDirection":"string","reportRoundingStepInMinutes":"integer","reportsHideWeekends":"boolean","run_app_on_startup":"boolean","running_entry_warning":"string","running_timer_notification_enabled":"boolean","seenFollowModal":"boolean","seenFooterPopup":"boolean","seenProjectDashboardOverlay":"boolean","seenTogglButtonModal":"boolean","send_daily_project_invites":"boolean","send_product_emails":"boolean","send_timer_notifications":"boolean","send_weekly_report":"boolean","sharing_shortcut_enabled":"boolean","showTimeInTitle":"boolean","show_all_entries":"boolean","show_changelog":"boolean","show_description_in_menu_bar":"boolean","show_dock_icon":"boolean","show_events_in_calendar":"boolean","show_project_in_menu_bar":"boolean","show_qr_scanner":"boolean","show_seconds_in_menu_bar":"boolean","show_timeline_in_day_view":"boolean","show_timer_in_menu_bar":"boolean","show_today_total_in_menu_bar":"boolean","show_total_billable_hours":"boolean","show_weekend_on_timer_page":"boolean","show_workouts_in_calendar":"boolean","sleep_behaviour":"string","smart_alerts_option":"string","snowballReportRounding":"string","stack_times_on_manual_mode_after":"string","start_automatically":"boolean","start_shortcut_mode":"string","stop_at_specific_time":"boolean","stop_automatically":"boolean","stop_entry_on_shutdown":"boolean","stop_specified_time":"string","stopped_timer_notification_enabled":"boolean","suggestions_enabled":"boolean","summaryReportAmounts":"string","summaryReportDistinctRates":"boolean","summaryReportGrouping":"string","summaryReportSortAsc":"boolean","summaryReportSortField":"string","summaryReportSubGrouping":"string","summary_total_mode":"string","tags_shortcut_enabled":"boolean","theme":"string","time_entry_display_mode":"string","time_entry_ghost_suggestions_enabled":"boolean","time_entry_invitations_notification_enabled":"boolean","time_entry_start_stop_input_mode":"string","timeofday_format":"string","timerView":"string","timerViewMobile":"string","toSAcceptNeeded":"boolean","use_mini_timer":"boolean","visibleFooter":"string","webTimeEntryStarted":"boolean","webTimeEntryStopped":"boolean","weeklyReportGrouping":"string","weeklyReportValueToShow":"string","windows_auto_tracking_rules":[\{"billable":"boolean","description":"string","enabled":"boolean","id":"string","parameters":\{"duration":"string","keyword":"string","keyword_mode":"string","time_of_day":"string","week_days":"string"\},"project_id":"integer","skip_when_timer_is_running":"boolean","start_without_confirmation":"boolean","tag_ids":[\{\}],"task_id":"integer","type":"integer"\}],"windows_show_hide_toggl_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_stop_continue_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_stop_start_keyboard_shortcut":\{"key":"integer","modifiers":"integer"\},"windows_theme":"string","workout_default_project_id":"integer","workout_default_tag_id":"integer"\}))
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters
Path
name | type | required | description |
---|---|---|---|
client | string | false | Client type |
Body
Name | Type | Description |
---|---|---|
activity_timeline_display_activity | boolean | - |
activity_timeline_grouping_interval | string | - |
activity_timeline_grouping_method | string | - |
activity_timeline_recording_level | string | - |
activity_timeline_sync_events | boolean | - |
alpha_features | Array of object | will be omitted if empty |
analyticsAdvancedFilters | boolean | will be omitted if empty |
auto_tracker_delay_enabled | boolean | - |
auto_tracker_delay_in_seconds | integer | - |
automatic_tagging | boolean | - |
autotracking_enabled | boolean | - |
beginningOfWeek | integer | will be omitted if empty |
calendar_snap_duration | string | - |
calendar_snap_initial_location | string | - |
calendar_visible_hours_end | integer | - |
calendar_visible_hours_start | integer | - |
calendar_zoom_level | string | - |
cell_swipe_actions_enabled | boolean | - |
charts_view_type | string | - |
collapseDetailedReportEntries | boolean | will be omitted if empty |
collapseTimeEntries | boolean | will be omitted if empty |
dashboards_view_type | string | - |
date_format | string | - |
decimal_separator | string | will be omitted if empty |
default_project_id | integer | - |
default_task_id | integer | - |
displayDensity | string | will be omitted if empty |
distinctRates | string | will be omitted if empty |
duration_format | string | - |
duration_format_on_timer_duration_field | boolean | - |
edit_popup_integration_timer | boolean | - |
extension_send_error_reports | boolean | - |
extension_send_usage_statistics | boolean | - |
firstSeenBusinessPromo | integer | will be omitted if empty |
focus_app_on_time_entry_started | boolean | - |
focus_app_on_time_entry_stopped | boolean | - |
haptic_feedback_enabled | boolean | - |
hide_keyboard_shortcut | boolean | will be omitted if empty |
idle_detection_enabled | boolean | - |
idle_detection_interval_in_minutes | integer | - |
inactivity_behavior | string | - |
ios_is_goals_view_shown | boolean | - |
is_goals_view_expanded | boolean | - |
is_goals_view_shown | boolean | - |
is_summary_total_view_visible | boolean | - |
keep_mini_timer_on_top | boolean | - |
keep_window_on_top | boolean | - |
keyboard_increment_timer_page | integer | - |
keyboard_shortcuts_enabled | boolean | will be omitted if empty |
keyboard_shortcuts_share_time_entries | boolean | - |
mac_is_goals_view_shown | boolean | - |
macos_auto_tracking_rules | Array of object | - |
macos_show_hide_toggl_keyboard_shortcut | object | - |
macos_stop_continue_keyboard_shortcut | object | - |
manualEntryMode | string | will be omitted if empty |
manualMode | boolean | will be omitted if empty |
manualModeOverlaySeen | boolean | will be omitted if empty |
modify_on_start_time_change | string | - |
offlineMode | string | will be omitted if empty |
pg_time_zone_name | string | - |
pomodoro_auto_start_break | boolean | - |
pomodoro_auto_start_focus | boolean | - |
pomodoro_break_interval_in_minutes | integer | - |
pomodoro_break_project_id | integer | - |
pomodoro_break_start_sound_enabled | boolean | - |
pomodoro_break_tag_id | integer | - |
pomodoro_countdown_timer | boolean | - |
pomodoro_enabled | boolean | - |
pomodoro_focus_interval_in_minutes | integer | - |
pomodoro_focus_sound | string | - |
pomodoro_global_sound_enabled | boolean | - |
pomodoro_interval_end_sound | boolean | - |
pomodoro_interval_end_volume | integer | - |
pomodoro_longer_break_duration_in_minutes | integer | - |
pomodoro_prevent_screen_lock | boolean | - |
pomodoro_rounds_before_longer_break | integer | - |
pomodoro_session_start_sound_enabled | boolean | - |
pomodoro_show_notifications | boolean | - |
pomodoro_stop_timer_at_interval_end | boolean | - |
pomodoro_track_breaks_as_time_entries | boolean | - |
projectDashboardActivityMode | string | will be omitted if empty |
project_shortcut_enabled | boolean | - |
record_timeline | boolean | - |
remember_last_project | string | - |
reminder_days | string | - |
reminder_enabled | boolean | - |
reminder_interval_in_minutes | integer | - |
reminder_period | string | - |
reminder_snoozing_in_minutes | integer | - |
reportRounding | boolean | will be omitted if empty |
reportRoundingDirection | string | will be omitted if empty |
reportRoundingStepInMinutes | integer | will be omitted if empty |
reportsHideWeekends | boolean | will be omitted if empty |
run_app_on_startup | boolean | - |
running_entry_warning | string | - |
running_timer_notification_enabled | boolean | - |
seenFollowModal | boolean | will be omitted if empty |
seenFooterPopup | boolean | will be omitted if empty |
seenProjectDashboardOverlay | boolean | will be omitted if empty |
seenTogglButtonModal | boolean | will be omitted if empty |
send_daily_project_invites | boolean | - |
send_product_emails | boolean | - |
send_timer_notifications | boolean | - |
send_weekly_report | boolean | - |
sharing_shortcut_enabled | boolean | - |
showTimeInTitle | boolean | will be omitted if empty |
show_all_entries | boolean | - |
show_changelog | boolean | - |
show_description_in_menu_bar | boolean | - |
show_dock_icon | boolean | - |
show_events_in_calendar | boolean | - |
show_project_in_menu_bar | boolean | - |
show_qr_scanner | boolean | - |
show_seconds_in_menu_bar | boolean | - |
show_timeline_in_day_view | boolean | will be omitted if empty |
show_timer_in_menu_bar | boolean | - |
show_today_total_in_menu_bar | boolean | - |
show_total_billable_hours | boolean | will be omitted if empty |
show_weekend_on_timer_page | boolean | will be omitted if empty |
show_workouts_in_calendar | boolean | - |
sleep_behaviour | string | - |
smart_alerts_option | string | - |
snowballReportRounding | string | will be omitted if empty |
stack_times_on_manual_mode_after | string | - |
start_automatically | boolean | - |
start_shortcut_mode | string | - |
stop_at_specific_time | boolean | - |
stop_automatically | boolean | - |
stop_entry_on_shutdown | boolean | - |
stop_specified_time | string | - |
stopped_timer_notification_enabled | boolean | - |
suggestions_enabled | boolean | - |
summaryReportAmounts | string | will be omitted if empty |
summaryReportDistinctRates | boolean | will be omitted if empty |
summaryReportGrouping | string | will be omitted if empty |
summaryReportSortAsc | boolean | will be omitted if empty |
summaryReportSortField | string | will be omitted if empty |
summaryReportSubGrouping | string | will be omitted if empty |
summary_total_mode | string | - |
tags_shortcut_enabled | boolean | - |
theme | string | will be omitted if empty |
time_entry_display_mode | string | - |
time_entry_ghost_suggestions_enabled | boolean | - |
time_entry_invitations_notification_enabled | boolean | - |
time_entry_start_stop_input_mode | string | - |
timeofday_format | string | - |
timerView | string | will be omitted if empty |
timerViewMobile | string | will be omitted if empty |
toSAcceptNeeded | boolean | ToSAcceptNeeded represents the trigger for new ToS accept dialog |
use_mini_timer | boolean | - |
visibleFooter | string | will be omitted if empty |
webTimeEntryStarted | boolean | will be omitted if empty |
webTimeEntryStopped | boolean | will be omitted if empty |
weeklyReportGrouping | string | will be omitted if empty |
weeklyReportValueToShow | string | will be omitted if empty |
windows_auto_tracking_rules | Array of object | - |
windows_show_hide_toggl_keyboard_shortcut | object | - |
windows_stop_continue_keyboard_shortcut | object | - |
windows_stop_start_keyboard_shortcut | object | - |
windows_theme | string | - |
workout_default_project_id | integer | - |
workout_default_tag_id | integer | - |
alpha_features
Name | Type | Description |
---|---|---|
alpha_feature_id | integer | Feature ID |
code | string | Feature code |
deleted_at | string | Time of deletion, omitted if empty |
description | string | Feature description, omitted if empty |
enabled | boolean | Whether the feature is enabled |
macos_auto_tracking_rules
Name | Type | Description |
---|---|---|
id | string | - |
keyword | string | - |
project_id | integer | - |
task_id | integer | - |
macos_show_hide_toggl_keyboard_shortcut
Name | Type | Description |
---|---|---|
key | integer | - |
modifiers | integer | - |
macos_stop_continue_keyboard_shortcut
Name | Type | Description |
---|---|---|
key | integer | - |
modifiers | integer | - |
windows_auto_tracking_rules
Name | Type | Description |
---|---|---|
billable | boolean | - |
description | string | - |
enabled | boolean | - |
id | string | - |
parameters | object | - |
project_id | integer | - |
skip_when_timer_is_running | boolean | - |
start_without_confirmation | boolean | - |
tag_ids | Array of integer | - |
task_id | integer | - |
type | integer | - |
parameters
Name | Type | Description |
---|---|---|
duration | string | - |
keyword | string | - |
keyword_mode | string | - |
time_of_day | string | - |
week_days | string | - |
windows_show_hide_toggl_keyboard_shortcut
Name | Type | Description |
---|---|---|
key | integer | - |
modifiers | integer | - |
windows_stop_continue_keyboard_shortcut
Name | Type | Description |
---|---|---|
key | integer | - |
modifiers | integer | - |
windows_stop_start_keyboard_shortcut
Name | Type | Description |
---|---|---|
key | integer | - |
modifiers | integer | - |
Response
200
Successful operation.
400
Possible error messages:
- Cannot set value for ToSAcceptNeeded
- Invalid feature code(s)
- Missing data
- Unknown client
- Value in date_format is invalid
- Value in timeofday_format is invalid
403
User does not have access to this resource.
500
Internal Server Error
GET Get workspace preferences
https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/preferences
Get the preferences for a given workspace.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/preferences \
-H "Content-Type: application/json" \
-u <email>:<password>
req, err := http.NewRequest(http.MethodGet,
"https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/preferences")
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}/preferences')
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}/preferences", {
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}/preferences', 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}/preferences".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 |
Response
200
Name | Type | Description |
---|---|---|
logo | string | - |
400
Workspace not found
403
User does not have access to this resource.
500
Internal Server Error
POST Update workspace preferences
https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/preferences
Update the preferences for a given workspace.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X POST https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/preferences \
-H "Content-Type: application/json" \
-d '\{"hide_start_end_times":"boolean","inc_tos_accepted_at":"string","inc_tos_accepted_by":"integer","initial_pricing_plan":"integer","report_locked_at":"string","single_sign_on":"boolean","sso_requested_at":"string"\}' \
-u <email>:<password>
bytes, err := json.Marshal('\{"hide_start_end_times":"boolean","inc_tos_accepted_at":"string","inc_tos_accepted_by":"integer","initial_pricing_plan":"integer","report_locked_at":"string","single_sign_on":"boolean","sso_requested_at":"string"\}')
if err != nil {
print(err)
}
req, err := http.NewRequest(http.MethodPost,
"https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/preferences", 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}/preferences')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
req.body = \{"hide_start_end_times":"boolean","inc_tos_accepted_at":"string","inc_tos_accepted_by":"integer","initial_pricing_plan":"integer","report_locked_at":"string","single_sign_on":"boolean","sso_requested_at":"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}/preferences", {
method: "POST",
body: \{"hide_start_end_times":"boolean","inc_tos_accepted_at":"string","inc_tos_accepted_by":"integer","initial_pricing_plan":"integer","report_locked_at":"string","single_sign_on":"boolean","sso_requested_at":"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.post('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/preferences', json=\{"hide_start_end_times":"boolean","inc_tos_accepted_at":"string","inc_tos_accepted_by":"integer","initial_pricing_plan":"integer","report_locked_at":"string","single_sign_on":"boolean","sso_requested_at":"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::POST, "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/preferences".to_string())
.json(&serde_json::json!(\{"hide_start_end_times":"boolean","inc_tos_accepted_at":"string","inc_tos_accepted_by":"integer","initial_pricing_plan":"integer","report_locked_at":"string","single_sign_on":"boolean","sso_requested_at":"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 |
Body
Name | Type | Description |
---|---|---|
hide_start_end_times | boolean | This workspace works with duration only time entries |
inc_tos_accepted_at | string | Time of acceptance of the terms of service |
inc_tos_accepted_by | integer | User ID who accepted the terms of service |
initial_pricing_plan | integer | Pricing plan ID |
report_locked_at | string | Date on which "Lock Time Entries" feature was enabled |
single_sign_on | boolean | Whether SSO is enabled for this workspace |
sso_requested_at | string | Date on which SSO was requested |
Response
200
Name | Type | Description |
---|---|---|
logo | string | - |
400
Possi