---
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.
  - `CustomFields` CustomFieldValueInput[] — Custom field values to set. Only applied when "CustomFields" is included in FieldsToUpdate. Identify each item by CustomFieldDefinitionID (preferred) or Name (case-insensitive). Multi-select items REPLACE the field's whole selection; "Value": null clears a field. Fields not referenced keep their current values. Custom field definitions/options cannot be created or modified via the API.
    - `CustomFieldDefinitionID` integer — The custom field definition ID to set (preferred identifier; see GET /api/CustomFieldDefinition).
    - `Name` string — The custom field name (case-insensitive) — an alternative to CustomFieldDefinitionID.
    - `Value` object — The value to set. Accepted formats by data type: text = string; Number/Percentage/Currency = JSON number or numeric string; Duration = number (decimal hours) or "h:mm" string; Date = "yyyy-MM-dd" string; Checkbox = boolean; Dropdown (single) = option name string or option id number; User (single) = UserID number or email string; Location = "lat,lng" string. Pass null (with no Values) to clear the field.
    - `Values` object[] — Multi-select fields only (Dropdown/User with isMultiSelect): the complete new selection as an array of option names/ids or user ids/emails. REPLACES the existing selection. An empty array clears the field.

## 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.
  - `CustomFields` CustomFieldValueItem[] — Custom field values set on this task, in display order. Fields with no value are not included. Omitted entirely when the account's Custom Fields feature is disabled (external contact tokens only see fields with "Everyone" visibility). See GET /api/CustomFieldDefinition for the account's field definitions.
    - `CustomFieldDefinitionID` integer — Unique identifier of the custom field definition this value belongs to.
    - `Name` string — Display name of the custom field.
    - `DataTypeCode` string — Data type of the field. Values: ShortText, LongText, Number, Percentage, Currency, Duration, Date, Checkbox, Dropdown, User, Location.
    - `isMultiSelect` boolean — Whether the field allows multiple selections (Dropdown and User types only).
    - `Value` object — The typed raw value: string for text, number for numeric types (Duration is decimal hours), boolean for Checkbox, "yyyy-MM-dd" string for Date, option name(s) for Dropdown, user name(s) for User (array of strings when multi-select), "lat, lng" string for Location.
    - `DisplayValue` string — Formatted display text for the value (numbers formatted per the definition, Duration as h:mm, Checkbox as Yes/No, multi-select values comma-separated).
    - `OptionIDs` integer[] — Selected option IDs. Dropdown fields only.
    - `UserIDs` integer[] — Selected user IDs. User fields only.
    - `Latitude` number, double — Latitude. Location fields only.
    - `Longitude` number, double — Longitude. Location fields only.
    - `UnitLabel` string — Unit suffix configured on the definition (Number fields only, when set).

---

[API](https://skmtc.dev/avaza/apis/avaza-api-documentation.md) · [All operations](https://skmtc.dev/avaza/apis/avaza-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/avaza/avaza-api-documentation/revisions/e99843f3c878/schema)
