> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.awork.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.awork.com/_mcp/server.

# Updates the task template for the task bundle.

PUT https://api.awork.com/api/v1/taskbundles/{taskBundleId}/tasktemplates/{taskTemplateId}
Content-Type: application/json

Updates the task template for the task bundle. The updated task template is stored in the bundle.The user must be an admin or have `task-manage-config:write` permissions.

Reference: https://developers.awork.com/apiv1/task-templates/put-task-bundle-task-template-by-task-bundle-id-and-task-template-id

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `taskBundleId` (string, required) — The id of the task bundle.
- `taskTemplateId` (string, required) — The id of the task template.

### Body (application/json)

This endpoint expects a TaskTemplateForm.

- `name` (string, optional, nullable) — The name of the task created from this template.
- `description` (string, optional, nullable) — The description of the task created from this template.
- `isPrio` (boolean, optional) — Whether the task created from this template will be marked as priority.
- `plannedDuration` (integer, optional) — The expected planned workload of the task created from this template, in seconds.
- `relativeStartOn` (long, optional, nullable) — The relative start date and time of the task created from this template, in seconds, from the moment of creating the task.
- `relativeDueOn` (long, optional, nullable) — The relative due date and time of the task created from this template, in seconds, from the moment of creating the task.
- `typeOfWorkId` (string, optional) — The id of the type of work of this task.
- `assignedRoleId` (string, optional, nullable) — The id of the assigned role of this task.
- `parentId` (string, optional, nullable) — The id of the parent task template if the task template is a subtask.
- `subtaskOrder` (double, optional, nullable) — The order of the subtask template relative to its parent task template.
- `laneOrder` (integer, optional, nullable) — The lane order defines the vertical position in the planner.

## Response

### 200

OK

- `name` (string, optional, nullable) — The name of the task created from this template.
- `description` (string, optional, nullable) — The description of the task created from this template.
- `isPrio` (boolean, optional) — Whether the task created from this template will be marked as priority.
- `plannedDuration` (integer, optional) — The expected planned workload of the task created from this template, in seconds.
- `relativeStartOn` (long, optional, nullable) — The relative start date and time of the task created from this template, in seconds, from the moment of creating the task.
- `relativeDueOn` (long, optional, nullable) — The relative due date and time of the task created from this template, in seconds, from the moment of creating the task.
- `typeOfWorkId` (string, optional) — The id of the type of work of this task.
- `assignedRoleId` (string, optional, nullable) — The id of the assigned role of this task.
- `parentId` (string, optional, nullable) — The id of the parent task template if the task template is a subtask.
- `subtaskOrder` (double, optional, nullable) — The order of the subtask template relative to its parent task template.
- `laneOrder` (integer, optional, nullable) — The lane order defines the vertical position in the planner.
- `id` (string, optional) — The Id of the task template.
- `taskType` (TypeOfWork, optional) — The task type model.
- `taskListTemplate` (list of TaskListTemplate, optional, nullable) — The task list templates of the task template.
- `taskDependencyTemplates` (list of TaskDependencyTemplate, optional, nullable) — The list of task dependency templates for that task template.
- `assigneeIds` (list of string, optional, nullable) — The list of assigned users to that task template.
- `createdOn` (string, optional) — The date this task was created.
- `createdBy` (string, optional) — The id of the user who created this task.
- `updatedOn` (string, optional) — The date this task was last modified.
- `updatedBy` (string, optional) — The id of the user who last modified this task.
- `order` (double, optional, nullable) — For internal purposes.
- `hasAttachments` (boolean, optional) — If the task template has attachments.
- `isRecurring` (boolean, optional) — If the task is a recurrency template, the flag is true.
- `customFields` (list of CustomField, optional, nullable) — The Custom fields of the task template.
- `tags` (list of TaskTemplateTagModel, optional, nullable) — The list of tags that will be applied to the task when it is created.

## Errors

### 404 Not Found Error

Not Found

- `code` (string, required) — The error code.
- `description` (string, required) — The description of the error.
- `link` (string, required) — The link to the API documentation page.
- `details` (list of string, optional, nullable) — A list of details describing the error.
- `validationErrors` (list of ValidationErrorResponse, optional, nullable) — If a validation error occurred, this contains the validation errors for each property.
- `traceId` (string, optional, nullable) — The request trace id for tracking the request.

## Types

### TypeOfWork

The task type model.

- `id` (string, optional) — The id of the task type.
- `name` (string, optional, nullable) — The name of the task type.
- `description` (string, optional, nullable) — A short (max. 140 characters) description of the task type.
- `icon` (string, optional, nullable) — The icon associated with this task type.
- `isArchived` (boolean, optional) — Whether the type of work has been archived.
- `createdOn` (string, optional) — The date this entity was created.
- `createdBy` (string, optional) — The id of the user who created this entity.
- `updatedOn` (string, optional) — The date this entity was last modified.
- `updatedBy` (string, optional) — The id of the user who last modified this entity.

### TaskListTemplate

- `id` (string, optional) — The id of the task list template.
- `name` (string, optional, nullable) — The name of the task list template.
- `orderOfTask` (double, optional) — The order of the task template in the task list template.
- `order` (double, optional) — The order of the task list template, unique within the task bundle.
- `isHiddenForConnectUsers` (boolean, optional) — True if the task in this list is not visible for external workspace users.

### TaskDependencyTemplate

- `id` (string, optional) — The id of the entity.
- `createdOn` (string, optional) — The date this entity was created.
- `createdBy` (string, optional) — The id of the user who created this entity.
- `updatedOn` (string, optional) — The date this entity was last modified.
- `updatedBy` (string, optional) — The id of the user who last modified this entity.
- `predecessorTemplateId` (string, optional) — The id of the predecessor task template.
- `successorTemplateId` (string, optional) — The id of the successor task template.

### CustomField

Represents the custom field value.

- `customFieldDefinitionId` (string, optional) — The custom field definition id.
- `userIdValue` (string, optional, nullable) — The the user id value.
- `clientIdValue` (string, optional, nullable) — The client id value.
- `numberValue` (double, optional, nullable) — The number value.
- `selectionOptionIdValue` (string, optional, nullable) — The selection option id value.
- `selectionOption` (CustomFieldSelectionOption, optional)
- `textValue` (string, optional, nullable) — The text value.
- `dateValue` (string, optional, nullable) — The date value.
- `booleanValue` (boolean, optional, nullable) — The boolean value.

### TaskTemplateTagModel

A tag model used for the task template. Do not delete, we need to create copies of the tag model for each entity to avoid issues with Automapper.

- `id` (string, optional)
- `name` (string, optional, nullable) — The name of the tag.
- `color` (string, optional, nullable) — The color of the tag.

### ValidationErrorResponse

The validation error response.

- `property` (string, optional, nullable) — The name of the property that failed validation.
- `message` (string, optional, nullable) — The reason why this property failed validation.

### CustomFieldSelectionOption

- `value` (string, required) — The selection value which can be later used in a select custom field.
- `id` (string, optional) — The id of the custom field selection option.
- `color` (enum, optional, nullable) — The color of the selection option.
  - Allowed values: `red`, `orange`, `yellow`, `green`, `cyan`, `blue`, `indigo`, `purple`, `steel`
- `order` (double, optional) — The order of the custom field selection option.

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "name": "Wireframe layout",
  "description": "Create the wireframe layout ready to be discussed with the stakeholders",
  "isPrio": false,
  "plannedDuration": 1400,
  "relativeStartOn": 1,
  "relativeDueOn": 1,
  "typeOfWorkId": "123e4567-e89b-12d3-a456-426614174000",
  "assignedRoleId": "123e4567-e89b-12d3-a456-426614174000",
  "parentId": "123e4567-e89b-12d3-a456-426614174000",
  "subtaskOrder": 1,
  "laneOrder": 2,
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "taskType": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "Sales Work",
    "description": "Tasks related to sales dept.",
    "icon": "attach_money",
    "isArchived": true,
    "createdOn": "2022-03-10T16:25:09.100Z",
    "createdBy": "123e4567-e89b-12d3-a456-426614174000",
    "updatedOn": "2022-03-10T18:55:00.500Z",
    "updatedBy": "123e4567-e89b-12d3-a456-426614174000"
  },
  "taskListTemplate": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "Concept Desing",
      "orderOfTask": 2,
      "order": 1,
      "isHiddenForConnectUsers": true
    }
  ],
  "taskDependencyTemplates": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "createdOn": "2022-03-11T15:33:47.100Z",
      "createdBy": "123e4567-e89b-12d3-a456-426614174000",
      "updatedOn": "2022-03-11T21:15:00.100Z",
      "updatedBy": "123e4567-e89b-12d3-a456-426614174000",
      "predecessorTemplateId": "f76a7b32-f279-ec11-94f6-dc984040d6c9",
      "successorTemplateId": "fc8e5a55-e96f-ec11-94f6-dc984040d6c7"
    }
  ],
  "assigneeIds": [
    "string"
  ],
  "createdOn": "2022-03-14T10:12:02.100Z",
  "createdBy": "123e4567-e89b-12d3-a456-426614174000",
  "updatedOn": "2022-03-25T14:55:30.100Z",
  "updatedBy": "123e4567-e89b-12d3-a456-426614174000",
  "order": 4,
  "hasAttachments": true,
  "isRecurring": false,
  "customFields": [
    {
      "customFieldDefinitionId": "123e4567-e89b-12d3-a456-426614174000",
      "userIdValue": "123e4567-e89b-12d3-a456-426614174000",
      "clientIdValue": "123e4567-e89b-12d3-a456-426614174000",
      "numberValue": 123.45,
      "selectionOptionIdValue": "123e4567-e89b-12d3-a456-426614174000",
      "selectionOption": {
        "value": "Website Design",
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "color": "purple",
        "order": 0
      },
      "textValue": "S1: Business Critical",
      "dateValue": "2024-01-15T09:30:00Z",
      "booleanValue": true
    }
  ],
  "tags": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "Design",
      "color": "purple"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.awork.com/api/v1/taskbundles/taskBundleId/tasktemplates/taskTemplateId"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.awork.com/api/v1/taskbundles/taskBundleId/tasktemplates/taskTemplateId';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.awork.com/api/v1/taskbundles/taskBundleId/tasktemplates/taskTemplateId"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.awork.com/api/v1/taskbundles/taskBundleId/tasktemplates/taskTemplateId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.awork.com/api/v1/taskbundles/taskBundleId/tasktemplates/taskTemplateId")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.awork.com/api/v1/taskbundles/taskBundleId/tasktemplates/taskTemplateId', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.awork.com/api/v1/taskbundles/taskBundleId/tasktemplates/taskTemplateId");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.awork.com/api/v1/taskbundles/taskBundleId/tasktemplates/taskTemplateId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```