v5

latestOpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2026-02-283466592.5 MB
Workflow templates

Create workflow template

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.

post/api/v2/templates

Request body

keystring required
namestring
descriptionstring
workflowIdstring
projectKeystring
environmentKeystring
flagKeystring

Example request

{
  "stages": [
    {
      "name": "10% rollout on day 1",
      "executeConditionsInSequence": true,
      "conditions": [
        {
          "kind": "schedule",
          "scheduleKind": "relative",
          "waitDuration": 2,
          "waitDurationUnit": "calendarDay"
        }
      ],
      "action": {
        "instructions": "{\"instructions\": [{ \"kind\": \"turnFlagOn\"}]}"
      }
    }
  ]
}

Response

Workflow template response JSON

_idstring required
_keystring required
namestring
_creationDateinteger required
_ownerIdstring required
_maintainerIdstring required
_linksobject required
descriptionstring

Example response

{
  "stages": [
    {
      "_id": "12ab3c45de678910abc12345",
      "name": "10% rollout on day 1",
      "conditions": [
        {
          "_execution": {
            "status": "completed"
          },
          "id": "12ab3c45de678910abc12345",
          "kind": "schedule",
          "scheduleKind": "relative",
          "waitDuration": 2,
          "waitDurationUnit": "calendarDay"
        }
      ],
      "action": {
        "kind": "patch"
      },
      "_execution": {
        "status": "completed"
      }
    }
  ]
}