Skip to main content

Tasks

GET WorkspaceProjectTasks

https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}/tasks

Get project tasks for given workspace.

curl  https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}/tasks \
-H "Content-Type: application/json" \
-u <email>:<password>

Parameters

Path

nametyperequireddescription
workspace_idintegertrueNumeric ID of the workspace
project_idintegertrueNumeric ID of the project

Response

200

NameTypeDescription
activebooleanFalse when the task has been done
atstringWhen the task was created/last modified
client_namestringnull
estimated_secondsintegernull
idintegerTask ID
integration_ext_idstringThe external ID of the linked entity in the external system (e.g. JIRA/SalesForce)
integration_ext_typestringThe external type of the linked entity in the external system (e.g. JIRA/SalesForce)
integration_providerstringThe provider (e.g. JIRA/SalesForce) that has an entity linked to this Toggl Track entity
namestringTask Name
permissionsstring-
project_colorstringMetadata
project_idintegerProject ID
project_namestring-
ratenumberRate for this task
rate_last_updatedstringnull
recurringbooleanWhether this is a recurring task
toggl_accounts_idstringnull
tracked_secondsintegerThe value tracked_seconds is in milliseconds, not in seconds.
user_idintegernull
workspace_idintegerWorkspace ID

400

Possible errors:

  • Invalid project_id

403

User does not have access to this resource.

500

Internal Server Error

POST WorkspaceProjectTasks

https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}/tasks

Post project tasks for given workspace.

curl -X POST https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}/tasks \
-H "Content-Type: application/json" \
-d '\{"active":"boolean","estimated_seconds":"integer","name":"string","user_id":"integer"\}' \
-u <email>:<password>

Parameters

Path

nametyperequireddescription
workspace_idintegertrueNumeric ID of the workspace
project_idintegertrueNumeric ID of the project

Body

NameTypeDescription
activebooleanUse false to mark the task as done
estimated_secondsintegerTask estimation in seconds
namestringName
user_idintegerCreator ID, if omitted, will use requester user ID

Response

200

NameTypeDescription
activebooleanFalse when the task has been done
atstringWhen the task was created/last modified
client_namestringnull
estimated_secondsintegernull
idintegerTask ID
integration_ext_idstringThe external ID of the linked entity in the external system (e.g. JIRA/SalesForce)
integration_ext_typestringThe external type of the linked entity in the external system (e.g. JIRA/SalesForce)
integration_providerstringThe provider (e.g. JIRA/SalesForce) that has an entity linked to this Toggl Track entity
namestringTask Name
permissionsstring-
project_colorstringMetadata
project_idintegerProject ID
project_namestring-
ratenumberRate for this task
rate_last_updatedstringnull
recurringbooleanWhether this is a recurring task
toggl_accounts_idstringnull
tracked_secondsintegerThe value tracked_seconds is in milliseconds, not in seconds.
user_idintegernull
workspace_idintegerWorkspace ID

400

Possible errors:

  • "Project not found/accessible, Can not change tasks of archived project"
  • Invalid project_id

403

User does not have access to this resource.

500

Internal Server Error

PATCH WorkspaceProjectTasks

https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}/tasks/{task_ids}

Patch project tasks for given workspace.

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

Parameters

Path

nametyperequireddescription
workspace_idintegertrueNumeric ID of the workspace
project_idintegertrueNumeric ID of the project
task_idsstringtrueNumeric IDs of project tasks separated by comma

Body

NameTypeDescription
itemsArray of object-
items
NameTypeDescription
opstring-
pathstring-

Response

200

NameTypeDescription
failureArray of object-
successArray of integer-
failure
NameTypeDescription
idinteger-
messagestring-

400

Possible errors:

  • Invalid project_id

403

User does not have access to this resource.

500

Internal Server Error

GET WorkspaceProjectTask

https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}/tasks/{task_id}

Get project task for given task id.

curl  https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}/tasks/{task_id} \
-H "Content-Type: application/json" \
-u <email>:<password>

Parameters

Path

nametyperequireddescription
workspace_idintegertrueNumeric ID of the workspace
project_idintegertrueNumeric ID of the project
task_idintegertrueNumeric ID of the task

Response

200

NameTypeDescription
activebooleanFalse when the task has been done
atstringWhen the task was created/last modified
client_namestringnull
estimated_secondsintegernull
idintegerTask ID
integration_ext_idstringThe external ID of the linked entity in the external system (e.g. JIRA/SalesForce)
integration_ext_typestringThe external type of the linked entity in the external system (e.g. JIRA/SalesForce)
integration_providerstringThe provider (e.g. JIRA/SalesForce) that has an entity linked to this Toggl Track entity
namestringTask Name
permissionsstring-
project_colorstringMetadata
project_idintegerProject ID
project_namestring-
ratenumberRate for this task
rate_last_updatedstringnull
recurringbooleanWhether this is a recurring task
toggl_accounts_idstringnull
tracked_secondsintegerThe value tracked_seconds is in milliseconds, not in seconds.
user_idintegernull
workspace_idintegerWorkspace ID

400

Possible errors:

  • Invalid project_id
  • Invalid task_id

403

User does not have access to this resource.

500

Internal Server Error

PUT WorkspaceProjectTask

https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}/tasks/{task_id}

Put project task for given workspace.

curl -X PUT https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}/tasks/{task_id} \
-H "Content-Type: application/json" \
-d '\{"active":"boolean","estimated_seconds":"integer","name":"string","user_id":"integer"\}' \
-u <email>:<password>

Parameters

Path

nametyperequireddescription
workspace_idintegertrueNumeric ID of the workspace
project_idintegertrueNumeric ID of the project
task_idstringtrueNumeric ID of project task

Body

NameTypeDescription
activebooleanUse false to mark the task as done
estimated_secondsintegerTask estimation in seconds
namestringName
user_idintegerCreator ID, if omitted, will use requester user ID

Response

200

NameTypeDescription
activebooleanFalse when the task has been done
atstringWhen the task was created/last modified
client_namestringnull
estimated_secondsintegernull
idintegerTask ID
integration_ext_idstringThe external ID of the linked entity in the external system (e.g. JIRA/SalesForce)
integration_ext_typestringThe external type of the linked entity in the external system (e.g. JIRA/SalesForce)
integration_providerstringThe provider (e.g. JIRA/SalesForce) that has an entity linked to this Toggl Track entity
namestringTask Name
permissionsstring-
project_colorstringMetadata
project_idintegerProject ID
project_namestring-
ratenumberRate for this task
rate_last_updatedstringnull
recurringbooleanWhether this is a recurring task
toggl_accounts_idstringnull
tracked_secondsintegerThe value tracked_seconds is in milliseconds, not in seconds.
user_idintegernull
workspace_idintegerWorkspace ID

400

Possible errors:

  • Invalid project_id
  • Invalid task_id

403

User does not have access to this resource.

500

Internal Server Error

DELETE WorkspaceProjectTask

https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}/tasks/{task_id}

Delete projects task for given workspace.

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

Parameters

Path

nametyperequireddescription
workspace_idintegertrueNumeric ID of the workspace
project_idintegertrueNumeric ID of the project
task_idintegertrueNumeric ID of the task

Response

200

Successful operation.

400

Possible errors:

  • Invalid project_id
  • Invalid task_id

403

User does not have access to this resource.

500

Internal Server Error

GET Tasks

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

List Workspace tasks.

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

Parameters

Path

nametyperequireddescription
workspace_idintegertrueNumeric ID of the workspace

Query

nametyperequireddescription
sinceintegerfalseRetrieve tasks created/modified/deleted since this date using UNIX timestamp.
pageintegerfalsePage number, default 1
per_pageintegerfalseNumber of items per page, default 50
sort_orderstringfalseSort order, default ASC
sort_fieldstringfalseField used for sorting. Default is name. Valid values are 'name' and 'created_at'
activebooleanfalseFilter by active state. You can also pass 'both' to get both active and inactive tasks.
pidintegerfalseFilter by project id
start_datestringfalseSmallest boundary date in the format YYYY-MM-DD
end_datestringfalseBiggest boundary date in the format YYYY-MM-DD

Response

200

NameTypeDescription
dataArray of object-
pageinteger-
per_pageinteger-
sort_fieldstring-
sort_orderstring-
total_countinteger-
data
NameTypeDescription
activebooleanFalse when the task has been done
atstringWhen the task was created/last modified
client_namestringnull
estimated_secondsintegernull
idintegerTask ID
integration_ext_idstringThe external ID of the linked entity in the external system (e.g. JIRA/SalesForce)
integration_ext_typestringThe external type of the linked entity in the external system (e.g. JIRA/SalesForce)
integration_providerstringThe provider (e.g. JIRA/SalesForce) that has an entity linked to this Toggl Track entity
namestringTask Name
permissionsstring-
project_colorstringMetadata
project_idintegerProject ID
project_namestring-
ratenumberRate for this task
rate_last_updatedstringnull
recurringbooleanWhether this is a recurring task
toggl_accounts_idstringnull
tracked_secondsintegerThe value tracked_seconds is in milliseconds, not in seconds.
user_idintegernull
workspace_idintegerWorkspace ID

403

User does not have access to this resource.

500

Internal Server Error

© 2024 Toggl. All rights reserved.