How Creating a Task Actually Works in Toggl Track
POST /workspaces/{workspace_id}/projects/{project_id}/tasks creates a task nested under a specific project -- a task can't exist independently of a parent project.
Real API Details
Tasks are a paid-plan feature, not available on Toggl Track's free tier, so this call can fail outright on a workspace that hasn't been upgraded, independent of whether the request itself is well-formed.
Practical Considerations
A time entry can optionally reference both a project_id and a task_id together for a finer breakdown, so the parent project has to be created first before any task underneath it.
