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

{
"active": {
"description": "False when the task has been done",
"type": "boolean"
},
"at": {
"description": "When the task was created/last modified",
"type": "string"
},
"estimated_seconds": {
"description": "Estimation time for this task in seconds",
"type": "integer",
"nullable": true
},
"id": {
"description": "Task ID",
"type": "integer"
},
"name": {
"description": "Task Name",
"type": "string"
},
"project_id": {
"description": "Project ID",
"type": "integer"
},
"recurring": {
"description": "Whether this is a recurring task",
"type": "boolean"
},
"server_deleted_at": {
"description": "When the task was deleted",
"type": "string",
"nullable": true
},
"tracked_seconds": {
"description": "The value tracked_seconds is in milliseconds, not in seconds.",
"type": "integer"
},
"user_id": {
"description": "Task assignee, if available",
"type": "integer",
"nullable": true
},
"workspace_id": {
"description": "Workspace ID",
"type": "integer"
}
}

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","project_id":"integer","user_id":"integer","workspace_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
project_idintegerProject ID
user_idintegerCreator ID, if omitted will use requester user ID
workspace_idintegerWorkspace ID

Response

{
"active": {
"description": "False when the task has been done",
"type": "boolean"
},
"at": {
"description": "When the task was created/last modified",
"type": "string"
},
"estimated_seconds": {
"description": "Estimation time for this task in seconds",
"type": "integer",
"nullable": true
},
"id": {
"description": "Task ID",
"type": "integer"
},
"name": {
"description": "Task Name",
"type": "string"
},
"project_id": {
"description": "Project ID",
"type": "integer"
},
"recurring": {
"description": "Whether this is a recurring task",
"type": "boolean"
},
"server_deleted_at": {
"description": "When the task was deleted",
"type": "string",
"nullable": true
},
"tracked_seconds": {
"description": "The value tracked_seconds is in milliseconds, not in seconds.",
"type": "integer"
},
"user_id": {
"description": "Task assignee, if available",
"type": "integer",
"nullable": true
},
"workspace_id": {
"description": "Workspace ID",
"type": "integer"
}
}

PUT WorkspaceProjectTasks

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

Put project tasks for given workspace.

curl -X PUT https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}/tasks/{task_ids} \
-H "Content-Type: application/json" \
-d '{"active":"boolean","estimated_seconds":"integer","name":"string","project_id":"integer","user_id":"integer","workspace_id":"integer"}' \
-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
activebooleanUse false to mark the task as done
estimated_secondsintegerTask estimation in seconds
namestringName
project_idintegerProject ID
user_idintegerCreator ID, if omitted will use requester user ID
workspace_idintegerWorkspace ID

Response

{
"active": {
"description": "False when the task has been done",
"type": "boolean"
},
"at": {
"description": "When the task was created/last modified",
"type": "string"
},
"estimated_seconds": {
"description": "Estimation time for this task in seconds",
"type": "integer",
"nullable": true
},
"id": {
"description": "Task ID",
"type": "integer"
},
"name": {
"description": "Task Name",
"type": "string"
},
"project_id": {
"description": "Project ID",
"type": "integer"
},
"recurring": {
"description": "Whether this is a recurring task",
"type": "boolean"
},
"server_deleted_at": {
"description": "When the task was deleted",
"type": "string",
"nullable": true
},
"tracked_seconds": {
"description": "The value tracked_seconds is in milliseconds, not in seconds.",
"type": "integer"
},
"user_id": {
"description": "Task assignee, if available",
"type": "integer",
"nullable": true
},
"workspace_id": {
"description": "Workspace ID",
"type": "integer"
}
}

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" \
-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

Response

{
"failure": {
"items": [
{
"id": {
"type": "integer"
},
"message": {
"type": "string"
}
}
]
},
"success": {
"type": [
"integer"
]
}
}

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

{
"active": {
"description": "False when the task has been done",
"type": "boolean"
},
"at": {
"description": "When the task was created/last modified",
"type": "string"
},
"estimated_seconds": {
"description": "Estimation time for this task in seconds",
"type": "integer",
"nullable": true
},
"id": {
"description": "Task ID",
"type": "integer"
},
"name": {
"description": "Task Name",
"type": "string"
},
"project_id": {
"description": "Project ID",
"type": "integer"
},
"recurring": {
"description": "Whether this is a recurring task",
"type": "boolean"
},
"server_deleted_at": {
"description": "When the task was deleted",
"type": "string",
"nullable": true
},
"tracked_seconds": {
"description": "The value tracked_seconds is in milliseconds, not in seconds.",
"type": "integer"
},
"user_id": {
"description": "Task assignee, if available",
"type": "integer",
"nullable": true
},
"workspace_id": {
"description": "Workspace ID",
"type": "integer"
}
}

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

Successful operation.

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

Response

{
"data": {
"items": [
{
"active": {
"description": "False when the task has been done",
"type": "boolean"
},
"at": {
"description": "When the task was created/last modified",
"type": "string"
},
"estimated_seconds": {
"description": "Estimation time for this task in seconds",
"type": "integer",
"nullable": true
},
"id": {
"description": "Task ID",
"type": "integer"
},
"name": {
"description": "Task Name",
"type": "string"
},
"project_id": {
"description": "Project ID",
"type": "integer"
},
"recurring": {
"description": "Whether this is a recurring task",
"type": "boolean"
},
"server_deleted_at": {
"description": "When the task was deleted",
"type": "string",
"nullable": true
},
"tracked_seconds": {
"description": "The value tracked_seconds is in milliseconds, not in seconds.",
"type": "integer"
},
"user_id": {
"description": "Task assignee, if available",
"type": "integer",
"nullable": true
},
"workspace_id": {
"description": "Workspace ID",
"type": "integer"
}
}
]
},
"page": {
"type": "integer"
},
"per_page": {
"type": "integer"
},
"sort_field": {
"type": "string"
},
"sort_order": {
"type": "string"
},
"total_count": {
"type": "integer"
}
}
© 2022 Toggl. All rights reserved.