---
title: "Create workflow template"
method: POST
path: "/api/v2/templates"
tags: ["Workflow templates"]
---

# Create workflow template

`POST /api/v2/templates`

> ### Workflows are in maintenance mode
>
> The workflows feature is in maintenance mode, and is planned for future deprecation at a date not yet specified. We will work with existing customers using workflows to migrate to a replacement solution when deprecation occurs.

Create a template for a feature flag workflow.

## Request body

- CreateWorkflowTemplateInput
  - `key` string, required
  - `name` string
  - `description` string
  - `workflowId` string
  - `stages` StageInput[]
    - `name` string — The stage name
    - `executeConditionsInSequence` boolean — Whether to execute the conditions in sequence for the given stage
    - `conditions` ConditionInput[] — An array of conditions for the stage
      - `scheduleKind` string
      - `executionDate` integer
      - `waitDuration` integer — For workflow stages whose scheduled execution is relative, how far in the future the stage should start.
      - `waitDurationUnit` string
      - `executeNow` boolean — Whether the workflow stage should be executed immediately
      - `description` string — A description of the approval required for this stage
      - `notifyMemberIds` string[] — A list of member IDs for the members to request approval from for this stage
      - `notifyTeamKeys` string[] — A list of team keys for the teams to request approval from for this stage
      - `integrationConfig` FormVariableConfig
      - `kind` string
    - `action` ActionInput
      - `instructions` string — An array of instructions for the stage. Each object in the array uses the semantic patch format for updating a feature flag.
  - `projectKey` string
  - `environmentKey` string
  - `flagKey` string

## Response `201`

Workflow template response JSON

- WorkflowTemplateOutput
  - `_id` string, required
  - `_key` string, required
  - `name` string
  - `_creationDate` integer, required
  - `_ownerId` string, required
  - `_maintainerId` string, required
  - `_links` object, required
  - `description` string
  - `stages` StageOutput[]
    - `_id` string, required — The ID of this stage
    - `name` string — The stage name
    - `conditions` ConditionOutput[], required — An array of conditions for the stage
      - `_id` string, required
      - `kind` string
      - `_execution` ExecutionOutput, required
        - `status` string, required — The status of the execution of this workflow stage
        - `stopDate` integer
      - `scheduleKind` string
      - `executionDate` integer
      - `waitDuration` integer
      - `waitDurationUnit` string
      - `description` string, required
      - `notifyMemberIds` string[], required
      - `allReviews` ReviewOutput[], required
        - `_id` string, required
        - `kind` string, required
        - `creationDate` integer
        - `comment` string
        - `memberId` string
        - `serviceTokenId` string
      - `reviewStatus` string, required
      - `appliedDate` integer
      - `creationConfig` FormVariableConfig
    - `action` ActionOutput, required
      - `kind` string, required — The type of action for this stage
      - `instructions` Instruction[], required
    - `_execution` ExecutionOutput, required
      - `status` string, required — The status of the execution of this workflow stage
      - `stopDate` integer

## Other responses

- `400` — Invalid request
- `401` — Invalid access token
- `403` — Forbidden
- `429` — Rate limited

## Changes

- **2026-02-28** `69c5c9aafe78` — 2 info
  - added the new optional request property `stages/items/conditions/items/integrationConfig`
  - added the optional property `stages/items/conditions/items/creationConfig` to the response with the `201` status

[Change history](https://skmtc.dev/launchdarkly/apis/launchdarkly-rest-api/changes/api/v2/templates/post.md)

---

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