Skip to main content

Time entry

GET TimeEntries

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

Lists latest time entries.

curl  https://api.track.toggl.com/api/v9/me/time_entries \
-H "Content-Type: application/json" \
-u <email>:<password>

Parameters

Query

nametyperequireddescription
beforestringfalsebefore
sincestringfalsesince
start_datestringfalsestart date
end_datestringfalseend date

Response

Successful operation.

GET Get current time entry

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

Load running time entry for user ID.

curl  https://api.track.toggl.com/api/v9/me/time_entries/current \
-H "Content-Type: application/json" \
-u <email>:<password>

Response

null

POST TimeEntries

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

Creates a new workspace TimeEntry.

curl -X POST https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/time_entries \
-H "Content-Type: application/json" \
-d '{"billable":"boolean","created_with":"string","description":"string","duration":"integer","duronly":"boolean","pid":"integer","project_id":"integer","start":"string","start_date":"string","stop":"string","tag_action":"string","task_id":"integer","tid":"integer","uid":"Ideally we want object_id type fields, so yeah, those here are for that
and proper field as priority, hence if that set, we use that","user_id":"integer","wid":"integer","workspace_id":"integer"}' \
-u <email>:<password>

Parameters

Path

nametyperequireddescription
workspace_idintegertrueNumeric ID of the workspace

Body

nametyperequireddescription
billablebooleanfalse-
created_withstringfalse-
descriptionstringfalse-
durationintegerfalse-
duronlybooleanfalse-
pidintegerfalse-
postedFieldsundefinedfalse-
project_idintegerfalse-
startstringfalse-
start_datestringfalse-
stopstringfalse-
tag_actionstringfalse-
tag_idsundefinedfalse-
tagsundefinedfalse-
task_idintegerfalse-
tidintegerfalse-
uidintegerfalseIdeally we want object_id type fields, so yeah, those here are for that
and proper field as priority, hence if that set, we use that
user_idintegerfalse-
widintegerfalse-
workspace_idintegerfalse-

Response

{"at":{"type":"string"},"billable":{"type":"boolean"},"description":{"type":"string"},"duration":{"description":"DurationInSeconds for running entries should be -1 * (Unix start time).","type":"integer"},"duronly":{"type":"boolean"},"id":{"type":"integer"},"pid":{"type":"integer"},"project_id":{"type":"integer"},"server_deleted_at":{"type":"string"},"start":{"type":"string"},"stop":{"type":"string"},"tag_ids":{},"tags":{},"task_id":{"type":"integer"},"tid":{"type":"integer"},"uid":{"description":"Ideally we'd want object_id type things, but for usual reasons we need to keep both around, so, that's that","type":"integer"},"user_id":{"type":"integer"},"wid":{"type":"integer"},"workspace_id":{"type":"integer"}}

PATCH Bulk editing time entries

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

In short: http://tools.ietf.org/html/rfc6902 and http://tools.ietf.org/html/rfc6901 with some additions. Patch will be executed partially when there are errors with some records. No transaction, no rollback.

curl -X PATCH https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/time_entries/{time_entry_ids} \
-H "Content-Type: application/json" \
-d '{"op":"string","path":"string"}' \
-u <email>:<password>

Parameters

Path

nametyperequireddescription
workspace_idintegertrueNumeric ID of the workspace
time_entry_idsstringtrueNumeric IDs of time_entries, separated by comma. E.g.: 204301830,202700150,202687559

Body

nametyperequireddescription
opstringfalse-
pathstringfalse-

Response

{"failure":{},"success":{}}

PUT TimeEntries

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

Updates a workspace time entry.

curl -X PUT https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/time_entries/{time_entry_id} \
-H "Content-Type: application/json" \
-d '{"billable":"boolean","created_with":"string","description":"string","duration":"integer","duronly":"boolean","pid":"integer","project_id":"integer","start":"string","start_date":"string","stop":"string","tag_action":"string","task_id":"integer","tid":"integer","uid":"Ideally we want object_id type fields, so yeah, those here are for that
and proper field as priority, hence if that set, we use that","user_id":"integer","wid":"integer","workspace_id":"integer"}' \
-u <email>:<password>

Parameters

Path

nametyperequireddescription
workspace_idintegertrueNumeric ID of the workspace
time_entry_idintegertrueTimeEntry ID.

Body

nametyperequireddescription
billablebooleanfalse-
created_withstringfalse-
descriptionstringfalse-
durationintegerfalse-
duronlybooleanfalse-
pidintegerfalse-
postedFieldsundefinedfalse-
project_idintegerfalse-
startstringfalse-
start_datestringfalse-
stopstringfalse-
tag_actionstringfalse-
tag_idsundefinedfalse-
tagsundefinedfalse-
task_idintegerfalse-
tidintegerfalse-
uidintegerfalseIdeally we want object_id type fields, so yeah, those here are for that
and proper field as priority, hence if that set, we use that
user_idintegerfalse-
widintegerfalse-
workspace_idintegerfalse-

Response

{"at":{"type":"string"},"billable":{"type":"boolean"},"description":{"type":"string"},"duration":{"description":"DurationInSeconds for running entries should be -1 * (Unix start time).","type":"integer"},"duronly":{"type":"boolean"},"id":{"type":"integer"},"pid":{"type":"integer"},"project_id":{"type":"integer"},"server_deleted_at":{"type":"string"},"start":{"type":"string"},"stop":{"type":"string"},"tag_ids":{},"tags":{},"task_id":{"type":"integer"},"tid":{"type":"integer"},"uid":{"description":"Ideally we'd want object_id type things, but for usual reasons we need to keep both around, so, that's that","type":"integer"},"user_id":{"type":"integer"},"wid":{"type":"integer"},"workspace_id":{"type":"integer"}}

DELETE TimeEntries

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

Deletes a workspace time entry.

curl -X DELETE https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/time_entries/{time_entry_id} \
-H "Content-Type: application/json" \
-u <email>:<password>

Parameters

Path

nametyperequireddescription
workspace_idintegertrueNumeric ID of the workspace
time_entry_idintegertrueTimeEntry ID.

Response

Returns only status code.
ยฉ 2022 Toggl. All rights reserved.