---
title: "Create a new Hive automation as a DRAFT, either empty or from a document you already have. It sends nothing: going live is a separate step a person approves in Hive."
method: POST
path: "/api/v1/tools/create_flow"
---

# Create a new Hive automation as a DRAFT, either empty or from a document you already have. It sends nothing: going live is a separate step a person approves in Hive.

`POST /api/v1/tools/create_flow`

## Request

- Base URL: `https://hivepublish.com`
- URL: `https://hivepublish.com/api/v1/tools/create_flow`
- Auth: HTTP bearer

## Headers

- `Idempotency-Key` string, required

## Request body

- object
  - `name` string, required: What to call this automation.
  - `accountId` string, required: The connected Hive account it runs on.
  - `description` string: An optional note about what it is for.
  - `triggerEvent` 'comment' | 'keyword' | 'inbound_message' | 'story_reply' | 'story_mention' | 'post_share' | 'dm_post_share' | 'live_comment' | 'referral_link': What starts it. Hive also adds one empty message step for you to write, because an automation that starts and does nothing cannot be saved as finished.
  - `document` object: A whole automation document to start from, instead of an empty one.

## Response `200`

Tool result

- ToolResult
  - `data` unknown, required
  - `meta` object, required
    - `tool` string
    - `workspaceId` string, uuid

## Other responses

- `400`: Invalid input
- `401`: Missing or invalid credential
- `403`: Missing workspace scope, role permission, or plan entitlement
- `409`: Idempotency conflict, replay, or request still in progress
- `429`: Rate limit exceeded

---

[API](https://skmtc.dev/hivepublish/apis/hive-developer-api.md) · [All operations](https://skmtc.dev/hivepublish/apis/hive-developer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hivepublish/apis/hive-developer-api/revisions/b440c763583e?raw)
