---
title: "PUT /instance/{InstanceId}/task/template"
method: PUT
path: "/instance/{InstanceId}/task/template"
---

# PUT /instance/{InstanceId}/task/template

`PUT /instance/{InstanceId}/task/template`

Creates a new task template in the specified Amazon Connect instance.

## Path parameters

- `InstanceId` string, required

## Request body

- object
  - `Name` string, required — The name of the task template.
  - `Description` string — The description of the task template.
  - `ContactFlowId` string — The identifier of the flow that runs by default when a task is created by referencing this template.
  - `Constraints` object — Describes constraints that apply to the template fields.
    - `RequiredFields` RequiredFieldInfo[] — Lists the fields that are required to be filled by agents.
      - `Id` object — The unique identifier for the field.
        - `Name` string — The name of the task template field.
    - `ReadOnlyFields` ReadOnlyFieldInfo[] — Lists the fields that are read-only to agents, and cannot be edited.
      - `Id` object — Identifier of the read-only field.
        - `Name` string — The name of the task template field.
    - `InvisibleFields` InvisibleFieldInfo[] — Lists the fields that are invisible to agents.
      - `Id` object — Identifier of the invisible field.
        - `Name` string — The name of the task template field.
  - `Defaults` object — Describes default values for fields on a template.
    - `DefaultFieldValues` TaskTemplateDefaultFieldValue[] — Default value for the field.
      - `Id` object — Identifier of a field.
        - `Name` string — The name of the task template field.
      - `DefaultValue` string — Default value for the field.
  - `Status` 'ACTIVE' | 'INACTIVE' — Marks a template as <code>ACTIVE</code> or <code>INACTIVE</code> for a task to refer to it. Tasks can only be created from <code>ACTIVE</code> templates. If a template is marked as <code>INACTIVE</code>, then a task that refers to this template cannot be created.
  - `Fields` TaskTemplateField[], required — Fields that are part of the template.
    - `Id` object, required — The unique identifier for the field.
      - `Name` string — The name of the task template field.
    - `Description` string — The description of the field.
    - `Type` 'NAME' | 'DESCRIPTION' | 'SCHEDULED_TIME' | 'QUICK_CONNECT' | 'URL' | 'NUMBER' | 'TEXT' | 'TEXT_AREA' | 'DATE_TIME' | 'BOOLEAN' | 'SINGLE_SELECT' | 'EMAIL' — Indicates the type of field.
    - `SingleSelectOptions` TaskTemplateSingleSelectOption[] — A list of options for a single select field.
  - `ClientToken` string — A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.

## Response `200`

Success

- CreateTaskTemplateResponse
  - `Id` string, required — The identifier of the task template resource.
  - `Arn` string, required — The Amazon Resource Name (ARN) for the task template resource.

## Other responses

- `480` — PropertyValidationException
- `481` — InvalidParameterException
- `482` — ResourceNotFoundException
- `483` — ThrottlingException
- `484` — ServiceQuotaExceededException
- `485` — InternalServiceException

---

[API](https://skmtc.net/aws/apis/connect.md) · [All operations](https://skmtc.net/aws/apis/connect/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/connect/versions/fbcf0a4faed2/schema)
