---
title: "Create a workflow (draft)"
method: POST
path: "/workflows"
tags: ["workflows"]
---

# Create a workflow (draft)

`POST /workflows`

## Request

- Base URL: `https://api.mailly.site` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mailly.site/workflows`
- Auth: HTTP bearer

## Request body

- object
  - `workflowKey` string
  - `name` string
  - `definition` unknown

## Response `201`

Created

- object
  - `success` boolean, required
  - `workflow` object, required

## Other responses

- `400`: Invalid parameters
- `401`: Missing or invalid API key
- `409`: workflowKey already exists

---

[API](https://skmtc.dev/mailly/apis/mailly-api.md) · [All operations](https://skmtc.dev/mailly/apis/mailly-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mailly/apis/mailly-api/revisions/1ceb29637301?raw)
