---
title: "Create task — GanttFather API"
description: "Add a task to a project. Supports idempotent retries."
canonical: "https://ganttfather.com/docs/api/create-task/"
locale: "en"
category: "product"
---

# Create task — GanttFather API

API reference [AI assistants (MCP)](https://ganttfather.com/docs/ai-agent/)

## Getting started

- [Introduction](https://ganttfather.com/docs/api/introduction/)
- [Authentication](https://ganttfather.com/docs/api/authentication/)
- [Pagination](https://ganttfather.com/docs/api/pagination/)
- [Rate limits & quotas](https://ganttfather.com/docs/api/rate-limits/)
- [Errors](https://ganttfather.com/docs/api/errors/)

## Projects

- [GET List projects](https://ganttfather.com/docs/api/list-projects/)
- [GET Get project](https://ganttfather.com/docs/api/get-project/)

## Tasks

- [GET List tasks](https://ganttfather.com/docs/api/list-tasks/)
- [GET Get task](https://ganttfather.com/docs/api/get-task/)
- [POST Create task](https://ganttfather.com/docs/api/create-task/)
- [PATCH Update task](https://ganttfather.com/docs/api/update-task/)
- [DELETE Delete task](https://ganttfather.com/docs/api/delete-task/)
- [POST Reorder tasks](https://ganttfather.com/docs/api/reorder-tasks/)
- [PUT Set assignees](https://ganttfather.com/docs/api/set-assignees/)

## Dependencies

- [GET List dependencies](https://ganttfather.com/docs/api/list-dependencies/)
- [PUT Set dependencies](https://ganttfather.com/docs/api/set-dependencies/)
- [POST Add dependency](https://ganttfather.com/docs/api/add-dependency/)
- [DELETE Remove dependency](https://ganttfather.com/docs/api/remove-dependency/)

## Resources

- [GET List resources](https://ganttfather.com/docs/api/list-resources/)
- [POST Create resource](https://ganttfather.com/docs/api/create-resource/)
- [PATCH Update resource](https://ganttfather.com/docs/api/update-resource/)
- [DELETE Delete resource](https://ganttfather.com/docs/api/delete-resource/)

## Members

- [GET List members](https://ganttfather.com/docs/api/list-members/)

 Tasks / **Create task**

# Create task

 POST

 Updated Jul 4, 2026

 Creates a task in the project. Unless you pass assigneeIds , the task is **assigned to your token’s integration identity** — the member row each token gets on the project roster — so work created over the API is clearly attributed to the integration rather than to a person.

 On success the API returns 201 Created with the task body and a Location header pointing at [Get task](https://ganttfather.com/docs/api/get-task/).

## Path parameters

 Name Type Required Description

 projectId string (uuid) Yes The project to create the task in.

## Headers

 Name Required Description

 Idempotency-Key No Same key + same body replays the original 201 ; same key + different body is 409 idempotency_conflict . See [Rate limits & quotas →](https://ganttfather.com/docs/api/rate-limits/).

## Request body

 Name Type Required Description

 name string Yes Task name.

 startDate string (ISO 8601) Yes Task start date.

 endDate string (ISO 8601) Yes Task end date.

 description string No Free-text description.

 status string No A custom status key or a legacy name ( Open / InProgress / Done / Closed / OnHold ). Omitted uses the project default.

 priority string No High / Medium / Low .

 parentId string (uuid) No Parent task id.

 orderIndex number No Sort position among siblings.

 assigneeIds array of string (uuid) No Member or resource ids. **Unknown ids are rejected** ( 400 invalid_assignee ) — nothing is created.

 estimation number No Hours.

 color string No #RRGGBB .

 curl -X POST https://api.ganttfather.com/v1/projects/{projectId}/tasks \
 -H "Authorization: Bearer glt_YOUR_TOKEN" \
 -H "Content-Type: application/json" \
 -H "Idempotency-Key: create-task-001" \
 -d '{
 "name": "Draft launch checklist",
 "startDate": "2026-07-07",
 "endDate": "2026-07-10",
 "status": "InProgress"
 }'

 Response 201 Created

 {
 "id": "0198f1a2-6b3d-7c9e-9a1f-2d4e5f6a7b8c",
 "name": "Draft launch checklist",
 "description": null,
 "startDate": "2026-07-07T00:00:00Z",
 "endDate": "2026-07-10T00:00:00Z",
 "estimation": null,
 "progress": 0,
 "status": "InProgress",
 "statusKey": null,
 "priority": "Medium",
 "orderIndex": 1000,
 "indentation": 0,
 "parentId": null,
 "assigneeIds": ["0198f1a2-9999-7c9e-9a1f-2d4e5f6a7b8c"],
 "predecessors": []
}

 Rather not write REST?

## Connect an AI assistant instead.

 [Explore MCP setup →](https://ganttfather.com/docs/ai-agent/)
