Tasks

Tasks represent actions that need to be completed and must be associated with a project. Tasks have an optional due date, can be assigned to a user and can have subtasks.

Get all tasks

Copy link

Returns all tasks.

Endpoint is in beta

Cost

10

Request
GET

/api/v2/tasks

Query parameters

cursor

string

For pagination, the marker (an opaque string value) representing the first item on the next page

limit

integer

For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.

is_done

boolean

Whether the task is done or not. If omitted, both done and not done tasks are returned.

is_milestone

boolean

Whether the task is a milestone or not. If omitted, both milestone and non-milestone tasks are returned.

assignee_id

integer

If supplied, only tasks assigned to this user are returned

project_id

integer

If supplied, only tasks belonging to this project are returned

parent_task_id

string

If null is supplied, only root-level tasks (without a parent) are returned. If an integer is supplied, only subtasks of that specific task are returned. By default all tasks are returned.

Response
200

OK

Expand all
Copy code
    • true
    • [ ... ]
      • { ... }

      Get details of a task

      Copy link

      Returns the details of a specific task.

      Endpoint is in beta

      Cost

      1

      Request
      GET

      /api/v2/tasks/{id}

      Path parameters

      id

      integer

      required

      The ID of the task

      Response
      200

      OK

      Expand all
      Copy code
        • true
        • { ... }
          • null

        Add a task

        Copy link

        Adds a new task.

        Endpoint is in beta

        Cost

        5

        Request
        POST

        /api/v2/tasks

        Body parameters

        application/json

        title

        string

        required

        The title of the task

        project_id

        integer

        required

        The ID of the project this task is associated with

        parent_task_id

        integer

        The ID of the parent task. Cannot be the ID of a task that is already a subtask.

        description

        string

        The description of the task

        done

        integer

        Whether the task is done or not. 0 = Not done, 1 = Done.

        Values

        0

        1

        milestone

        integer

        Whether the task is a milestone or not. 0 = Not a milestone, 1 = Milestone.

        Values

        0

        1

        due_date

        string

        The due date of the task. Format: YYYY-MM-DD.

        Format

        date

        start_date

        string

        The start date of the task. Format: YYYY-MM-DD.

        Format

        date

        assignee_id

        integer

        The ID of the user assigned to the task. When set, the assignee_ids field will be overwritten with this value.

        assignee_ids

        array

        The IDs of users assigned to the task. When set, the assignee_id field will be set to the first value in this array, or null if empty.

        priority

        integer

        The priority of the task

        Response
        201

        Created

        Expand all
        Copy code
          • true
          • { ... }
            • null

          Update a task

          Copy link

          Updates a task.

          Endpoint is in beta

          Cost

          5

          Request
          PATCH

          /api/v2/tasks/{id}

          Path parameters

          id

          integer

          required

          The ID of the task

          Body parameters

          application/json

          title

          string

          The title of the task

          project_id

          integer

          The ID of the project this task is associated with

          parent_task_id

          integer

          The ID of the parent task. Cannot be the ID of a task that is already a subtask.

          description

          string

          The description of the task

          done

          integer

          Whether the task is done or not. 0 = Not done, 1 = Done.

          Values

          0

          1

          milestone

          integer

          Whether the task is a milestone or not. 0 = Not a milestone, 1 = Milestone.

          Values

          0

          1

          due_date

          string

          The due date of the task. Format: YYYY-MM-DD.

          Format

          date

          start_date

          string

          The start date of the task. Format: YYYY-MM-DD.

          Format

          date

          assignee_id

          integer

          The ID of the user assigned to the task. When set, the assignee_ids field will be overwritten with this value.

          assignee_ids

          array

          The IDs of users assigned to the task. When set, the assignee_id field will be set to the first value in this array, or null if empty.

          priority

          integer

          The priority of the task

          Response
          200

          OK

          Expand all
          Copy code
            • true
            • { ... }
              • null

            Delete a task

            Copy link

            Marks a task as deleted. If the task has subtasks, those will also be deleted.

            Endpoint is in beta

            Cost

            3

            Request
            DELETE

            /api/v2/tasks/{id}

            Path parameters

            id

            integer

            required

            The ID of the task

            Response
            200

            OK

            Expand all
            Copy code
              • true
              • { ... }
                • null

              Subscribe to Pipedrive’s Developer Newsletter