Workflow templates

Workflow templates is an Enterprise feature

Workflow templates are available to customers on an Enterprise plan. To learn more, read about our pricing. To upgrade your plan, contact Sales.

Workflow templates allow you to define a set of workflow stages that you can use as a starting point for new workflows. You can create these workflows for any flag in any environment and any project, and you can create as many workflows as you like from a given template.

You can create workflow templates in two ways:

  • by specifying the desired stages, using the stages property of the request body
  • by specifying an existing workflow to save as a template, using the workflowId property of the request body

You can use templates to create a workflow in any project, environment, or flag. However, when you create a template, you must specify a particular project, environment, and flag. This means that when you create a template using the stages property, you must also include projectKey, environmentKey, and flagKey properties in the request body. When you create a template from an existing workflow, it will use the project, environment, and flag of the existing workflow, so those properties can be omitted from the request body.

To learn more, read Workflows documentation and Workflows API documentation.

Get workflow templates

Get workflow templates belonging to an account, or can optionally return templates_endpoints.workflowTemplateSummariesListingOutputRep when summary query param is true

Request
query Parameters
summary
boolean

Whether the entire template object or just a summary should be returned

search
string <string>

The substring in either the name or description of a template

Responses
200

Workflow templates list response JSON

401

Invalid access token

404

Invalid resource identifier

429

Rate limited

get/api/v2/templates
Request samples
Response samples
application/json
{
  • "items": [
    ]
}

Create workflow template

Create a template for a feature flag workflow

Request
Request Body schema: application/json
required
key
required
string
name
string
description
string
workflowId
string (FeatureWorkflowId)
Array of objects (StageInput)
projectKey
string
environmentKey
string
flagKey
string
Responses
201

Workflow template response JSON

400

Invalid request

401

Invalid access token

403

Forbidden

429

Rate limited

post/api/v2/templates
Request samples
application/json
{
  • "key": "string",
  • "name": "string",
  • "description": "string",
  • "workflowId": "string",
  • "stages": [
    ],
  • "projectKey": "string",
  • "environmentKey": "string",
  • "flagKey": "string"
}
Response samples
application/json
{
  • "_id": "string",
  • "_key": "string",
  • "name": "string",
  • "_creationDate": 0,
  • "_ownerId": "string",
  • "_maintainerId": "string",
  • "_links": {
    },
  • "description": "string",
  • "stages": [
    ]
}

Delete workflow template

Delete a workflow template

Request
path Parameters
templateKey
required
string <string>

The template key

Responses
204

Action completed successfully

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

delete/api/v2/templates/{templateKey}
Request samples
Response samples
application/json
{
  • "code": "invalid_request",
  • "message": "Invalid request body"
}