User-settings
GET Retrieve user settings
https://focus.toggl.com/api/users/me/settings
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl https://focus.toggl.com/api/users/me/settings \
-H "Content-Type: application/json" \
-u <email>:<password>
req, err := http.NewRequest(http.MethodGet,
"https://focus.toggl.com/api/users/me/settings")
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://focus.toggl.com/api/users/me/settings')
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://focus.toggl.com/api/users/me/settings", {
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://focus.toggl.com/api/users/me/settings', 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://focus.toggl.com/api/users/me/settings".to_string())
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Response
200
| Name | Type | Description |
|---|---|---|
| attachments_display_mode | string | - |
| autocomplete_task_with_time_block | boolean | - |
| autolog_time | boolean | - |
| calendar_range_type | string | - |
| calendar_show_calendar_events | boolean | - |
| calendar_show_completed_tasks | boolean | - |
| calendar_show_tasks_list | boolean | - |
| calendar_split_view_columns | string | - |
| current_workspace_id | integer | - |
| default_page | string | - |
| duration_format | string | - |
| first_interaction | boolean | FirstInteraction determines the settings update was the first user interaction done. This is what is used to dispatch the Focus product sign-up event. This is not a setting that can be managed by FE. This is purely an internal BE setting. |
| focus_mode_count_up | boolean | - |
| has_reached_task_threshold | boolean | HasReachedTaskThreshold indicates the user has created 5+ tasks at some point. |
| import_data_banner_dismissed | boolean | - |
| language_code | string | - |
| new_users_trial_dismissed | boolean | - |
| onboarding_checklist_dismissed | boolean | - |
| onboarding_flow_dismissed | boolean | - |
| onboarding_multi_day_task_created | boolean | - |
| onboarding_task_dragged | boolean | - |
| onboarding_variant_selected | string | - |
| plan_tour_dismissed | boolean | PlanTourDismissed indicates whether the user has dismissed the plan onboarding tour |
| pomodoro_mode_auto_start_break | boolean | - |
| pomodoro_mode_break_duration_mins | integer | - |
| pomodoro_mode_session_duration_mins | integer | - |
| pomodoro_mode_sound_enabled | boolean | - |
| shortcuts_enabled | boolean | - |
| show_google_calendar_events | boolean | - |
| start_week_on | integer | StartWeekOn determines which day the week starts on: 0 for Sunday, 1 for Monday |
| switch_to_focus_dismissed | boolean | - |
| sync_external_calendar | string | SyncExternalCalendar can either be 'never', 'always' or 'ask' |
| theme | string | - |
| time_block_color | string | - |
| time_format | string | - |
| time_tracking_mode | string | - |
| time_tracking_mode_duration_mins | integer | - |
| time_tracking_mode_enabled | boolean | - |
| time_tracking_mode_fullscreen | boolean | - |
| tooltip_onboarding_dismissed | boolean | TooltipOnboardingDismissed indicates whether the user has dismissed the tooltip onboarding tour |
| welcome_modal_dismissed | boolean | WelcomeModalDismissed indicates whether the user has dismissed the welcome modal |
400
Invalid request
500
Internal Server Error
PATCH Partial update user settings
https://focus.toggl.com/api/users/me/settings
Partial update user settings.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X PATCH https://focus.toggl.com/api/users/me/settings \
-H "Content-Type: application/json" \
-d '\{"attachments_display_mode":"string","autocomplete_task_with_time_block":"boolean","autolog_time":"boolean","calendar_range_type":"string","calendar_show_calendar_events":"boolean","calendar_show_completed_tasks":"boolean","calendar_show_tasks_list":"boolean","calendar_split_view_columns":"string","current_workspace_id":"integer","default_page":"string","duration_format":"string","focus_mode_count_up":"boolean","has_reached_task_threshold":"boolean","import_data_banner_dismissed":"boolean","language_code":"string","new_users_trial_dismissed":"boolean","onboarding_checklist_dismissed":"boolean","onboarding_flow_dismissed":"boolean","onboarding_multi_day_task_created":"boolean","onboarding_task_dragged":"boolean","onboarding_variant_selected":"string","plan_tour_dismissed":"boolean","pomodoro_mode_auto_start_break":"boolean","pomodoro_mode_break_duration_mins":"integer","pomodoro_mode_session_duration_mins":"integer","pomodoro_mode_sound_enabled":"boolean","shortcuts_enabled":"boolean","show_google_calendar_events":"boolean","start_week_on":"integer","switch_to_focus_dismissed":"boolean","sync_external_calendar":"string","theme":"string","time_block_color":"string","time_format":"string","time_tracking_mode":"string","time_tracking_mode_duration_mins":"integer","time_tracking_mode_enabled":"boolean","time_tracking_mode_fullscreen":"boolean","tooltip_onboarding_dismissed":"boolean","welcome_modal_dismissed":"boolean"\}' \
-u <email>:<password>
bytes, err := json.Marshal('\{"attachments_display_mode":"string","autocomplete_task_with_time_block":"boolean","autolog_time":"boolean","calendar_range_type":"string","calendar_show_calendar_events":"boolean","calendar_show_completed_tasks":"boolean","calendar_show_tasks_list":"boolean","calendar_split_view_columns":"string","current_workspace_id":"integer","default_page":"string","duration_format":"string","focus_mode_count_up":"boolean","has_reached_task_threshold":"boolean","import_data_banner_dismissed":"boolean","language_code":"string","new_users_trial_dismissed":"boolean","onboarding_checklist_dismissed":"boolean","onboarding_flow_dismissed":"boolean","onboarding_multi_day_task_created":"boolean","onboarding_task_dragged":"boolean","onboarding_variant_selected":"string","plan_tour_dismissed":"boolean","pomodoro_mode_auto_start_break":"boolean","pomodoro_mode_break_duration_mins":"integer","pomodoro_mode_session_duration_mins":"integer","pomodoro_mode_sound_enabled":"boolean","shortcuts_enabled":"boolean","show_google_calendar_events":"boolean","start_week_on":"integer","switch_to_focus_dismissed":"boolean","sync_external_calendar":"string","theme":"string","time_block_color":"string","time_format":"string","time_tracking_mode":"string","time_tracking_mode_duration_mins":"integer","time_tracking_mode_enabled":"boolean","time_tracking_mode_fullscreen":"boolean","tooltip_onboarding_dismissed":"boolean","welcome_modal_dismissed":"boolean"\}')
if err != nil {
print(err)
}
req, err := http.NewRequest(http.MethodGet,
"https://focus.toggl.com/api/users/me/settings", 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://focus.toggl.com/api/users/me/settings')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Patch.new(uri.path)
req['Content-Type'] = "application/json"
req.body = \{"attachments_display_mode":"string","autocomplete_task_with_time_block":"boolean","autolog_time":"boolean","calendar_range_type":"string","calendar_show_calendar_events":"boolean","calendar_show_completed_tasks":"boolean","calendar_show_tasks_list":"boolean","calendar_split_view_columns":"string","current_workspace_id":"integer","default_page":"string","duration_format":"string","focus_mode_count_up":"boolean","has_reached_task_threshold":"boolean","import_data_banner_dismissed":"boolean","language_code":"string","new_users_trial_dismissed":"boolean","onboarding_checklist_dismissed":"boolean","onboarding_flow_dismissed":"boolean","onboarding_multi_day_task_created":"boolean","onboarding_task_dragged":"boolean","onboarding_variant_selected":"string","plan_tour_dismissed":"boolean","pomodoro_mode_auto_start_break":"boolean","pomodoro_mode_break_duration_mins":"integer","pomodoro_mode_session_duration_mins":"integer","pomodoro_mode_sound_enabled":"boolean","shortcuts_enabled":"boolean","show_google_calendar_events":"boolean","start_week_on":"integer","switch_to_focus_dismissed":"boolean","sync_external_calendar":"string","theme":"string","time_block_color":"string","time_format":"string","time_tracking_mode":"string","time_tracking_mode_duration_mins":"integer","time_tracking_mode_enabled":"boolean","time_tracking_mode_fullscreen":"boolean","tooltip_onboarding_dismissed":"boolean","welcome_modal_dismissed":"boolean"\}.to_json
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://focus.toggl.com/api/users/me/settings", {
method: "PATCH",
body: \{"attachments_display_mode":"string","autocomplete_task_with_time_block":"boolean","autolog_time":"boolean","calendar_range_type":"string","calendar_show_calendar_events":"boolean","calendar_show_completed_tasks":"boolean","calendar_show_tasks_list":"boolean","calendar_split_view_columns":"string","current_workspace_id":"integer","default_page":"string","duration_format":"string","focus_mode_count_up":"boolean","has_reached_task_threshold":"boolean","import_data_banner_dismissed":"boolean","language_code":"string","new_users_trial_dismissed":"boolean","onboarding_checklist_dismissed":"boolean","onboarding_flow_dismissed":"boolean","onboarding_multi_day_task_created":"boolean","onboarding_task_dragged":"boolean","onboarding_variant_selected":"string","plan_tour_dismissed":"boolean","pomodoro_mode_auto_start_break":"boolean","pomodoro_mode_break_duration_mins":"integer","pomodoro_mode_session_duration_mins":"integer","pomodoro_mode_sound_enabled":"boolean","shortcuts_enabled":"boolean","show_google_calendar_events":"boolean","start_week_on":"integer","switch_to_focus_dismissed":"boolean","sync_external_calendar":"string","theme":"string","time_block_color":"string","time_format":"string","time_tracking_mode":"string","time_tracking_mode_duration_mins":"integer","time_tracking_mode_enabled":"boolean","time_tracking_mode_fullscreen":"boolean","tooltip_onboarding_dismissed":"boolean","welcome_modal_dismissed":"boolean"\},
headers: {
"Content-Type": "application/json",
"Authorization": `Basic ${base64.encode(<email>:<password>)}`
},
})
.then((resp) => resp.json())
.then((json) => {
console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.patch('https://focus.toggl.com/api/users/me/settings', json=\{"attachments_display_mode":"string","autocomplete_task_with_time_block":"boolean","autolog_time":"boolean","calendar_range_type":"string","calendar_show_calendar_events":"boolean","calendar_show_completed_tasks":"boolean","calendar_show_tasks_list":"boolean","calendar_split_view_columns":"string","current_workspace_id":"integer","default_page":"string","duration_format":"string","focus_mode_count_up":"boolean","has_reached_task_threshold":"boolean","import_data_banner_dismissed":"boolean","language_code":"string","new_users_trial_dismissed":"boolean","onboarding_checklist_dismissed":"boolean","onboarding_flow_dismissed":"boolean","onboarding_multi_day_task_created":"boolean","onboarding_task_dragged":"boolean","onboarding_variant_selected":"string","plan_tour_dismissed":"boolean","pomodoro_mode_auto_start_break":"boolean","pomodoro_mode_break_duration_mins":"integer","pomodoro_mode_session_duration_mins":"integer","pomodoro_mode_sound_enabled":"boolean","shortcuts_enabled":"boolean","show_google_calendar_events":"boolean","start_week_on":"integer","switch_to_focus_dismissed":"boolean","sync_external_calendar":"string","theme":"string","time_block_color":"string","time_format":"string","time_tracking_mode":"string","time_tracking_mode_duration_mins":"integer","time_tracking_mode_enabled":"boolean","time_tracking_mode_fullscreen":"boolean","tooltip_onboarding_dismissed":"boolean","welcome_modal_dismissed":"boolean"\}, headers={'content-type': 'application/json', 'Authorization' : 'Basic %s' % b64encode(b"<email>:<password>").decode("ascii")})
print(data.json())
extern crate tokio;
extern crate serde_json;
use reqwest::{Client};
use reqwest::header::{CONTENT_TYPE};
#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
let client = Client::new().basic_auth("<email>", "<password>");
let json = client.request(Method::PATCH, "https://focus.toggl.com/api/users/me/settings".to_string())
.json(&serde_json::json!(\{"attachments_display_mode":"string","autocomplete_task_with_time_block":"boolean","autolog_time":"boolean","calendar_range_type":"string","calendar_show_calendar_events":"boolean","calendar_show_completed_tasks":"boolean","calendar_show_tasks_list":"boolean","calendar_split_view_columns":"string","current_workspace_id":"integer","default_page":"string","duration_format":"string","focus_mode_count_up":"boolean","has_reached_task_threshold":"boolean","import_data_banner_dismissed":"boolean","language_code":"string","new_users_trial_dismissed":"boolean","onboarding_checklist_dismissed":"boolean","onboarding_flow_dismissed":"boolean","onboarding_multi_day_task_created":"boolean","onboarding_task_dragged":"boolean","onboarding_variant_selected":"string","plan_tour_dismissed":"boolean","pomodoro_mode_auto_start_break":"boolean","pomodoro_mode_break_duration_mins":"integer","pomodoro_mode_session_duration_mins":"integer","pomodoro_mode_sound_enabled":"boolean","shortcuts_enabled":"boolean","show_google_calendar_events":"boolean","start_week_on":"integer","switch_to_focus_dismissed":"boolean","sync_external_calendar":"string","theme":"string","time_block_color":"string","time_format":"string","time_tracking_mode":"string","time_tracking_mode_duration_mins":"integer","time_tracking_mode_enabled":"boolean","time_tracking_mode_fullscreen":"boolean","tooltip_onboarding_dismissed":"boolean","welcome_modal_dismissed":"boolean"\}))
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters
Body
| Name | Type | Description |
|---|---|---|
| attachments_display_mode | string | null |
| autocomplete_task_with_time_block | boolean | - |
| autolog_time | boolean | - |
| calendar_range_type | string | null |
| calendar_show_calendar_events | boolean | - |
| calendar_show_completed_tasks | boolean | - |
| calendar_show_tasks_list | boolean | - |
| calendar_split_view_columns | string | null |
| current_workspace_id | integer | null |
| default_page | string | null |
| duration_format | string | - |
| focus_mode_count_up | boolean | - |
| has_reached_task_threshold | boolean | - |
| import_data_banner_dismissed | boolean | - |
| language_code | string | null |
| new_users_trial_dismissed | boolean | - |
| onboarding_checklist_dismissed | boolean | - |
| onboarding_flow_dismissed | boolean | - |
| onboarding_multi_day_task_created | boolean | - |
| onboarding_task_dragged | boolean | - |
| onboarding_variant_selected | string | null |
| plan_tour_dismissed | boolean | - |
| pomodoro_mode_auto_start_break | boolean | - |
| pomodoro_mode_break_duration_mins | integer | - |
| pomodoro_mode_session_duration_mins | integer | - |
| pomodoro_mode_sound_enabled | boolean | - |
| shortcuts_enabled | boolean | - |
| show_google_calendar_events | boolean | - |
| start_week_on | integer | - |
| switch_to_focus_dismissed | boolean | - |
| sync_external_calendar | string | - |
| theme | string | - |
| time_block_color | string | null |
| time_format | string | - |
| time_tracking_mode | string | null |
| time_tracking_mode_duration_mins | integer | null |
| time_tracking_mode_enabled | boolean | - |
| time_tracking_mode_fullscreen | boolean | - |
| tooltip_onboarding_dismissed | boolean | - |
| welcome_modal_dismissed | boolean | - |
Response
200
Successfully updated
| Name | Type | Description |
|---|---|---|
| attachments_display_mode | string | - |
| autocomplete_task_with_time_block | boolean | - |
| autolog_time | boolean | - |
| calendar_range_type | string | - |
| calendar_show_calendar_events | boolean | - |
| calendar_show_completed_tasks | boolean | - |
| calendar_show_tasks_list | boolean | - |
| calendar_split_view_columns | string | - |
| current_workspace_id | integer | - |
| default_page | string | - |
| duration_format | string | - |
| first_interaction | boolean | FirstInteraction determines the settings update was the first user interaction done. This is what is used to dispatch the Focus product sign-up event. This is not a setting that can be managed by FE. This is purely an internal BE setting. |
| focus_mode_count_up | boolean | - |
| has_reached_task_threshold | boolean | HasReachedTaskThreshold indicates the user has created 5+ tasks at some point. |
| import_data_banner_dismissed | boolean | - |
| language_code | string | - |
| new_users_trial_dismissed | boolean | - |
| onboarding_checklist_dismissed | boolean | - |
| onboarding_flow_dismissed | boolean | - |
| onboarding_multi_day_task_created | boolean | - |
| onboarding_task_dragged | boolean | - |
| onboarding_variant_selected | string | - |
| plan_tour_dismissed | boolean | PlanTourDismissed indicates whether the user has dismissed the plan onboarding tour |
| pomodoro_mode_auto_start_break | boolean | - |
| pomodoro_mode_break_duration_mins | integer | - |
| pomodoro_mode_session_duration_mins | integer | - |
| pomodoro_mode_sound_enabled | boolean | - |
| shortcuts_enabled | boolean | - |
| show_google_calendar_events | boolean | - |
| start_week_on | integer | StartWeekOn determines which day the week starts on: 0 for Sunday, 1 for Monday |
| switch_to_focus_dismissed | boolean | - |
| sync_external_calendar | string | SyncExternalCalendar can either be 'never', 'always' or 'ask' |
| theme | string | - |
| time_block_color | string | - |
| time_format | string | - |
| time_tracking_mode | string | - |
| time_tracking_mode_duration_mins | integer | - |
| time_tracking_mode_enabled | boolean | - |
| time_tracking_mode_fullscreen | boolean | - |
| tooltip_onboarding_dismissed | boolean | TooltipOnboardingDismissed indicates whether the user has dismissed the tooltip onboarding tour |
| welcome_modal_dismissed | boolean | WelcomeModalDismissed indicates whether the user has dismissed the welcome modal |
400
Invalid request
500
Internal Server Error