Skip to main content

Overview

Create a new task within a project using the Zapier integration API. This endpoint allows you to add tasks with comprehensive configuration including assignments, priorities, due dates, and time estimates.
This endpoint is designed for Zapier integrations but can be used with any application that needs to create tasks programmatically.

Authentication

All requests require a valid API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY

Create Task

curl -X POST 'https://app.timetracker.in/api/integrations/zapier/triggers/tasks' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -d '{
    "name": "Implement user authentication",
    "description": "Add OAuth2 authentication to the mobile app",
    "status": "todo",
    "priority": "high",
    "estimated_hours": 8.0,
    "due_date": "2024-01-15T00:00:00.000Z",
    "project_id": "p1a2b3c4-d5e6-7890-abcd-ef1234567890",
    "assignee_ids": "tm1a2b3c4-d5e6-7890-abcd-ef1234567890,tm2b3c4d5-e6f7-8901-bcde-f23456789012"
  }'

Request Body

name
string
required
The name of the task. Must be between 1-255 characters.Example: "Implement user authentication"
project_id
string
required
The UUID of the project where the task will be created.Example: "p1a2b3c4-d5e6-7890-abcd-ef1234567890"
description
string
Optional description of the task. Can be used for detailed task documentation and context.Example: "Add OAuth2 authentication to the mobile app"
status
string
default:"todo"
The current status of the task. Valid values:
  • todo - Task is not yet started
  • in-progress - Task is currently being worked on
  • completed - Task has been finished
Example: "todo"
priority
string
default:"medium"
The priority level of the task. Valid values:
  • low - Low priority task
  • medium - Medium priority task
  • high - High priority task
Example: "high"
estimated_hours
number
Estimated time to complete the task in hours. Must be a positive number.Example: 8.0
actual_hours
number
Actual time spent on the task in hours. Must be a positive number.Example: 6.5
due_date
string
When the task is due. Must be a valid ISO 8601 datetime string.Example: "2024-01-15T00:00:00.000Z"
assignee_ids
string
Comma-separated list of team member IDs to assign to the task. Must be valid team member IDs from the project’s workspace.Example: "tm1a2b3c4-d5e6-7890-abcd-ef1234567890,tm2b3c4d5-e6f7-8901-bcde-f23456789012"

Response

Success Response

Returns the created task object with all associated data:
{
  "id": "t1a2b3c4-d5e6-7890-abcd-ef1234567890",
  "name": "Implement user authentication",
  "description": "Add OAuth2 authentication to the mobile app",
  "status": "todo",
  "priority": "high",
  "estimated_hours": 8.0,
  "actual_hours": null,
  "due_date": "2024-01-15T00:00:00.000Z",
  "project_id": "p1a2b3c4-d5e6-7890-abcd-ef1234567890",
  "project_name": "Mobile App Development",
  "project_status": "active",
  "workspace_id": "w1b2c3d4-e5f6-7890-abcd-ef0987654321",
  "workspace_name": "Development Team",
  "client_id": "c1a2b3c4-d5e6-7890-abcd-ef1234567890",
  "client_name": "TechCorp Inc.",
  "assignees": [
    {
      "id": "tm1a2b3c4-d5e6-7890-abcd-ef1234567890",
      "user_id": "u1a2b3c4-d5e6-7890-abcd-ef1234567890",
      "user_name": "John Doe",
      "user_email": "[email protected]",
      "role_name": "Developer"
    },
    {
      "id": "tm2b3c4d5-e6f7-8901-bcde-f23456789012",
      "user_id": "u2b3c4d5-e6f7-8901-bcde-f23456789012",
      "user_name": "Jane Smith",
      "user_email": "[email protected]",
      "role_name": "Senior Developer"
    }
  ],
  "time_entries_count": 0,
  "created_at": "2024-01-10T10:00:00.000Z",
  "updated_at": "2024-01-10T10:00:00.000Z"
}

Response Fields

id
string
Unique task identifier (UUID format)
name
string
Task name
description
string
Task description
status
string
Current task status (todo, in-progress, or completed)
priority
string
Task priority level (low, medium, or high)
estimated_hours
number
Estimated time to complete the task in hours
actual_hours
number
Actual time spent on the task in hours
due_date
string
Task due date in ISO 8601 format
project_id
string
Associated project identifier
project_name
string
Associated project name
project_status
string
Associated project status
workspace_id
string
Associated workspace identifier
workspace_name
string
Associated workspace name
client_id
string
Associated client identifier (if project has a client)
client_name
string
Associated client name (if project has a client)
assignees
array
Array of assigned team members
time_entries_count
integer
Total number of time entries associated with this task
created_at
string
ISO 8601 timestamp when task was created
updated_at
string
ISO 8601 timestamp when task was last modified

Error Responses

{
  "error": "Invalid request body",
  "details": [
    {
      "field": "name",
      "message": "String must contain at least 1 character(s)"
    }
  ]
}
Cause: Required fields are missing or invalid
Solution: Check the request body and ensure all required fields are provided with valid values
{
  "error": "Project not found"
}
Cause: The specified project_id doesn’t exist or you don’t have access to it
Solution: Verify the project ID and ensure it exists in your workspace
{
  "error": "One or more assignee IDs are invalid"
}
Cause: One or more team member IDs in assignee_ids don’t exist in the workspace
Solution: Verify all team member IDs and ensure they belong to the project’s workspace
{
  "error": "Invalid request body",
  "details": [
    {
      "field": "estimated_hours",
      "message": "Number must be greater than 0"
    }
  ]
}
Cause: Hours must be positive numbers
Solution: Provide valid positive numbers for estimated or actual hours
{
  "error": "Unauthorized"
}
Cause: Invalid or missing API key
Solution: Verify your API key is correct and properly formatted
{
  "error": "Internal server error"
}
Cause: Server-side error during task creation
Solution: Retry the request or contact support if the issue persists

Zapier Integration

Zapier Action Configuration

When using this endpoint in Zapier:
  1. Project Selection: Use the dynamic dropdown to select the target project
  2. Required Fields: Only name and project_id are required
  3. Assignee Selection: Optionally select team members from the dynamic dropdown
  4. Task Configuration: Set priority, status, and time estimates
  5. Due Date Management: Set due dates for task scheduling

Sample Zapier Usage

1

Trigger Setup

Set up a trigger (e.g., new project creation, form submission) that provides task information
2

Action Configuration

Configure the “Create Task” action with:
  • Project: Select the target project from dropdown
  • Task Name: Map from trigger data
  • Description: Map from trigger data (if available)
  • Priority: Set task priority level
3

Assignment Setup

Configure task assignments:
  • Assignees: Select team members from available options
  • Due Date: Set task deadline (if applicable)
  • Estimated Hours: Set time estimate for planning
4

Test & Activate

Test the Zap with sample data, then activate for live use

Use Cases

Automated Task Creation: Automatically create tasks when projects are created or milestones are reached, ensuring consistent task structure and assignment.
Bug Tracking Integration: Create tasks automatically when bugs are reported in your issue tracking system, maintaining seamless workflow between bug reports and task management.
Request Management: Convert client requests or support tickets into actionable tasks with proper assignments and due dates.
Workflow Automation: Create tasks based on team member availability, project deadlines, or workload distribution for better resource management.

Important Notes

Project Association: Tasks must be created within an existing project. Ensure the project_id is valid and accessible in your workspace.
Assignee Validation: All assignee IDs must be valid team members in the project’s workspace. Invalid IDs will result in a 400 error.
Best Practices:
  • Use clear, actionable task names that describe the work to be done
  • Set realistic estimated hours for better project planning
  • Assign tasks to appropriate team members based on skills and availability
  • Use due dates to maintain project timelines
  • Provide detailed descriptions for complex tasks
  • Test with sample data before implementing in production
  • Handle error responses gracefully in your application

Rate Limits

  • Rate Limit: 100 requests per minute per API key
  • Burst Limit: 10 requests per second
  • Daily Limit: 10,000 requests per day
Rate limits are applied per API key and workspace combination. Contact support if you need higher limits for your use case.