“Me” Endpoints - PUT

PUT Me

https://api.track.toggl.com/api/v9/me

Updates details for the current user.

  • cURL
  • Go
  • Ruby
  • JavaScript
  • Python
  • Rust
extern crate tokio;extern crate serde_json;use reqwest::{Client};use reqwest::header::{CONTENT_TYPE};#[tokio::main]async fn main() -> Result<(), reqwest::Error> {  let client = Client::new().basic_auth("<email>", "<password>");  let json = client.request(Method::PUT, "https://api.track.toggl.com/api/v9/me".to_string()).json(&serde_json::json!(\{"beginning_of_week":"integer","country_id":"integer","current_password":"string","default_workspace_id":"integer","email":"string","fullname":"string","password":"string","timezone":"string"\}))  .header(CONTENT_TYPE, "application/json")  .send()  .await?  .json()  .await?;    println!("{:#?}", json);  Ok(())}

Parameters

Body

Name Type Description
beginning_of_week integer User’s first day of the week. Sunday: 0, Monday:1, etc.
country_id integer User’s country ID
current_password string User’s current password (used to change the current password)
default_workspace_id integer User’s default workspace ID
email string User’s email address
fullname string User’s full name
password string User’s new password (current one must also be provided)
timezone string User’s timezone

Response

200

Name Type Description
api_token string will be omitted if empty
at string -
beginning_of_week integer -
country_id integer -
created_at string -
default_workspace_id integer -
email string -
fullname string -
has_password boolean -
id integer -
image_url string -
openid_email string -
openid_enabled boolean -
options object will be omitted if empty
timezone string -
updated_at string -
options

400

Possible error messages:

  • Current password is not valid
  • Current password must be present to change password
  • Invalid beginning_of_week
  • Invalid country_id
  • Invalid default_workspace_id
  • Invalid email
  • Invalid fullname
  • Invalid timezone
  • Password should be at least 6 characters
  • user with this email already exists

403

User does not have access to this resource.