---
title: "Create Task"
method: POST
path: "/api/v1/projects/{project_id}/tasks"
tags: ["v1", "Tasks", "tasks"]
---

# Create Task

`POST /api/v1/projects/{project_id}/tasks`

## Request

- Base URL: `https://api.jeevyfabrication.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.jeevyfabrication.com/api/v1/projects/{project_id}/tasks`
- Auth: none declared

Create a new task for a project.

``after_task_id`` / ``before_task_id`` name the sibling the new row goes
beside; the server resolves the slot and shifts the level to open it. Send
neither to append at the end. Query parameters rather than body fields on
purpose: ``TaskCreate`` is dumped straight into the inserted row, so anything
added there becomes a column.

## Path parameters

- `project_id` integer, required

## Query parameters

- `after_task_id` integer, nullable
- `before_task_id` integer, nullable

## Request body

- TaskCreate: Request model for creating a task.
  - `title` string, required: Task title
  - `task_number` string, nullable
  - `description` string, nullable
  - `work_stream_id` integer, nullable: Work stream this task belongs to. Required for top-level tasks. If not set, task is a sub-task (parent_task_id must be set).
  - `parent_task_id` integer, nullable: Parent task ID for sub-tasks. work_stream_id is auto-propagated from the parent chain on creation.
  - `assigned_user_id` integer, nullable: Deprecated: Use assigned_personnel_ids
  - `assigned_user_ids` integer[], nullable: Deprecated: Use assigned_personnel_ids
  - `assigned_personnel_ids` integer[], nullable: Array of shop personnel IDs to assign to this task
  - `equipment_ids` integer[], nullable: Array of equipment IDs required for this task
  - `deadline` string, nullable: Task deadline as ISO 8601 timestamp (e.g., '2026-01-25T14:30:00Z')
  - `drawing_id` integer, nullable
  - `display_order` integer, nullable: Position among siblings. OMIT to append at the end of the level -- the server resolves it to max(level) + 1. This defaulted to 0 until 2026-08-30, which is a real position ('put this first') rather than 'unspecified', so every server-side creator that left it out stamped 0 on every row: the shop agent, the shop tools and the CSV import. Levels where every sibling shares one order cannot express 'insert after this row' at all.
  - `status` string, nullable
  - `depends_on_task_ids` integer[], nullable: Sibling-only dependencies in the work stream tree: other tasks with the same parent_task_id, or other top-level tasks in the same work_stream_id. Cross-cutting deps belong on the parent group. API responses may include effective_depends_on_task_ids (union with ancestors' stored deps).
  - `notes` string, nullable: Optional notes for employees working on this task
  - `is_group` boolean, nullable: Flag to indicate if this is a task group (container) or a regular task/operation. Groups organize tasks hierarchically.
  - `ai_provenance` string, nullable: Which AI run or tool drafted this task, when one did. Unset for a task a person wrote.
  - `clockInLevel` string, nullable: 'group' = workers clock into this group; 'individual' = clock into children separately. Only meaningful when is_group=true.
  - `estimatedHours` number, nullable: Total man-hours to complete. When set: shop_hours = estimated_hours / required_people.
  - `man_hours` number, nullable: Computed: shop_hours × required_people. Legacy field.
  - `shopHours` number, nullable: Floor time per person. Computed from estimated_hours / required_people when estimate is set.
  - `requiredPeople` integer, nullable: Simultaneous workers needed. Default 1. More people = shorter duration.
  - `durationDays` integer, nullable: Wall-clock duration in whole working days (integer). The scheduling engine's canonical effort input.
  - `count` integer, nullable: Quantity/number of items for this operation. Only applicable when is_group = false.
  - `start_date` string, nullable: Start date for this operation/task in YYYY-MM-DD format. Separate from deadline which represents end date.
  - `operation_type_id` integer, nullable: FK to operation_types; drives required capabilities for scheduling.
  - `operation_equipment_type_id` integer, nullable: FK to equipment_types; selected equipment for operation_requirements lookup.
  - `additional_capability_ids` integer[], nullable: Extra capability IDs beyond catalog operation_requirements for this task.
  - `capabilitySource` string, nullable: Who chose additional_capability_ids: 'detected' (from the title, and so it follows later renames) or 'manual' (a person picked it, and it survives them). Server-set; omit it and a client pick is recorded as manual automatically.
  - `integrationDocuments` object[], nullable: Integration files: uploads [{storage_path, label?, storage_source?}] (storage_source material-quotes|drawings) or linked project files [{file_id, storage_path, bucket, label?, storage_source: files}]
  - `integrationLinks` object[], nullable: Integration hyperlinks [{url, label?}]
  - `integrationInstructionsHtml` string, nullable: Rich HTML instructions for integration steps

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

## Changes

- **2026-11-09** `d9ef00c0253a`: 1 info
  - added the new optional request property `ai_provenance`

[Operation history](https://skmtc.dev/jeevyfabrication/apis/bom-generation-api/changes/api/v1/projects/:project_id/tasks/post.md)

---

[API](https://skmtc.dev/jeevyfabrication/apis/bom-generation-api.md) - [All operations](https://skmtc.dev/jeevyfabrication/apis/bom-generation-api/llms.txt) - [OpenAPI document](https://skmtc.dev/jeevyfabrication/apis/bom-generation-api/revisions/ad9a01abeac9?raw)
