Skip to main content

What is a Task ID?

A task ID is a unique identifier assigned to each task within a project. It’s required for making API requests that interact with specific tasks, such as creating time entries or generating invoices.

Step-by-Step Instructions

1

Make the API request

Send a GET request to the Get project details API endpoint, including your API key in the request header.
2

Parse the response

The response will contain a tasks array with task objects, each containing an id field.Example:
{
  "project": { ... },
  "tasks": [
    {
      "id": "4d0d7ad1-91ce-44d0-abfe-6718422716dd",
      "name": "UI Design",
      "hourly_rate": 75.0,
      "deleted": false,
      "hourly_rate_with_currency": "$75.00",
      "is_billable": true
    },
    {
      "id": "f23a9c19-1153-4ef9-b488-1789f047b245",
      "name": "Frontend Development",
      "hourly_rate": 85.0,
      "deleted": false,
      "hourly_rate_with_currency": "$85.00",
      "is_billable": true
    }
  ],
  "checklists": [ ... ]
}
3

Extract the task ID

Here the task ID for UI Design is: 4d0d7ad1-91ce-44d0-abfe-6718422716dd.You can access the task ID in your code from the response using:
// Get the first task's ID
const taskId = response.tasks[0].id;

// Or iterate through all tasks to find a specific one
const uiDesignTask = response.tasks.find(task => task.name === "UI Design");
const uiDesignTaskId = uiDesignTask.id;