---
title: "Create a new workflow in the selected workspace."
method: POST
path: "/connect/workflows"
tags: ["Connect Workflows"]
---

# Create a new workflow in the selected workspace.

`POST /connect/workflows`

## Parameters

- `#/paths/~1connect~1workflows/get/parameters/0` — unresolved $ref

## Request body

- object
  - `Content` object, required — SSM document for the workflow.
    - `assumeRole` string
    - `description` string, required
    - `mainSteps` object[], required
      - `action` string, required
      - `inputs` object, required
        - `Choices` object[]
          - `NextStep` string, required
          - `Variable` string, required
        - `Default` string
        - `Duration` string
        - `FunctionName` string
        - `Payload` string
      - `isEnd` boolean
      - `maxAttempts` integer
      - `name` string, required
      - `nextStep` string
      - `onFailure` string
      - `outputs` object[]
        - `Name` string, required
        - `Selector` string, required
        - `Type` string, required
      - `timeoutSeconds` integer
    - `parameters` object
      - `AutomationAssumeRole` object
        - `default` string
        - `description` string, required
        - `type` string, required
      - `WorkflowSession` object
        - `default` string
        - `description` string, required
        - `type` string, required
    - `schemaVersion` string, required
  - `Name` string, required — A unique name for the workflow.
  - `StepDocuments` object[] — List of step documents used in the SSM document.
    - `document_id` string — Document ID from step_store.
    - `version` string — Version of the document.
  - `Tags` string[] — List of tags for the workflow.

## Response `201`

Workflow created successfully

## Other responses

- `400` — Request validation error
- `409` — Duplicate workflow

---

[API](https://skmtc.net/spot/apis/spot-by-flexera-api.md) · [All operations](https://skmtc.net/spot/apis/spot-by-flexera-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/spot/spot-by-flexera-api/revisions/72813baf8d47/schema)
