---
title: "Update a Task."
method: PUT
path: "/api/Task"
tags: ["Task"]
---

# Update a Task.

`PUT /api/Task`

Requires TaskID and a list of field names to update. The FieldsToUpdate field accepts a string array containing field names that should be updated.

## Request body

- UpdateTask — Request model for updating an existing task. Only fields in FieldsToUpdate are modified.
  - `TaskID` integer, required — Unique identifier for the task.
  - `FieldsToUpdate` string[], required — Array of field names to update. Only listed fields will be modified.
  - `SectionIDFK` integer — The section (task group) this task belongs to.
  - `ParentTaskIDFK` integer — Re-parent this task. Set to a valid TaskID (same project) to make it a subtask; set to null (or 0) to promote it back to a root-level task. Applied only when "ParentTaskIDFK" is included in FieldsToUpdate. When set, the task inherits the parent's section, and SubtaskCount/SubtaskProgress/DisplayOrder are recalculated server-side.
  - `Title` string — Task title/name.
  - `Description` string — Task description (may contain HTML).
  - `AssignedToUserIDFK` integer[] — List of user IDs to assign to this task.
  - `DateStart` string, date-time — Task start date.
  - `DateDue` string, date-time — Task due date.
  - `TaskPriorityCode` string — Task priority. Values: None, Low, Medium, High, Urgent.
  - `EstimatedEffort` number, double — Decimal hours
  - `TaskStatusCode` string — Current task status code.
  - `PercentComplete` integer — Task completion percentage (0-100).
  - `Tags` NewTag[] — List of tags to apply to this task.
    - `Name` string — Tag name.
    - `Color` string — Hex color code in format #000000
  - `FileAttachmentIDsToAdd` integer[] — FileAttachmentIDs (returned from prior /api/FileAttachment uploads) to newly link to this task. Each ID must have been created by the current user and not yet linked to any entity.
  - `SendWebhooks` boolean — If true, fires the matching webhook event (e.g. task_updated) to any subscribed endpoints. Defaults to false to preserve existing integration behaviour.

## Response `200`

Returns the updated task details.

- TaskDetails — Full task details including project context, section, assignees, dates, status, priority, tags, estimated/actual effort, and web link.
  - `TaskID` integer — Unique identifier for the task.
  - `ProjectIDFK` integer — The project this task belongs to.
  - `ProjectTitle` string — Title of the parent project.
  - `ProjectCode` string — Short code of the parent project.
  - `SectionTitle` string — Title of the section this task is in.
  - `SectionIDFK` integer — The section (task group) this task belongs to.
  - `Title` string — Task title/name.
  - `Description` string — Task description (may contain HTML).
  - `DescriptionNoHTML` string — Task description with HTML tags stripped.
  - `AssignedToUsers` AssignedToUser[] — List of users assigned to this task.
    - `AssignedToUserIDFK` integer — User ID of the assigned user.
    - `AssignedToEmail` string — Email of the assigned user.
    - `AssignedToFirstname` string — First name of the assigned user.
    - `AssignedToLastname` string — Last name of the assigned user.
  - `DateStart` string, date-time — Task start date.
  - `DateDue` string, date-time — Task due date.
  - `DateCompleted` string, date-time — Date the task was marked as completed.
  - `EstimatedEffort` number, double — Estimated effort in decimal hours.
  - `ActualTime` number, double — Actual time logged against this task in decimal hours.
  - `Tags` TagItem[] — List of tags applied to this task.
    - `TagID` integer — Unique identifier for the tag.
    - `Name` string — Tag name.
    - `Color` string — Hex color code for the tag (e.g. '#FF5733').
  - `AccountTaskTypeIDFK` integer — The task type (workflow) ID for this task.
  - `TaskStatusCode` string — Current task status code.
  - `TaskStatusName` string — Display name of the current task status.
  - `isCompleteStatus` boolean — Whether the current status represents a completed state.
  - `PercentComplete` number, double — Task completion percentage (0-100).
  - `TaskPriorityCode` string — Task priority. Values: None, Low, Medium, High, Urgent.
  - `TaskPriorityName` string — Display name of the task priority.
  - `ViewTaskURL` string — URL to view this task in the Avaza web application.
  - `DateCreated` string, date-time — Date and time the task was created.
  - `DateUpdated` string, date-time — Date and time the task was last updated.
  - `ParentTaskIDFK` integer — Parent task ID if this is a subtask. NULL for root-level tasks.
  - `ParentTaskTitle` string — Title of the parent task (denormalized for display). NULL for root-level tasks.
  - `SubtaskCount` integer — Number of immediate subtasks under this task.
  - `SubtaskProgress` integer — Percentage of subtasks in a complete status (0-100).
  - `FileAttachments` TaskFileAttachmentItem[] — File attachments currently linked to this task.
    - `FileAttachmentIDFK` integer — Foreign key to the FileAttachment record.
    - `AttachmentURL` string — Public URL to download the file.
    - `AttachmentPreviewURL` string — URL for in-browser preview of the file. Empty for non-previewable file types.

---

[API](https://skmtc.net/avaza/apis/avaza-api-documentation.md) · [All operations](https://skmtc.net/avaza/apis/avaza-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/avaza/avaza-api-documentation/versions/1eeadf750514/schema)
