---
title: "Create a new task"
method: POST
path: "/tasks"
tags: ["Tasks"]
---

# Create a new task

`POST /tasks`

## Request

- Base URL: `https://api.heffl.com/api/v1`
- URL: `https://api.heffl.com/api/v1/tasks`
- Auth: API key in header `x-api-key`

Creates a new task. The task will be assigned to the user associated with your API key.

## Request body

- object
  - `title` string, required: Task title
  - `description` string: Task description
  - `type` 'call' | 'todo' | 'meeting': Task type
  - `status` 'OPEN' | 'IN_PROGRESS' | 'ON_HOLD' | 'COMPLETED' | 'CANCELLED': Task status
  - `dueDate` string, date-time: Due date for the task
  - `startDate` string, date-time: Start date for the task
  - `priority` 'LOW' | 'MEDIUM' | 'HIGH': Task priority
  - `entity` 'leads' | 'deals' | 'clients': Entity type to associate the task with
  - `entityId` string: Public ID of the entity to associate the task with

## Response `200`

OK

- object
  - `id` string, required: Task public ID
  - `number` string, required: Auto-generated task number
  - `title` string, required: Task title
  - `description` string, nullable: Task description
  - `status` string, required: Task status
  - `type` string, required: Task type
  - `priority` string, nullable: Task priority
  - `dueDate` string, date-time, nullable: Due date
  - `startDate` string, date-time, nullable: Start date
  - `createdAt` string, date-time, required: When the task was created

---

[API](https://skmtc.dev/heffl/apis/heffl-public-api-legacy-v1.md) · [All operations](https://skmtc.dev/heffl/apis/heffl-public-api-legacy-v1/llms.txt) · [OpenAPI document](https://skmtc.dev/heffl/apis/heffl-public-api-legacy-v1/revisions/9bdb229223a2?raw)
