---
title: "Check a draft would turn on"
method: POST
path: "/automation/drafts/{flowId}/preflight"
tags: ["Automation"]
---

# Check a draft would turn on

`POST /automation/drafts/{flowId}/preflight`

## Request

- Base URL: `https://www.sociahive.com/api/v1`
- URL: `https://www.sociahive.com/api/v1/automation/drafts/{flowId}/preflight`
- Auth: one of:
  - API key in header `X-API-Key`
  - OAuth 2 (authorization code, authorization URL `/api/oauth/authorize`, token URL `/api/oauth/token`, scopes: `flows:read`, `posts:read`)

A dry run of the publish gate plus the link check, as it would run once linked. Writes nothing.

## Path parameters

- `flowId` string, required: MongoDB ObjectId (24-character hex string)

## Response `200`

Preflight result

- object
  - `data` PostAutomationPreflight, required
    - `ok` boolean, required
    - `code` string: Why it would not turn on (open-ended), e.g. `link_placeholder`, `tier_limit`.
    - `message` string
    - `blanks` PostAutomationBlank[]
      - `nodeId` string, required
      - `nodeName` string, required
      - `token` string, required
      - `context` string, required
      - `link` boolean, required
    - `upgradeRequired` boolean
    - `retryable` boolean

## Other responses

- `400`: Bad request — invalid parameters
- `401`: Authentication required — provide X-API-Key or Bearer token
- `403`: Insufficient scope for this operation
- `404`: Automation not found (flow_not_found)
- `429`: Rate limit exceeded
- `500`: Internal server error

---

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