---
title: "Create Entity Template"
method: POST
path: "/api/v4/{workspace-slug}/entity-templates"
---

# Create Entity Template

`POST /api/v4/{workspace-slug}/entity-templates`

## Request

- Base URL: `https://api.app.shortcut.com`
- URL: `https://api.app.shortcut.com/api/v4/{workspace-slug}/entity-templates`
- Auth: HTTP bearer

Create Entity Template creates a new Entity Template in your Shortcut Workspace.

## Path parameters

- `workspace-slug` string, required

## Query parameters

- `fields` string

## Request body

- Body1605171
  - `name` string, required: The name of the new entity template.
  - `story_contents` CreateEntityTemplateStoryContentsParams, required: A map of story attributes this template populates.
    - `custom_fields` CreateCustomFieldValueParams[]: An array of maps specifying a CustomField ID and CustomFieldEnumValue ID that represents an assertion of some value for a CustomField.
      - `field_id` string, uuid, required: The unique public ID for the Custom Field value.
      - `value_id` string, uuid, required: The unique public ID for the CustomFieldEnumValue.
    - `deadline` string, date-time, nullable: The due date of the story.
    - `description` string: The description of the story.
    - `epic_id` integer, nullable: The ID of the epic to be populated.
    - `estimate` integer, nullable: The numeric point estimate to be populated.
    - `external_links` string[]: An array of external links to be populated.
    - `file_ids` integer[]: An array of the attached file IDs to be populated.
    - `follower_ids` string[]: An array of UUIDs for any Members you want to add as Followers.
    - `group_id` string, uuid, nullable: The ID of the group to be populated.
    - `iteration_id` integer, nullable: The ID of the iteration to be populated.
    - `label_ids` integer[]: An array of IDs for Labels to be populated by the template.
    - `linked_file_ids` integer[]: An array of the linked file IDs to be populated.
    - `name` string: The name of the story.
    - `owner_ids` string[]: An array of UUIDs for any Members you want to add as Owners.
    - `story_type` 'chore' | 'bug' | 'feature': The type of story (feature, bug, chore).
    - `sub_tasks` CreateEntityTemplateSubTaskParams[]: An array of sub-tasks to be populated by the template.
      - `name` string, required: The name of the Sub-Task.
      - `owner_ids` string[]: An array of UUIDs of the owners of this Sub-Task.
      - `workflow_state_id` integer: The ID of the workflow state the Sub-Task is in.
    - `tasks` CreateEntityTemplateTaskParams[]: An array of tasks to be populated by the template.
      - `description` string, required: The Task description.
      - `complete` boolean: True/false boolean indicating whether the Task is completed. Defaults to false.
      - `owner_ids` string[]: An array of UUIDs for any members you want to add as Owners on this new Task.
    - `workflow_state_id` integer, nullable: The ID of the workflow state to be populated.
  - `author_id` string, uuid: The ID of the member creating this template.

## Response `201`

Resource

- EntityTemplateEntityWrapper
  - `$schema` string, required: The URI for the json-schema for this response.
  - `entity` EntityTemplate, required: The entity for this response.
    - `author` MemberSlim: The Member who created the Doc.
      - `entity_type` 'member:slim', required: The type of this entity.
      - `id` string, uuid, required: The unique ID of the Member.
      - `name` string, required: The name of the Member.
      - `uri` string, required: A resolvable URI for the entity that will return the full representation.
    - `created_at` string, date-time: The time/date when the entity template was created.
    - `entity_type` string: A string description of this resource.
    - `id` string, uuid: The unique identifier for the entity template.
    - `last_used_at` string, date-time: The last time that someone created an entity using this template.
    - `name` string: The template's name.
    - `story_contents` EntityTemplateStoryContents: A container entity for the attributes this template should populate.
      - `custom_fields` CreateCustomFieldValueParams[]: An array of maps specifying a CustomField ID and CustomFieldEnumValue ID that represents an assertion of some value for a CustomField.
        - `field_id` string, uuid, required: The unique public ID for the Custom Field value.
        - `value_id` string, uuid, required: The unique public ID for the CustomFieldEnumValue.
      - `deadline` string, date-time: The due date of the story.
      - `description` string, nullable: The description of the story.
      - `entity_type` string: A string description of this resource.
      - `epic` EpicSlim: The Epic the story belongs to.
        - `app_url` string, required: The Shortcut application url for the Epic.
        - `entity_type` 'epic:slim', required: The type of this entity.
        - `id` integer, required: The unique ID of the Epic.
        - `name` string, required: The name of the Epic.
        - `uri` string, required: A resolvable URI for the entity that will return the full representation.
      - `estimate` integer: The numeric point estimate of the story.
      - `external_links` string[]: An array of external links connected to the story.
      - `files` FileSlim[]: An array of files attached to the story.
        - `entity_type` 'file:slim', required: The type of this entity.
        - `id` integer, required: The unique ID for the file.
        - `name` string, required: The name of the file.
        - `uri` string, required: A resolvable URI for the entity that will return the full representation.
      - `followers` MemberSlim[]: An array of Members listed as Followers.
        - `entity_type` 'member:slim', required: The type of this entity.
        - `id` string, uuid, required: The unique ID of the Member.
        - `name` string, required: The name of the Member.
        - `uri` string, required: A resolvable URI for the entity that will return the full representation.
      - `iteration` IterationSlim: The Iteration the story belongs to.
        - `app_url` string, required: The Shortcut application url for the Iteration.
        - `entity_type` 'iteration:slim', required: The type of this entity.
        - `id` integer, required: The unique ID of the Iteration.
        - `name` string, required: The name of the Iteration.
        - `uri` string, required: A resolvable URI for the entity that will return the full representation.
      - `labels` LabelSlim[]: An array of labels attached to the story.
        - `app_url` string, required: The Shortcut application url for the Label.
        - `entity_type` 'label:slim', required: The type of this entity.
        - `id` integer, required: The unique ID of the Label.
        - `name` string, required: The name of the Label.
        - `uri` string, required: A resolvable URI for the entity that will return the full representation.
      - `linked_files` LinkedFileSlim[]: An array of linked files attached to the story.
        - `entity_type` 'linked-file:slim', required: The type of this entity.
        - `id` integer, required: The unique ID of the Linked File.
        - `name` string, required: The name of the Linked File.
        - `uri` string, required: A resolvable URI for the entity that will return the full representation.
      - `name` string: The name of the story.
      - `owners` MemberSlim[]: An array of Members who own the story.
        - `entity_type` 'member:slim', required: The type of this entity.
        - `id` string, uuid, required: The unique ID of the Member.
        - `name` string, required: The name of the Member.
        - `uri` string, required: A resolvable URI for the entity that will return the full representation.
      - `project` ProjectSlim: The Project the story belongs to.
        - `app_url` string, required: The Shortcut application url for the Project.
        - `entity_type` 'project:slim', required: The type of this entity.
        - `id` integer, required: The unique ID of the Project.
        - `name` string, required: The name of the Project.
        - `uri` string, required: A resolvable URI for the entity that will return the full representation.
      - `story_type` string: The type of story (feature, bug, chore).
      - `sub_tasks` EntityTemplateSubTask[]: An array of sub-tasks connected to the story.
        - `name` string: The name of the Sub-Task.
        - `owners` MemberSlim[]: An array of Members who own this Sub-Task.
          - `entity_type` 'member:slim', required: The type of this entity.
          - `id` string, uuid, required: The unique ID of the Member.
          - `name` string, required: The name of the Member.
          - `uri` string, required: A resolvable URI for the entity that will return the full representation.
        - `position` integer: The position of the Sub-Task within the list.
        - `workflow_state` WorkflowStateSlim: The default Workflow State of the Workspace's default Workflow.
          - `entity_type` 'workflow-state:slim', required: The type of this entity.
          - `id` integer, required: The unique ID of the Workflow State.
          - `name` string, required: The name of the Workflow State.
          - `uri` string, required: A resolvable URI for the entity that will return the full representation.
          - `workflow_name` string, required: The name of the Workflow this state belongs to.
      - `tasks` EntityTemplateTask[]: An array of tasks connected to the story.
        - `complete` boolean: True/false boolean indicating whether the Task has been completed.
        - `description` string: Full text of the Task.
        - `owners` MemberSlim[]: An array of Members who own this Task.
          - `entity_type` 'member:slim', required: The type of this entity.
          - `id` string, uuid, required: The unique ID of the Member.
          - `name` string, required: The name of the Member.
          - `uri` string, required: A resolvable URI for the entity that will return the full representation.
        - `position` integer: The number corresponding to the Task's position within a list of Tasks on a Story.
      - `team` TeamSlim
        - `app_url` string, required: The Shortcut application url for the Team.
        - `entity_type` 'team:slim', required: The type of this entity.
        - `id` string, uuid, required: The unique ID of the Team.
        - `name` string, required: The name of the Team.
        - `uri` string, required: A resolvable URI for the entity that will return the full representation.
      - `workflow_state` WorkflowStateSlim: The default Workflow State of the Workspace's default Workflow.
        - `entity_type` 'workflow-state:slim', required: The type of this entity.
        - `id` integer, required: The unique ID of the Workflow State.
        - `name` string, required: The name of the Workflow State.
        - `uri` string, required: A resolvable URI for the entity that will return the full representation.
        - `workflow_name` string, required: The name of the Workflow this state belongs to.
    - `updated_at` string, date-time: The time/date when the entity template was last updated.
    - `uri` string: A resolvable URI for the entity that will return the full representation.

## Other responses

- `400`: Schema mismatch
- `404`: Resource does not exist
- `422`: Unprocessable

---

[API](https://skmtc.dev/shortcut-com/apis/shortcut-api.md) - [All operations](https://skmtc.dev/shortcut-com/apis/shortcut-api/llms.txt) - [OpenAPI document](https://skmtc.dev/shortcut-com/apis/shortcut-api/revisions/bf2d8439832f?raw)
