---
title: "Creates a new workflow"
method: POST
path: "/applications/{application}/workflows"
tags: ["workflows"]
---

# Creates a new workflow

`POST /applications/{application}/workflows`

Creates a new workflow version under the specified application.

## Request body

- CreateWorkflowType — Fully populated workflow information.
  - `name` string, required — The unique name of the entity
  - `applicationId` string, required — System wide unique identifier of the entity
  - `version` WorkflowVersionType, required — A version of a workflow. If type of the Workflow is SEGMENT_BASED, scheduledAt must be provided.
    - `name` string, required — The unique name of the entity
    - `applicationId` string — System wide unique identifier of the entity
    - `status` 'ACTIVE' | 'PUBLISHED' | 'DELETED' | 'DRAFT', required — The status of the entity. Not all values might be relevant for all entities.
    - `executionMode` 'ONCE' | 'REPEATABLE' | 'MOST_RECENT' — Defines how the lifecycle of existing workflow instances will be affected by new executions of the workflow
    - `workflowControlGroupSize` number — Percentage of the population that should belong to the workflow version control group.
    - `workflowControlGroupSeed` string — A seed for the workflow version control group. Control groups with the same seeds and test sizes will result in groups with the exact same users. To share the same control group populations across different vesions of a workflow, all versions must share the same seed value.
    - `testMode` boolean — Indicates that trigger expression will be triggered only for test users configured for the specified client. If it is not set, then it is set as false
    - `triggerExpression` string, required — A boolean expression using the event and user dictionary.
    - `scheduledAt` string, date-time — ISODateTimeType, ISO8601 date format with optional time part. For instance, 1970-01-18T09:19:41.204+0000
    - `steps` WorkflowStepType[], required — A map of all the workflow steps. It's structured as a map of the step name to the step definition.
      - `type` 'START' | 'TERMINAL' | 'ACTION' | 'CONDITION' | 'WAIT' | 'SENDGRID_EMAIL_ACTION' | 'MANDRILL_EMAIL_ACTION' | 'SNS_PUSH_ACTION' | 'AB_SPLIT' | 'SNS_SMS' | 'ADWORDS_REMARKETING_ACTION' | 'TAG' | 'UNTAG', required — Describes the type of a workflow step
      - `name` string, required — the name of the step. This is used to refer to the step within the workflow.
      - `description` string
      - `transitions` object — map from the transition name to the resulting workflow step.
        - `transitionName` string — the name of the step. This is used to refer to the step within the workflow.
  - `type` 'SEGMENT_BASED' | 'EVENT_BASED' — Describes the type of a workflow

## Response `201`

The workflow was created successfully

- WorkflowType — Fully populated workflow information.
  - `name` string, required — The unique name of the entity
  - `applicationId` string, required — System wide unique identifier of the entity
  - `version` WorkflowVersionType, required — A version of a workflow. If type of the Workflow is SEGMENT_BASED, scheduledAt must be provided.
    - `name` string, required — The unique name of the entity
    - `applicationId` string — System wide unique identifier of the entity
    - `status` 'ACTIVE' | 'PUBLISHED' | 'DELETED' | 'DRAFT', required — The status of the entity. Not all values might be relevant for all entities.
    - `executionMode` 'ONCE' | 'REPEATABLE' | 'MOST_RECENT' — Defines how the lifecycle of existing workflow instances will be affected by new executions of the workflow
    - `workflowControlGroupSize` number — Percentage of the population that should belong to the workflow version control group.
    - `workflowControlGroupSeed` string — A seed for the workflow version control group. Control groups with the same seeds and test sizes will result in groups with the exact same users. To share the same control group populations across different vesions of a workflow, all versions must share the same seed value.
    - `testMode` boolean — Indicates that trigger expression will be triggered only for test users configured for the specified client. If it is not set, then it is set as false
    - `triggerExpression` string, required — A boolean expression using the event and user dictionary.
    - `scheduledAt` string, date-time — ISODateTimeType, ISO8601 date format with optional time part. For instance, 1970-01-18T09:19:41.204+0000
    - `steps` WorkflowStepType[], required — A map of all the workflow steps. It's structured as a map of the step name to the step definition.
      - `type` 'START' | 'TERMINAL' | 'ACTION' | 'CONDITION' | 'WAIT' | 'SENDGRID_EMAIL_ACTION' | 'MANDRILL_EMAIL_ACTION' | 'SNS_PUSH_ACTION' | 'AB_SPLIT' | 'SNS_SMS' | 'ADWORDS_REMARKETING_ACTION' | 'TAG' | 'UNTAG', required — Describes the type of a workflow step
      - `name` string, required — the name of the step. This is used to refer to the step within the workflow.
      - `description` string
      - `transitions` object — map from the transition name to the resulting workflow step.
        - `transitionName` string — the name of the step. This is used to refer to the step within the workflow.
  - `type` 'SEGMENT_BASED' | 'EVENT_BASED' — Describes the type of a workflow
  - `id` string, required — System wide unique identifier of the entity

## Other responses

- `400` — Malformed request
- `409` — Conflict
- `default` — Unexpected error

---

[API](https://skmtc.net/gameanalytics/apis/datatiger-management-api.md) · [All operations](https://skmtc.net/gameanalytics/apis/datatiger-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gameanalytics/datatiger-management-api/versions/20a4f732a0b7/schema)
